From patchwork Mon Jun 18 17:39:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 10472419 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BF6B0601D7 for ; Mon, 18 Jun 2018 17:39:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ACB7B289C2 for ; Mon, 18 Jun 2018 17:39:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9F76828AEB; Mon, 18 Jun 2018 17:39:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 56F0F289C2 for ; Mon, 18 Jun 2018 17:39:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B8EB96E0DA; Mon, 18 Jun 2018 17:39:48 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id F1FEF6E0DA for ; Mon, 18 Jun 2018 17:39:46 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jun 2018 10:39:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,240,1526367600"; d="scan'208";a="49929165" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by orsmga007.jf.intel.com with SMTP; 18 Jun 2018 10:39:44 -0700 Received: by stinkbox (sSMTP sendmail emulation); Mon, 18 Jun 2018 20:39:43 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Date: Mon, 18 Jun 2018 20:39:43 +0300 Message-Id: <20180618173943.4562-1-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.16.4 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH xf86-video-intel] sna: Replace the blt SYNC_COPY assert with a check X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Ville Syrjälä My IVB hits the SYNC_COPY assert in prefer_blt_copy() when I force the use of the software cursor and I move the cursor on top of a dri2 window. Looks like any platform with sna_wait_for_scanline() implemented should be capable of tripping this assert. Let's just replace the assert with a check, which is what gen6 already does. IVB/HSW/BDW have sna_wait_for_scanline() so we'll have to change the gen7 and gen8 code at least. gen9+ doesn't have sna_wait_for_scanline() so in theory we could leave that one be, but I like consistency so let's change that one too. Signed-off-by: Ville Syrjälä --- src/sna/gen7_render.c | 5 +++-- src/sna/gen8_render.c | 5 +++-- src/sna/gen9_render.c | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c index 0a3bda768100..68002409a73d 100644 --- a/src/sna/gen7_render.c +++ b/src/sna/gen7_render.c @@ -2957,11 +2957,12 @@ prefer_blt_copy(struct sna *sna, struct kgem_bo *dst_bo, unsigned flags) { + if (flags & COPY_SYNC) + return false; + if (sna->kgem.mode == KGEM_BLT) return true; - assert((flags & COPY_SYNC) == 0); - if (untiled_tlb_miss(src_bo) || untiled_tlb_miss(dst_bo)) return true; diff --git a/src/sna/gen8_render.c b/src/sna/gen8_render.c index 69617da561b6..69c29bc6d901 100644 --- a/src/sna/gen8_render.c +++ b/src/sna/gen8_render.c @@ -2796,11 +2796,12 @@ prefer_blt_copy(struct sna *sna, struct kgem_bo *dst_bo, unsigned flags) { + if (flags & COPY_SYNC) + return false; + if (sna->kgem.mode == KGEM_BLT) return true; - assert((flags & COPY_SYNC) == 0); - if (untiled_tlb_miss(src_bo) || untiled_tlb_miss(dst_bo)) return true; diff --git a/src/sna/gen9_render.c b/src/sna/gen9_render.c index 505b98afa38c..b9622437897a 100644 --- a/src/sna/gen9_render.c +++ b/src/sna/gen9_render.c @@ -2859,11 +2859,12 @@ prefer_blt_copy(struct sna *sna, struct kgem_bo *dst_bo, unsigned flags) { + if (flags & COPY_SYNC) + return false; + if (sna->kgem.mode == KGEM_BLT) return true; - assert((flags & COPY_SYNC) == 0); - if (untiled_tlb_miss(src_bo) || untiled_tlb_miss(dst_bo)) return true;