From: Jani Nikula <jani.nikula@intel.com>
To: Gustavo Sousa <gustavo.sousa@intel.com>,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: lucas.demarchi@intel.com, rodrigo.vivi@intel.com,
matthew.d.roper@intel.com
Subject: Re: [PATCH v2] drm/i915/display: identify display steppings in display probe
Date: Wed, 21 Aug 2024 17:30:48 +0300 [thread overview]
Message-ID: <87msl63q3r.fsf@intel.com> (raw)
In-Reply-To: <172424832093.2071.7215356235062692151@gjsousa-mobl2>
On Wed, 21 Aug 2024, Gustavo Sousa <gustavo.sousa@intel.com> wrote:
> Quoting Jani Nikula (2024-08-21 06:50:36-03:00)
>>+ if (revision < size && map[revision] != STEP_NONE) {
>>+ step = map[revision];
>>+ } else {
>>+ drm_warn(display->drm, "Unknown revision 0x%02x\n", revision);
>>+
>>+ /*
>>+ * If we hit a gap in the revision to step map, use the information
>>+ * for the next revision.
>>+ *
>>+ * This may be wrong in all sorts of ways, especially if the
>>+ * steppings in the array are not monotonically increasing, but
>>+ * it's better than defaulting to 0.
>>+ */
>>+ while (revision < size && map[revision] == STEP_NONE)
>>+ revision++;
>>+
>>+ if (revision < size) {
>>+ drm_dbg_kms(display->drm, "Using display stepping for revision 0x%02x\n",
>>+ revision);
>>+ step = map[revision];
>>+ } else {
>>+ drm_dbg_kms(display->drm, "Using future display stepping\n");
>>+ step = STEP_FUTURE;
>>+ }
>>+ }
>>+
>>+ drm_WARN_ON(display->drm, step == STEP_NONE);
>
> I believe we can be sure that step != STEP_NONE at this point. Are we
> keeping this only to guard against bugs from future changes?
Belt and suspenders, just making sure I didn't screw up anything. :)
BR,
Jani.
--
Jani Nikula, Intel
next prev parent reply other threads:[~2024-08-21 14:31 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-20 19:00 [PATCH 00/10] drm/i915/display: identify display steppings in display code Jani Nikula
2024-08-20 19:00 ` [PATCH 01/10] drm/xe/display: fix compat IS_DISPLAY_STEP() range end Jani Nikula
2024-08-20 19:31 ` Lucas De Marchi
2024-08-20 22:29 ` Matt Roper
2024-08-20 19:00 ` [PATCH 02/10] drm/xe/display: remove intel_display_step_name() to simplify Jani Nikula
2024-08-20 22:32 ` Matt Roper
2024-08-20 19:00 ` [PATCH 03/10] drm/xe/display: remove the unused compat HAS_GMD_ID() Jani Nikula
2024-08-20 22:40 ` Matt Roper
2024-08-20 19:00 ` [PATCH 04/10] drm/xe/step: define more steppings E-J Jani Nikula
2024-08-20 22:48 ` Matt Roper
2024-08-20 19:00 ` [PATCH 05/10] drm/i915/display: rename IS_DISPLAY_IP_RANGE() to IS_DISPLAY_VER_FULL() Jani Nikula
2024-08-20 22:54 ` Matt Roper
2024-08-20 19:00 ` [PATCH 06/10] drm/i915/display: rename IS_DISPLAY_IP_STEP() to IS_DISPLAY_VER_STEP() Jani Nikula
2024-08-20 22:56 ` Matt Roper
2024-08-20 19:00 ` [PATCH 07/10] drm/i915/display: identify display steppings in display probe Jani Nikula
2024-08-20 23:52 ` Matt Roper
2024-08-21 8:59 ` Jani Nikula
2024-08-21 9:50 ` [PATCH v2] " Jani Nikula
2024-08-21 13:48 ` Matt Roper
2024-08-21 13:52 ` Gustavo Sousa
2024-08-21 14:30 ` Jani Nikula [this message]
2024-08-20 19:00 ` [PATCH 08/10] drm/i915/display: switch to display detected steppings Jani Nikula
2024-08-21 0:01 ` Matt Roper
2024-08-20 19:00 ` [PATCH 09/10] drm/i915: remove display stepping handling Jani Nikula
2024-08-21 0:04 ` Matt Roper
2024-08-21 0:08 ` Matt Roper
2024-08-20 19:00 ` [PATCH 10/10] drm/xe: " Jani Nikula
2024-08-21 0:04 ` Matt Roper
2024-08-20 19:30 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/display: identify display steppings in display code Patchwork
2024-08-20 19:30 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-08-20 19:40 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-08-21 10:38 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/display: identify display steppings in display code (rev2) Patchwork
2024-08-21 10:38 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-08-21 10:49 ` ✓ Fi.CI.BAT: success " Patchwork
2024-08-21 12:22 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-08-22 10:52 ` [PATCH 00/10] drm/i915/display: identify display steppings in display code Jani Nikula
2024-08-22 12:32 ` Lucas De Marchi
2024-08-22 13:29 ` Jani Nikula
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=87msl63q3r.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=gustavo.sousa@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=matthew.d.roper@intel.com \
--cc=rodrigo.vivi@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