Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 43500C433E0 for ; Mon, 8 Mar 2021 20:16:12 +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 DA12B64EEA for ; Mon, 8 Mar 2021 20:16:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DA12B64EEA 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 6B0F16E875; Mon, 8 Mar 2021 20:16:11 +0000 (UTC) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id B87086E875 for ; Mon, 8 Mar 2021 20:16:09 +0000 (UTC) IronPort-SDR: CgZFEt/O0BCdYlBlVxJpKSCgA70H6K7xjD0BEZZZDy+eKU9rsuemrT7Ue0wUowIkSznNPLfgcY w5QYbGZxZX5w== X-IronPort-AV: E=McAfee;i="6000,8403,9917"; a="168012586" X-IronPort-AV: E=Sophos;i="5.81,233,1610438400"; d="scan'208";a="168012586" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2021 12:16:09 -0800 IronPort-SDR: lCYmjIf40BZuT0Bo2jJsQqn07A2a07hX38K4BhmLTVfVRugU95WoAJGgxAgEQ+x5GsmbMyqSKq Mdpc0Kjxl+wQ== X-IronPort-AV: E=Sophos;i="5.81,233,1610438400"; d="scan'208";a="599008562" Received: from sbalasub-mobl1.amr.corp.intel.com (HELO ldmartin-desk1) ([10.209.97.66]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2021 12:16:08 -0800 Date: Mon, 8 Mar 2021 12:16:08 -0800 From: Lucas De Marchi To: Matt Roper Message-ID: <20210308201608.plntz77ae7oi4mbb@ldmartin-desk1> X-Patchwork-Hint: comment References: <20210303010728.3605269-1-lucas.demarchi@intel.com> <20210303031407.GD2690983@mdroper-desk1.amr.corp.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210303031407.GD2690983@mdroper-desk1.amr.corp.intel.com> Subject: Re: [Intel-gfx] [PATCH 1/4] drm/i915/gen12: Add recommended hardware tuning value 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: intel-gfx@lists.freedesktop.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Tue, Mar 02, 2021 at 07:14:07PM -0800, Matt Roper wrote: >On Tue, Mar 02, 2021 at 05:07:25PM -0800, Lucas De Marchi wrote: >> From: Caz Yokoyama >> >> Follow Bspec 31870 to set recommended tuning values for certain GT >> register. These values aren't workarounds per-se, but it's best to >> handle them in the same general area of the driver, especially since >> there may be real workarounds that update other bits of the same >> registers. >> >> At the moment the only value we need to worry about is the >> TDS_TIMER setting in FF_MODE2. This setting was previously >> described as "Wa_1604555607" on some platforms, but the spec >> tells us that we should continue to program this on all current >> gen12 platforms, even those that do not have that WA. >> >> Bspec: 31870 >> >> Cc: Clinton Taylor >> Cc: Matt Roper >> Signed-off-by: Caz Yokoyama >> Signed-off-by: Lucas De Marchi > >A couple minor nitpicks about the comments, but you can tweak those >while applying. > >Reviewed-by: Matt Roper > >There appear to be some other registers recommended on the same bspec >tuning page that we don't seem to be handling yet. Will those be coming >as additional patches? I don't have those ready, but that is the intention, yes. Here I basically wanted to get the basic changes in place to make those possible, while moving the one we already have in the driver there. > >> --- >> drivers/gpu/drm/i915/gt/intel_workarounds.c | 48 ++++++++++++++++----- >> 1 file changed, 37 insertions(+), 11 deletions(-) >> >> diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c >> index 3b4a7da60f0b..f6d9b849aa62 100644 >> --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c >> +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c >> @@ -646,9 +646,38 @@ static void icl_ctx_workarounds_init(struct intel_engine_cs *engine, >> wa_masked_en(wal, GEN9_ROW_CHICKEN4, GEN11_DIS_PICK_2ND_EU); >> } >> >> +/* >> + * These settings aren't actually workarounds, but general tuning settings that >> + * need to be programmed on several platforms. >> + */ >> +static void gen12_ctx_gt_tuning_init(struct intel_engine_cs *engine, >> + struct i915_wa_list *wal) >> +{ >> + /* >> + * Although some platforms refer to it as Wa_1604555607, we need to >> + * program it even on those that don't explicitly list that >> + * workaround. >> + * >> + * Note that the implementation of this workaround is further modified > >Since we just got done saying that this technically isn't a workaround, >even though some of the older platforms still list it that way, I'd >re-word the comment here. Maybe "Note that the programming of this >register is further modified..." would be more appropriate. > >> + * according to the FF_MODE2 guidance given by Wa_1608008084:gen12. >> + * > >Minor nitpick; the new paragraph start here makes it sound like we've >moved on to describing something else, rather than explaining what >Wa_1608008084:gen12 asks us to do. I'd remove the blank line here and >start the next sentence with "Wa_1608008084 tells us..." to link the >statements together. thanks. I changed those and will resubmit. Lucas De Marchi > > >Matt > >> + * FF_MODE2 register will return the wrong value when read. The default >> + * value for this register is zero for all fields and there are no bit >> + * masks. So instead of doing a RMW we should just write TDS timer >> + * value. For the same reason read verification is ignored. >> + */ >> + wa_add(wal, >> + FF_MODE2, >> + FF_MODE2_TDS_TIMER_MASK, >> + FF_MODE2_TDS_TIMER_128, >> + 0); >> +} >> + >> static void gen12_ctx_workarounds_init(struct intel_engine_cs *engine, >> struct i915_wa_list *wal) >> { >> + gen12_ctx_gt_tuning_init(engine, wal); >> + >> /* >> * Wa_1409142259:tgl >> * Wa_1409347922:tgl >> @@ -675,19 +704,15 @@ static void tgl_ctx_workarounds_init(struct intel_engine_cs *engine, >> gen12_ctx_workarounds_init(engine, wal); >> >> /* >> - * Wa_1604555607:tgl,rkl >> + * Wa_16011163337 >> * >> - * Note that the implementation of this workaround is further modified >> - * according to the FF_MODE2 guidance given by Wa_1608008084:gen12. >> - * FF_MODE2 register will return the wrong value when read. The default >> - * value for this register is zero for all fields and there are no bit >> - * masks. So instead of doing a RMW we should just write the GS Timer >> - * and TDS timer values for Wa_1604555607 and Wa_16011163337. >> + * Like in gen12_ctx_gt_tuning_init(), read verification is ignored due >> + * to Wa_1608008084. >> */ >> wa_add(wal, >> FF_MODE2, >> - FF_MODE2_GS_TIMER_MASK | FF_MODE2_TDS_TIMER_MASK, >> - FF_MODE2_GS_TIMER_224 | FF_MODE2_TDS_TIMER_128, >> + FF_MODE2_GS_TIMER_MASK, >> + FF_MODE2_GS_TIMER_224, >> 0); >> } >> >> @@ -707,12 +732,13 @@ static void dg1_ctx_workarounds_init(struct intel_engine_cs *engine, >> /* >> * Wa_16011163337 >> * >> - * Like in tgl_ctx_workarounds_init(), read verification is ignored due >> + * Like in gen12_ctx_gt_tuning_init(), read verification is ignored due >> * to Wa_1608008084. >> */ >> wa_add(wal, >> FF_MODE2, >> - FF_MODE2_GS_TIMER_MASK, FF_MODE2_GS_TIMER_224, 0); >> + FF_MODE2_GS_TIMER_MASK, >> + FF_MODE2_GS_TIMER_224, 0); >> } >> >> static void >> -- >> 2.30.1 >> > >-- >Matt Roper >Graphics Software Engineer >VTT-OSGC Platform Enablement >Intel Corporation >(916) 356-2795 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx