From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx> 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 <chris@xxxxxxxxxxxxxxxxxx> Cc: Jani Nikula <jani.nikula@xxxxxxxxx> -- 2.19.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx