[Intel-gfx] [PATCH 13/14] drm/i915: Sort ICL PCI IDs

Lucas De Marchi lucas.demarchi at intel.com
Fri Oct 23 23:55:16 UTC 2020


On Thu, Jul 16, 2020 at 08:21:05PM +0300, Ville Syrjälä wrote:
>From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
>Sort the ICL PCI IDs numerically. Some order seems better than
>randomness.

At one point there was actually logic in the order: it followed whatever
order the spec had, so "updating the IDs" was basically rewriting
those defines or quickly scan through the spec and what we had in the
driver.

Of course, that doesn't work so well, because a) the order may change in
the spec and in fact it did; b)  with the split between variants of the
same platform it adds randomness to it; c) not everybody understands
what order was supposed to be and just appends to the end

So, I think a comment on top saying the PCI IDs should be lowercase and
numerically sorted would be appropriate to avoid having to fix this
again soon.

Lucas De Marchi

>
>Cc: Alexei Podtelezhnikov <apodtele at gmail.com>
>Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
>---
> include/drm/i915_pciids.h | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
>diff --git a/include/drm/i915_pciids.h b/include/drm/i915_pciids.h
>index 33a72e6eadd8..45da1b45c01e 100644
>--- a/include/drm/i915_pciids.h
>+++ b/include/drm/i915_pciids.h
>@@ -564,18 +564,18 @@
> /* ICL */
> #define INTEL_ICL_PORT_F_IDS(info) \
> 	INTEL_VGA_DEVICE(0x8A50, info), \
>-	INTEL_VGA_DEVICE(0x8A5C, info), \
>-	INTEL_VGA_DEVICE(0x8A59, info),	\
>-	INTEL_VGA_DEVICE(0x8A58, info),	\
> 	INTEL_VGA_DEVICE(0x8A52, info), \
>+	INTEL_VGA_DEVICE(0x8A53, info), \
>+	INTEL_VGA_DEVICE(0x8A54, info), \
>+	INTEL_VGA_DEVICE(0x8A56, info), \
>+	INTEL_VGA_DEVICE(0x8A57, info), \
>+	INTEL_VGA_DEVICE(0x8A58, info),	\
>+	INTEL_VGA_DEVICE(0x8A59, info),	\
> 	INTEL_VGA_DEVICE(0x8A5A, info), \
> 	INTEL_VGA_DEVICE(0x8A5B, info), \
>-	INTEL_VGA_DEVICE(0x8A57, info), \
>-	INTEL_VGA_DEVICE(0x8A56, info), \
>-	INTEL_VGA_DEVICE(0x8A71, info), \
>+	INTEL_VGA_DEVICE(0x8A5C, info), \
> 	INTEL_VGA_DEVICE(0x8A70, info), \
>-	INTEL_VGA_DEVICE(0x8A53, info), \
>-	INTEL_VGA_DEVICE(0x8A54, info)
>+	INTEL_VGA_DEVICE(0x8A71, info)
>
> #define INTEL_ICL_11_IDS(info) \
> 	INTEL_ICL_PORT_F_IDS(info), \
>-- 
>2.26.2
>
>_______________________________________________
>Intel-gfx mailing list
>Intel-gfx at lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the Intel-gfx mailing list