From patchwork Wed Oct 16 04:05:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kumar Valsan, Prathap" X-Patchwork-Id: 11192325 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DA4C313BD for ; Wed, 16 Oct 2019 03:49:02 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B679520854 for ; Wed, 16 Oct 2019 03:49:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B679520854 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 461466E3F3; Wed, 16 Oct 2019 03:49:01 +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 A88EE6E3F3 for ; Wed, 16 Oct 2019 03:48:59 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Oct 2019 20:48:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,302,1566889200"; d="scan'208";a="195482429" Received: from pkumarva-server.ra.intel.com ([10.23.184.130]) by fmsmga007.fm.intel.com with ESMTP; 15 Oct 2019 20:48:59 -0700 From: Prathap Kumar Valsan To: intel-gfx@lists.freedesktop.org Date: Wed, 16 Oct 2019 00:05:58 -0400 Message-Id: <20191016040558.12862-1-prathap.kumar.valsan@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH] drm/i915: Move L3 MOCS to engine reset domain. 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" Gen12 has L3 MOCS in engine reset domain, having us to re-initialize on an engine reset. References: https://bugs.freedesktop.org/show_bug.cgi?id=111723 References: https://bugs.freedesktop.org/show_bug.cgi?id=111645 References: HSDES#1607983814 References: HSDES#14010115701 Signed-off-by: Prathap Kumar Valsan --- drivers/gpu/drm/i915/gt/intel_mocs.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/intel_mocs.c b/drivers/gpu/drm/i915/gt/intel_mocs.c index 728704bbbe18..774c5df0d0e9 100644 --- a/drivers/gpu/drm/i915/gt/intel_mocs.c +++ b/drivers/gpu/drm/i915/gt/intel_mocs.c @@ -365,6 +365,8 @@ static u32 get_entry_control(const struct drm_i915_mocs_table *table, return table->table[I915_MOCS_PTE].control_value; } +static void intel_mocs_init_l3cc_table(struct intel_gt *gt); + /** * intel_mocs_init_engine() - emit the mocs control table * @engine: The engine for whom to emit the registers. @@ -380,6 +382,9 @@ void intel_mocs_init_engine(struct intel_engine_cs *engine) unsigned int index; u32 unused_value; + if (IS_GEN(gt->i915, 12) && engine->class == RENDER_CLASS) + intel_mocs_init_l3cc_table(gt); + /* Platforms with global MOCS do not need per-engine initialization. */ if (HAS_GLOBAL_MOCS_REGISTERS(gt->i915)) return;