[Intel-gfx] [RFC 4/7] drm/i915: Remove mkwrite_device_info
Chris Wilson
chris at chris-wilson.co.uk
Tue Nov 13 17:40:01 UTC 2018
Quoting Tvrtko Ursulin (2018-11-13 17:33:38)
>
> On 13/11/2018 11:51, Chris Wilson wrote:
> > Quoting Jani Nikula (2018-11-13 11:45:02)
> >> On Mon, 12 Nov 2018, Tvrtko Ursulin <tvrtko.ursulin at linux.intel.com> wrote:
> >>> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> >>>
> >>> Now that we are down to one caller, which does not even modify copied
> >>> device info, we can remove the mkwrite_device_info helper and convert the
> >>> device info pointer itself to be a pointer to static table instead of a
> >>> copy.
> >>>
> >>> Only unfortnate thing is that we need to convert all callsites which were
> >>> referencing the device info directly to using the INTEL_INFO helper.
> >>
> >> I'm not sure if that's all that bad. When I was toying around with
> >> mkwrite_device_info removal, I actually started off with changing all
> >> device info references to INTEL_INFO. It's a big patch, but it nicely
> >> centralizes many of the other changes instead of splattering all over
> >> the place.
> >
> > Fwiw, replacing all the static i915->info accesses with INTEL_INFO (or
> > DEVICE_INFO since STATIC_INFO I think is too confusing with C, and
> > INTEL_INFO is not distinct enough from RUNTIME_INFO) is perhaps a
>
> You propose DEVICE_INFO for the static part and RUNTIME_INFO for
> dynamic, all with INTEL_ prefix?
INTEL_DEVICE_INFO()
INTEL_RUNTIME_INFO()
is getting unwieldy?
I just used DEVICE_INFO() and RUNTIME_INFO(). Although, there aren't
that many direct users of INTEL_*_INFO() so I guess it's not that bad,
and any that are, merit a shorter helper.
-Chris
More information about the Intel-gfx
mailing list