Skip to content

Device id consolidation

Tvrtko Ursulin intel-gfx 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4drm/i915: Split Pineview device info into desktop and mobilearch/x86/kernel/early-quirks.c drivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_pci.c +2 more+18 -90 replies
2/4drm/i915: Remove redundant device id from IS_IRONLAKE_M macrodrivers/gpu/drm/i915/i915_drv.h+5 -20 replies
3/4drm/i915: Split some PCI ids into separate groupsinclude/drm/i915_pciids.h+124 -490 replies
4/4drm/i915: Introduce concept of a sub-platformdrivers/gpu/drm/i915/i915_drv.c drivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_gpu_error.c +3 more+267 -4213 replies

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchChris WilsonJani Nikula
SeriesR-b
1/4R-b
2/4R-b
3/4
4/4R-b R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] Device id consolidation

From: Tvrtko Ursulin <[email protected]>

Series removes device id checks from i915_drv.h macros and consolidates them to i915_pciids.h as the main "database", while making intel_device_info.c reference the former, expanding the existing concept of a platform mask by a few low bits reserved for sub-platform mask.

This has a two-fold positive effect of firstly consolidating the list of device ids to one location, and secondly removing the if-ladders from every IS_<platfrom>_<subplatform> call site.

Maintenance burden is not completely removed but should be improved. One case in point is that I have found some disagreements between device id listed in i915_pciids.h and i915_drv.h.

At the same time platform mask code is generalized to an array of u32 to accomodate the addition of EHL and avoid spilling into u64 which would cause a small code size increase. Downside is that any platforms on the u32 boundary, like currently ICL and EHL, lose the benefit of optimizing the "IS_ICELAKE || IS_ELKHARTLAKE" checks into a single conditional, although at the moment there aren't any such call-sites.

Before vs after for the whole series:

text data bss dec hex filename

1891093   43903    7424 1942420  1da394 i915.ko.0
1890434   43903    7424 1941761  1da101 i915.ko.1

add/remove: 12/3 grow/shrink: 92/121 up/down: 1974/-1769 (205)
...
Total: Before=1286293, After=1286498, chg +0.02%

Tvrtko Ursulin (4):
drm/i915: Split Pineview device info into desktop and mobile drm/i915: Remove redundant device id from IS_IRONLAKE_M macro drm/i915: Split some PCI ids into separate groups drm/i915: Introduce concept of a sub-platform

 arch/x86/kernel/early-quirks.c           |   3 +-
 drivers/gpu/drm/i915/i915_drv.c          |   8 +-
 drivers/gpu/drm/i915/i915_drv.h          | 133 +++++++++++------
 drivers/gpu/drm/i915/i915_gpu_error.c    |   3 +
 drivers/gpu/drm/i915/i915_pci.c          |  14 +-
 drivers/gpu/drm/i915/intel_device_info.c | 145 ++++++++++++++++++
 drivers/gpu/drm/i915/intel_device_info.h |  27 +++-
 drivers/gpu/drm/i915/intel_pm.c          |   4 +-
 include/drm/i915_pciids.h                | 179 ++++++++++++++++-------
 9 files changed, 414 insertions(+), 102 deletions(-)
Signature · 6 lines
2.19.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx