From patchwork Mon Mar 6 20:49:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas De Marchi X-Patchwork-Id: 13162326 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id ACDF5C61DA4 for ; Mon, 6 Mar 2023 20:50:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8534710E471; Mon, 6 Mar 2023 20:50:22 +0000 (UTC) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id C5A7910E233; Mon, 6 Mar 2023 20:50:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678135819; x=1709671819; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=RcP4f5gSrcy9ihbcqvqaqRvVyE+lcApv0vn/41WsstM=; b=AU5K3GjxpejFuOsVhsLPuFzUT8Lau0OYsiCO5QUfl8u3Y0qC+geEWUpg wZ/FHOKjRsYfMGPWNW4ZJfBnb1Tzz4rV2lTuSagg8XCVdfg3+5OKatcwB p4XVdlNpUgqo3lBHhaVedImMBj9GA1Aa01xuRTHoVkSqLVakxwCvrn0EA Cc1KlgKlZaQ9xWJqQC9iEdIWhPlpR5V4E7b6DOdYWMzibldzzT385zSOX b6jKM/DIE1kgBvVdrWv/Mv34Kj/hrptr7MJCPpaO3f3lyOr5OLbZb419E MoVoWzKSgLZIRU/9X8uRY14AWGu8/qBym1Qs7ClTG3JsAOg7ZofT3NlIw Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10641"; a="319499959" X-IronPort-AV: E=Sophos;i="5.98,238,1673942400"; d="scan'208";a="319499959" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Mar 2023 12:50:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10641"; a="669615308" X-IronPort-AV: E=Sophos;i="5.98,238,1673942400"; d="scan'208";a="669615308" Received: from lucas-s2600cw.jf.intel.com ([10.165.21.196]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Mar 2023 12:50:19 -0800 From: Lucas De Marchi To: intel-gfx@lists.freedesktop.org Date: Mon, 6 Mar 2023 12:49:52 -0800 Message-Id: <20230306204954.753739-1-lucas.demarchi@intel.com> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 1/3] drm/i915: Remove redundant check for DG1 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lucas De Marchi , dri-devel@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" dg1_gt_workarounds_init() is only ever called for DG1, so there is no point checking it again. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper --- drivers/gpu/drm/i915/gt/intel_workarounds.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c index 32aa1647721a..eb6cc4867d67 100644 --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c @@ -1472,21 +1472,15 @@ gen12_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal) static void dg1_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal) { - struct drm_i915_private *i915 = gt->i915; - gen12_gt_workarounds_init(gt, wal); /* Wa_1409420604:dg1 */ - if (IS_DG1(i915)) - wa_mcr_write_or(wal, - SUBSLICE_UNIT_LEVEL_CLKGATE2, - CPSSUNIT_CLKGATE_DIS); + wa_mcr_write_or(wal, SUBSLICE_UNIT_LEVEL_CLKGATE2, + CPSSUNIT_CLKGATE_DIS); /* Wa_1408615072:dg1 */ /* Empirical testing shows this register is unaffected by engine reset. */ - if (IS_DG1(i915)) - wa_write_or(wal, UNSLICE_UNIT_LEVEL_CLKGATE2, - VSUNIT_CLKGATE_DIS_TGL); + wa_write_or(wal, UNSLICE_UNIT_LEVEL_CLKGATE2, VSUNIT_CLKGATE_DIS_TGL); } static void From patchwork Mon Mar 6 20:49:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas De Marchi X-Patchwork-Id: 13162327 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id C3129C6FD1A for ; Mon, 6 Mar 2023 20:50:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D300C10E476; Mon, 6 Mar 2023 20:50:22 +0000 (UTC) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id 33B8510E233; Mon, 6 Mar 2023 20:50:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678135820; x=1709671820; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ooHw4yZNO6MOLf7e1yiQ8wJN+YuLMBg0dV2Qp6y9lSU=; b=USQr7hDfoRGTRbA/bL1zyqIATh19UV7O+5JhmB7Pel/7/tv2xa8i7ZNy fssfHIYZV//MWDUIZ8Cfec+3Mo6+1HBdSoO70xPp+RqZzxNtm9zwhPINs 4UR35tP/RXKY/2cmhdqL22lGsHtwqTk+blYl1X3/0uZ6/hmvGZqw2bzJA yMCtZWgV2s40oc3J3HZEVFsdEaDLvoJELWUDIjXU+Hx2Df/zmiOPxjzi2 vAe84ZejyZDpgO1WQOAjzWgEX0Bt4OnBYHZpux9F6KKqT4HqxhHLbtdnm 4jxdG+jdHj3PyM6jLMFQ+TNtuGHs2onEndC5eBiLhl2bC3Gh5Hdyqecq9 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10641"; a="319499960" X-IronPort-AV: E=Sophos;i="5.98,238,1673942400"; d="scan'208";a="319499960" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Mar 2023 12:50:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10641"; a="669615311" X-IronPort-AV: E=Sophos;i="5.98,238,1673942400"; d="scan'208";a="669615311" Received: from lucas-s2600cw.jf.intel.com ([10.165.21.196]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Mar 2023 12:50:19 -0800 From: Lucas De Marchi To: intel-gfx@lists.freedesktop.org Date: Mon, 6 Mar 2023 12:49:53 -0800 Message-Id: <20230306204954.753739-2-lucas.demarchi@intel.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230306204954.753739-1-lucas.demarchi@intel.com> References: <20230306204954.753739-1-lucas.demarchi@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 2/3] drm/i915: Move DG2 tuning to the right function X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lucas De Marchi , dri-devel@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Use gt_tuning_settings() for the recommended tunings rather than the one for workarounds. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper --- drivers/gpu/drm/i915/gt/intel_workarounds.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c index eb6cc4867d67..389bfcd299af 100644 --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c @@ -1653,13 +1653,6 @@ dg2_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal) /* Wa_14014830051:dg2 */ wa_mcr_write_clr(wal, SARB_CHICKEN1, COMP_CKN_IN); - /* - * The following are not actually "workarounds" but rather - * recommended tuning settings documented in the bspec's - * performance guide section. - */ - wa_mcr_write_or(wal, XEHP_SQCM, EN_32B_ACCESS); - /* Wa_14015795083 */ wa_write_clr(wal, GEN7_MISCCPCTL, GEN12_DOP_CLOCK_GATE_RENDER_ENABLE); @@ -1752,8 +1745,10 @@ static void gt_tuning_settings(struct intel_gt *gt, struct i915_wa_list *wal) wa_mcr_masked_en(wal, XEHPC_LNCFMISCCFGREG0, XEHPC_HOSTCACHEEN); } - if (IS_DG2(gt->i915)) + if (IS_DG2(gt->i915)) { wa_mcr_write_or(wal, XEHP_L3SCQREG7, BLEND_FILL_CACHING_OPT_DIS); + wa_mcr_write_or(wal, XEHP_SQCM, EN_32B_ACCESS); + } } static void From patchwork Mon Mar 6 20:49:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas De Marchi X-Patchwork-Id: 13162325 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 50741C64EC4 for ; Mon, 6 Mar 2023 20:50:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 863FF10E233; Mon, 6 Mar 2023 20:50:21 +0000 (UTC) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0304710E241; Mon, 6 Mar 2023 20:50:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678135820; x=1709671820; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jDULKDkwrhK8DHMjbkq0f8ugFFxbkTVWK+C7rTd/2D0=; b=JAdpFZQXfcc+x4XrYLXoxcvBBpe1dx9hxha30aS75zREBSltK6Rvy/4M 1En7KZdx9ptvrnKPJr7exOZ+ZQ9x06++0Z1o9xtla9LWN39ptxMT46rYd cPc7Rte1ga1DGDKt0jRohOV8DBn1jyUBEvzqP+m2ShitwIOuK1rZxWvED I8L+BcLWszcCLMrz7JNkD5WNf3y3DAuPkFsTd8m8WJrAkc5Sed1ept8FI GScEVKswOwI/w1xc1jFie7Gp1P5IrSLhYRo6St84JpRZ2U2DHq04BrWBt FIUzl3ecc86oUn/my8bzRi/V6aW0A5vIQBvTvGmU5CWnfXjZqX4Y6fsAM g==; X-IronPort-AV: E=McAfee;i="6500,9779,10641"; a="319499961" X-IronPort-AV: E=Sophos;i="5.98,238,1673942400"; d="scan'208";a="319499961" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Mar 2023 12:50:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10641"; a="669615314" X-IronPort-AV: E=Sophos;i="5.98,238,1673942400"; d="scan'208";a="669615314" Received: from lucas-s2600cw.jf.intel.com ([10.165.21.196]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Mar 2023 12:50:19 -0800 From: Lucas De Marchi To: intel-gfx@lists.freedesktop.org Date: Mon, 6 Mar 2023 12:49:54 -0800 Message-Id: <20230306204954.753739-3-lucas.demarchi@intel.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230306204954.753739-1-lucas.demarchi@intel.com> References: <20230306204954.753739-1-lucas.demarchi@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 3/3] drm/i915/dg1: Move Wa_1806527549 to the right function X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lucas De Marchi , dri-devel@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" dg1_ctx_workarounds_init() is DG1-only, while gen12_ctx_workarounds_init() is shared with other platforms. Move the workaround to the former so there is no additional platform check needed. Signed-off-by: Lucas De Marchi --- drivers/gpu/drm/i915/gt/intel_workarounds.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c index 389bfcd299af..f68fe64f63a6 100644 --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c @@ -707,8 +707,6 @@ static void gen12_ctx_gt_tuning_init(struct intel_engine_cs *engine, static void gen12_ctx_workarounds_init(struct intel_engine_cs *engine, struct i915_wa_list *wal) { - struct drm_i915_private *i915 = engine->i915; - gen12_ctx_gt_tuning_init(engine, wal); /* @@ -742,10 +740,6 @@ static void gen12_ctx_workarounds_init(struct intel_engine_cs *engine, FF_MODE2_GS_TIMER_MASK, FF_MODE2_GS_TIMER_224, 0, false); - - if (!IS_DG1(i915)) - /* Wa_1806527549 */ - wa_masked_en(wal, HIZ_CHICKEN, HZ_DEPTH_TEST_LE_GE_OPT_DISABLE); } static void dg1_ctx_workarounds_init(struct intel_engine_cs *engine, @@ -760,6 +754,9 @@ static void dg1_ctx_workarounds_init(struct intel_engine_cs *engine, /* Wa_22010493298 */ wa_masked_en(wal, HIZ_CHICKEN, DG1_HZ_READ_SUPPRESSION_OPTIMIZATION_DISABLE); + + /* Wa_1806527549 */ + wa_masked_en(wal, HIZ_CHICKEN, HZ_DEPTH_TEST_LE_GE_OPT_DISABLE); } static void dg2_ctx_workarounds_init(struct intel_engine_cs *engine,