From patchwork Thu Oct 5 18:19:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michel Thierry X-Patchwork-Id: 9987729 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 2C8B06029B for ; Thu, 5 Oct 2017 18:19:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1DD7128D29 for ; Thu, 5 Oct 2017 18:19:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 12ECC28D2C; Thu, 5 Oct 2017 18:19:31 +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=-4.2 required=2.0 tests=BAYES_00, 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 125E528D29 for ; Thu, 5 Oct 2017 18:19:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A9D766E128; Thu, 5 Oct 2017 18:19:29 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7B3696E128 for ; Thu, 5 Oct 2017 18:19:28 +0000 (UTC) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Oct 2017 11:19:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.42,481,1500966000"; d="scan'208"; a="1227503419" Received: from relo-linux-11.sc.intel.com ([10.3.160.161]) by fmsmga002.fm.intel.com with ESMTP; 05 Oct 2017 11:19:27 -0700 From: Michel Thierry To: intel-gfx@lists.freedesktop.org Date: Thu, 5 Oct 2017 11:19:27 -0700 Message-Id: <20171005181927.7928-1-michel.thierry@intel.com> X-Mailer: git-send-email 2.14.1 Subject: [Intel-gfx] [PATCH] drm/i915/execlists: WaDisableCtxRestoreArbitration is only needed in gen8 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-Virus-Scanned: ClamAV using ClamSMTP WaDisableCtxRestoreArbitration was only applied for bdw and chv, but this changed after the code got moved to gen8_emit_bb_start (and, at least in my tree, there is no gen9_emit_bb_start). Fixes: 3ad7b52d962e ("drm/i915/execlists: Move bdw GPGPU w/a to emit_bb") Signed-off-by: Michel Thierry Cc: Chris Wilson Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/intel_lrc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index c5b76082d695..d2b7eac0777c 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c @@ -1619,7 +1619,10 @@ static int gen8_emit_bb_start(struct drm_i915_gem_request *req, return PTR_ERR(cs); /* WaDisableCtxRestoreArbitration:bdw,chv */ - *cs++ = MI_ARB_ON_OFF | MI_ARB_ENABLE; + if (IS_GEN8(req->i915)) + *cs++ = MI_ARB_ON_OFF | MI_ARB_ENABLE; + else + *cs++ = MI_NOOP; /* FIXME(BDW): Address space and security selectors. */ *cs++ = MI_BATCH_BUFFER_START_GEN8 |