[Intel-gfx] [PATCH] drm/i915: Simplify has_sagv

Jani Nikula jani.nikula at intel.com
Wed Oct 24 10:13:51 UTC 2018


On Tue, 23 Oct 2018, Rodrigo Vivi <rodrigo.vivi at intel.com> wrote:
> But I thought while doing this I could consolidade it along with all
> the other has_feature cases.
>
> I believe we should either have everything as info.has_feature or everything
> as has_feature().
>
> for instance if we end up ever having 2 platforms of same gen where
> one has_sagv and the other doesn't we would have that in the platform
> definition while making us to define another codename and add it here
> or even worse if we don't have a codename available like CNL_WITH_PORT_F :/

If that is to be in device info, it doesn't require an extra codename,
it requires an extra device info with the flag.

This ties to the goal of making dev_priv->info a pointer to the static
const data in i915_pci.c i.e. making ->info truly const. There's three
categories of info:

 1) immutable device properties
 2) properties set once during probe, immutable afterwards
 3) runtime

Currently we more or less happily conflate these, along with some module
parameters too. The mkwrite_device_info() use has profilerated much
wider than it was ever intended; we need to nuke that.

We also have HAS_FOO() and IS_FOO() macros that do checks on pci id or
gen or platform or a combination of them. It's a mess, and it's not
getting better without conscious effort.

BR,
Jani.


-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the Intel-gfx mailing list