[Intel-gfx] [PATCH 1/3] drm/i915: Add struct to hold IP version

Souza, Jose jose.souza at intel.com
Wed Oct 20 19:29:59 UTC 2021


On Wed, 2021-10-20 at 12:47 +0300, Jani Nikula wrote:
> On Tue, 19 Oct 2021, José Roberto de Souza <jose.souza at intel.com> wrote:
> > The constant platform display version is not using this new struct but
> > the runtime variant will definitely use it.
> 
> Cc: Some more folks to hijack this thread. Sorry! ;)
> 
> We added runtime info to i915, because we had this idea and goal of
> turning the device info to a truly const pointer to the info structures
> in i915_pci.c that are stored in rodata. The idea was that we'll have a
> complete split of mutable and immutable device data, with all the
> mutable data in runtime info.
> 
> Alas, we never got there. More and more data that was mostly const but
> sometimes needed tweaking kept piling up. mkwrite_device_info() was
> supposed to be a clue not to modify device info runtime, but instead it
> proliferated. Now we have places like intel_fbc_init() disabling FBC
> through that. But most importantly, we have fusing that considerably
> changes the device info, and the copying all of that data over to
> runtime info probably isn't worth it.
> 
> Should we just acknowledge that the runtime info is useless, and move
> some of that data to intel_device_info and some of it elsewhere in i915?

With newer platforms getting more and more modular, I believe we will need to store even more mutable platform information.

In my opinion a separation of immutable and mutable platform information is cleaner and easier to maintain.

> 
> 
> BR,
> Jani.
> 



More information about the Intel-gfx mailing list