[PATCH v2] drm/i915/display: identify display steppings in display probe

Jani Nikula jani.nikula at intel.com
Wed Aug 21 14:30:48 UTC 2024


On Wed, 21 Aug 2024, Gustavo Sousa <gustavo.sousa at 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


More information about the Intel-gfx mailing list