From patchwork Fri Feb 12 16:31:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Peres X-Patchwork-Id: 8293341 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8C4449F399 for ; Fri, 12 Feb 2016 16:31:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C4895200DF for ; Fri, 12 Feb 2016 16:31:56 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id B696F202D1 for ; Fri, 12 Feb 2016 16:31:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B64D76EAFE; Fri, 12 Feb 2016 08:31:54 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTP id 0E79A6EAFD for ; Fri, 12 Feb 2016 08:31:54 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 12 Feb 2016 08:31:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,436,1449561600"; d="scan'208";a="882965058" Received: from linux.intel.com ([10.23.219.25]) by orsmga001.jf.intel.com with ESMTP; 12 Feb 2016 08:31:54 -0800 Received: from beast.fi.intel.com (unknown [10.237.72.70]) by linux.intel.com (Postfix) with ESMTP id E92A06A4002; Fri, 12 Feb 2016 09:19:43 -0800 (PST) From: Martin Peres To: intel-gfx@lists.freedesktop.org Date: Fri, 12 Feb 2016 18:31:29 +0200 Message-Id: <1455294689-29249-8-git-send-email-martin.peres@linux.intel.com> X-Mailer: git-send-email 2.7.1 In-Reply-To: <1455294689-29249-1-git-send-email-martin.peres@linux.intel.com> References: <1455294689-29249-1-git-send-email-martin.peres@linux.intel.com> Subject: [Intel-gfx] [PATCH 7/7] sna: add an assert in the lengthy sna_drawable_use_bo X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP I got lost in all the changes done on priv->flush and gpu_bo enough not to be able to guarantee that if flush is non-null, so is gpu_bo. Caught by Klockwork. Signed-off-by: Martin Peres --- src/sna/sna_accel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index f1c136a..595faa6 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -4074,6 +4074,7 @@ prefer_gpu_bo: } if (priv->flush) { assert(!priv->shm); + assert(priv->gpu_bo); sna_add_flush_pixmap(sna, priv, priv->gpu_bo); }