[Intel-gfx] [RFC v3] drm/i915: Eliminate devid sprinkle

Jani Nikula jani.nikula at intel.com
Mon Feb 26 16:08:25 UTC 2018


On Mon, 26 Feb 2018, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> Quoting Jani Nikula (2018-02-26 14:00:37)
>> On Thu, 22 Feb 2018, Tvrtko Ursulin <tursulin at ursulin.net> wrote:
>> > From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
>> >
>> > Introduce subplatform mask to eliminate throughout the code devid checking
>> > sprinkle, mostly courtesy of IS_*_UL[TX] macros.
>> >
>> > Subplatform mask initialization is moved either to static tables (Ironlake
>> > M) or runtime device info init (Pineview, Haswell, Broadwell, Skylake,
>> > Kabylake, Coffeelake and Cannonlake).
>> 
>> I thought Chris had the goal of separating runtime and static init, and
>> I very much agreed with that idea. Throw away the mkwrite stuff. This
>> patch seems to be at odds with that goal by tying a runtime init into
>> the same mask with statically initialized platform mask.
>
> Yes.
>
> In the extreme version of single platform LTO, we would bake one
> device-info stanza for every subplatform. That may be a little overkill
> (or rather too complicated for the user to know and too fine-grained to
> be useful). So the middle ground is that we have subplatform in the
> runtime_info, and the compiler has to do two loads. We can still benefit
> from using BIT() though.

Well, let's not conflate platform and subplatform into the same mask in
the same info for the short-term benefit, then?

And with that, I think we could go towards:

#define IS_BWD_ULT(dev_priv) (IS_BROADWELL(dev_priv) && IS_ULT(dev_priv))

where the IS_ULT would just check the subplatform mask.

I am not convinced it's worth overloading the subplatform bits.

BR,
Jani.


-- 
Jani Nikula, Intel Open Source Technology Center


More information about the Intel-gfx mailing list