Skip to content

RFC mkwrite_device_info removal

Tvrtko Ursulin intel-gfx 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest7 patches 28 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7drm/i915: Remove has_pooled_eu static initializerdrivers/gpu/drm/i915/i915_pci.c+0 -11 reply
2/7drm/i915: Introduce runtime device infodrivers/gpu/drm/i915/i915_debugfs.c drivers/gpu/drm/i915/i915_drv.c drivers/gpu/drm/i915/i915_drv.h +16 more+144 -1062 replies
3/7drm/i915: Move all runtime modified device info fields into runtime infodrivers/gpu/drm/i915/i915_debugfs.c drivers/gpu/drm/i915/i915_drv.c drivers/gpu/drm/i915/i915_drv.h +19 more+175 -1475 replies
4/7drm/i915: Remove mkwrite_device_infodrivers/gpu/drm/i915/i915_drv.c drivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_reg.h +3 more+151 -17010 replies
5/7drm/i915: Move gen and platform mask to runtime device infodrivers/gpu/drm/i915/i915_drv.c drivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_pci.c +2 more+33 -223 replies
6/7drm/i915: Introduce subplatform conceptdrivers/gpu/drm/i915/i915_drv.c drivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/intel_device_info.c +1 more+108 -367 replies
7/7drm/i915: Remove double underscore from static device info member namesdrivers/gpu/drm/i915/i915_drv.c drivers/gpu/drm/i915/i915_pci.c drivers/gpu/drm/i915/intel_device_info.c +1 more+75 -750 replies

Reviews trailers per patch

1 of 7 patches has a Reviewed-by or Acked-by.

PatchVille Syrjälä
1/7R-b
2/7
3/7
4/7
5/7
6/7
7/7

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

Read the v1 thread

Cover letter [RFC 0/7] mkwrite_device_info removal

From: Tvrtko Ursulin <[email protected]>

Some time ago we discussed the long term goal or removing the mkwrite_device_info hack in favour of splitting device info to a truly read-only and runtime halfves. This series attempts to do that.

Approach taken is to identify three classes of device info members:

1. Only set in static const tables.
2. Set in static const tables and modified at runtime.
3. Only set at runtime.

First set is left as is.

Third set is moved from const device_info into a newly created runtime_device_info and all accessors and use sites are converted to look at the new location.

Second set is duplicated in both device info structures, but the const copy is only used to copy over the respective members early on driver load. Otherwise the process is the same as for the third group.

End result is complete removal of mkwrite_device_info and removal of the embedded copy of device info stored in dev_priv/i915, which is now replaced with a pointer to the actual read-only/static const table.

Apart from the conceptual cleanup this has the benefit of making the static tables smaller since they are duplicated by the amount of platforms. And dev_priv/i915 is also smaller since it doesn't hold a copy of the whole device info.

On rough edge however is the copying over of group two members on driver load. I haven't found a nice automatic way to do it so at the moment it relies on manually adding lines to i915_driver_create.

Last patch of the series if probably best omitted since I think double underscore protection actually works well for preventing mistakes in any future work.

Tvrtko Ursulin (7):
drm/i915: Remove has_pooled_eu static initializer drm/i915: Introduce runtime device info
drm/i915: Move all runtime modified device info fields into runtime
info
drm/i915: Remove mkwrite_device_info
drm/i915: Move gen and platform mask to runtime device info drm/i915: Introduce subplatform concept
drm/i915: Remove double underscore from static device info member
names

 drivers/gpu/drm/i915/i915_debugfs.c           |  31 ++-
 drivers/gpu/drm/i915/i915_drv.c               |  71 +++++--
 drivers/gpu/drm/i915/i915_drv.h               | 191 ++++++++----------
 drivers/gpu/drm/i915/i915_gem.c               |   5 +-
 drivers/gpu/drm/i915/i915_gem_gtt.c           |   2 +-
 drivers/gpu/drm/i915/i915_gpu_error.c         |  19 +-
 drivers/gpu/drm/i915/i915_gpu_error.h         |   1 +
 drivers/gpu/drm/i915/i915_irq.c               |   2 +-
 drivers/gpu/drm/i915/i915_pci.c               |   5 +-
 drivers/gpu/drm/i915/i915_perf.c              |   5 +-
 drivers/gpu/drm/i915/i915_query.c             |   2 +-
 drivers/gpu/drm/i915/i915_reg.h               | 190 ++++++++---------
 drivers/gpu/drm/i915/intel_bios.c             |   2 +-
 drivers/gpu/drm/i915/intel_device_info.c      | 178 +++++++++++-----
 drivers/gpu/drm/i915/intel_device_info.h      |  82 ++++++--
 drivers/gpu/drm/i915/intel_display.c          |  20 +-
 drivers/gpu/drm/i915/intel_display.h          |  10 +-
 drivers/gpu/drm/i915/intel_engine_cs.c        |   9 +-
 drivers/gpu/drm/i915/intel_fbc.c              |   2 +-
 drivers/gpu/drm/i915/intel_fbdev.c            |   4 +-
 drivers/gpu/drm/i915/intel_guc_submission.c   |   4 +-
 drivers/gpu/drm/i915/intel_i2c.c              |   2 +-
 drivers/gpu/drm/i915/intel_lpe_audio.c        |   2 +-
 drivers/gpu/drm/i915/intel_lrc.c              |  14 +-
 drivers/gpu/drm/i915/intel_pm.c               |  11 +-
 drivers/gpu/drm/i915/intel_ringbuffer.c       |   4 +-
 drivers/gpu/drm/i915/intel_ringbuffer.h       |   4 +-
 drivers/gpu/drm/i915/intel_uncore.c           |   4 +-
 drivers/gpu/drm/i915/intel_workarounds.c      |   6 +-
 drivers/gpu/drm/i915/selftests/huge_pages.c   |  18 +-
 .../gpu/drm/i915/selftests/i915_gem_context.c |   6 +-
 drivers/gpu/drm/i915/selftests/intel_guc.c    |   4 +-
 drivers/gpu/drm/i915/selftests/intel_lrc.c    |   4 +-
 .../gpu/drm/i915/selftests/mock_gem_device.c  |  11 +-
 34 files changed, 527 insertions(+), 398 deletions(-)
Cc Chris Wilson <[email protected]>
Cc Jani Nikula <[email protected]>
Signature · 6 lines
2.19.1

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