From: Aditya Swarup <aditya.swarup@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>,
intel-gfx@lists.freedesktop.org,
Chris Wilson <chris@chris-wilson.co.uk>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/tgl: Fix REVID macros for TGL to fetch correct stepping
Date: Wed, 25 Nov 2020 11:34:19 -0800 [thread overview]
Message-ID: <6fcae72e-fd6e-1dbc-e6df-174ed3b12940@intel.com> (raw)
In-Reply-To: <20201125192958.6qmcnjksvavkwq62@ldmartin-desk1>
On 11/25/20 11:29 AM, Lucas De Marchi wrote:
> On Wed, Nov 25, 2020 at 09:51:04AM -0800, Aditya Swarup wrote:
>> On 11/25/20 7:33 AM, Chris Wilson wrote:
>>> Quoting Jani Nikula (2020-11-25 11:45:56)
>>>> On Tue, 24 Nov 2020, Aditya Swarup <aditya.swarup@intel.com> wrote:
>>>>> + if (IS_TGL_U(dev_priv) || IS_TGL_Y(dev_priv)) {
>>>>> + if (TGL_UY_REVID_RANGE(revid)) {
>>>>> + return tgl_uy_revids + revid;
>>>>> + } else {
>>>>> + drm_dbg_kms(&dev_priv->drm,
>>>>> + "Unsupported SOC stepping found %u, using %lu instead\n",
>>>>> + revid, ARRAY_SIZE(tgl_uy_revids) - 1);
>>>
>>> Also please don't have a dbg for every single IS_TGL_*_REVID
>>> invocation. And this is not _kms, but driver; better yet, don't bother
>>> with a drm_dbg_kms here at all.
>>>
>>> If you want to actually check, add something like
>>> intel_detect_preproduction_hw() and warn about unknown future revids.
>>> Or include the info when we print the revid in the caps.
>>
>> So, what you are suggesting is add an info print in that function intel_detect_preproduction_hw() right?
>> Or something else?
>
> since this is all going away soon, just removing the dbg would be ok
>
> And in that case, just doing something like below would be shorter and
> clearer IMO (untested):
>
> if (IS_TGL_U(dev_priv) || IS_TGL_Y(dev_priv)) {
> arr = tgl_uy_revids;
> size = ARRAY_SIZE(tgl_uy_revids);
> } else {
> arr = tgl_revids;
> size = ARRAY_SIZE(tgl_revids);
> }
>
> revid = min(revid, size - 1);
>
> return &arr[revid];
>
> That may also be 2 patches: one adding the revid so we actually apply
> the correct workarounds (this needs the "Fixes" tag) and the other to
> add the bounds check.
Thanks for the suggestion. I will implement it this way.
Aditya
>
> Lucas De Marchi
>
>>
>>> -Chris
>>>
>>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-11-25 19:34 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-25 0:31 [Intel-gfx] [PATCH] drm/i915/tgl: Fix REVID macros for TGL to fetch correct stepping Aditya Swarup
2020-11-25 1:08 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2020-11-25 1:39 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-11-25 1:39 ` [Intel-gfx] ✗ Fi.CI.BUILD: warning " Patchwork
2020-11-25 3:38 ` [Intel-gfx] [PATCH] " kernel test robot
2020-11-25 5:38 ` kernel test robot
2020-11-25 6:14 ` [Intel-gfx] ✗ Fi.CI.IGT: failure for " Patchwork
2020-11-25 11:45 ` [Intel-gfx] [PATCH] " Jani Nikula
2020-11-25 15:33 ` Chris Wilson
2020-11-25 17:51 ` Aditya Swarup
2020-11-25 18:36 ` Ville Syrjälä
2020-11-25 19:18 ` Lucas De Marchi
2020-11-25 19:30 ` Aditya Swarup
2020-11-25 19:52 ` Lucas De Marchi
2020-11-25 19:29 ` Lucas De Marchi
2020-11-25 19:34 ` Aditya Swarup [this message]
2020-11-25 20:14 ` Chris Wilson
2020-11-25 19:01 ` Lucas De Marchi
2020-11-25 13:21 ` Souza, Jose
2020-11-25 18:03 ` Aditya Swarup
2020-11-25 18:26 ` Souza, Jose
2020-11-25 23:09 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915/tgl: Fix REVID macros for TGL to fetch correct stepping (rev2) 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=6fcae72e-fd6e-1dbc-e6df-174ed3b12940@intel.com \
--to=aditya.swarup@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=lucas.demarchi@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