Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: Intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Fix workarounds on Gen2-3
Date: Mon, 21 Nov 2022 08:45:11 +0000	[thread overview]
Message-ID: <04397db7-0fe2-f04c-74e4-4ff2214e1e19@linux.intel.com> (raw)
In-Reply-To: <Y3e9j8enFhq7//Bn@mdroper-desk1.amr.corp.intel.com>


On 18/11/2022 17:14, Matt Roper wrote:
> On Fri, Nov 18, 2022 at 11:52:49AM +0000, Tvrtko Ursulin wrote:
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> In 3653727560d0 ("drm/i915: Simplify internal helper function signature")
>> I broke the old platforms by not noticing engine workaround init does not
>> initialize the list on old platforms. Fix it by always initializing which
>> already does the right thing by mostly not doing anything if there aren't
>> any workarounds on the list.
>>
>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>> Fixes: 3653727560d0 ("drm/i915: Simplify internal helper function signature")
>> Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
>> ---
>>   drivers/gpu/drm/i915/gt/intel_workarounds.c | 5 +----
>>   1 file changed, 1 insertion(+), 4 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c
>> index 213160f29ec3..4d7a01b45e09 100644
>> --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
>> +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
>> @@ -2991,7 +2991,7 @@ general_render_compute_wa_init(struct intel_engine_cs *engine, struct i915_wa_li
>>   static void
>>   engine_init_workarounds(struct intel_engine_cs *engine, struct i915_wa_list *wal)
>>   {
>> -	if (I915_SELFTEST_ONLY(GRAPHICS_VER(engine->i915) < 4))
>> +	if (GRAPHICS_VER(engine->i915) < 4)
>>   		return;
> 
> Do we even need this early return at all?  As far as I can see, letting
> this function run its course doesn't wind up having any effect or cause
> any problems (you still wind up with an empty list).

True, it looks to me like that as well, now that you are pointing it 
out. Btw originally I was most perplexed by the "selftests only" 
annotation, but did not find time to go digging through history to 
figure out why was that even needed.

I left the return as is for now and pushed it to fix the breakage. Will 
try to revisit this at some point. Thanks for the review!

Regards,

Tvrtko

> 
> Regardless,
> 
> Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
> 
>>   
>>   	engine_fake_wa_init(engine, wal);
>> @@ -3016,9 +3016,6 @@ void intel_engine_init_workarounds(struct intel_engine_cs *engine)
>>   {
>>   	struct i915_wa_list *wal = &engine->wa_list;
>>   
>> -	if (GRAPHICS_VER(engine->i915) < 4)
>> -		return;
>> -
>>   	wa_init_start(wal, engine->gt, "engine", engine->name);
>>   	engine_init_workarounds(engine, wal);
>>   	wa_init_finish(wal);
>> -- 
>> 2.34.1
>>
> 

  reply	other threads:[~2022-11-21  8:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-18 11:52 [Intel-gfx] [PATCH] drm/i915: Fix workarounds on Gen2-3 Tvrtko Ursulin
2022-11-18 12:15 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2022-11-18 12:38 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-11-18 17:14 ` [Intel-gfx] [PATCH] " Matt Roper
2022-11-21  8:45   ` Tvrtko Ursulin [this message]
2022-11-18 19:58 ` Ville Syrjälä
2022-11-19  3:59 ` [Intel-gfx] ✓ Fi.CI.IGT: success for " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=04397db7-0fe2-f04c-74e4-4ff2214e1e19@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=matthew.d.roper@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox