[Intel-gfx] [PATCH 1/3] drm/i915/csr: keep firmware name and required version together

Jani Nikula jani.nikula at intel.com
Thu Sep 6 09:20:56 UTC 2018


On Thu, 06 Sep 2018, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> Quoting Jani Nikula (2018-09-06 09:21:24)
>> Having two separate if ladders gets increasingly hard to maintain. Put
>> them together.
>
> Does it even have to be an if-ladder? Something like
> struct platform_requirements {
> 	unsigned long platform_mask;
> 	u32 required_version;
> 	const char *path;
> } [];
>
> How does that work by patch 3?

I expect this to evolve to the same kind of thing as the PCH detection
and checks where you can't get away with a simple platform mask, and you
have to resort to an if ladder. Or you need separate match functions,
which get unwieldy without lambda functions.

Also, I think we may need to have several firmware blobs per platform
that get requested in sequence, to allow for more graceful updates. In
any case, I think grouping this stuff together is a good first step.


BR,
Jani.


-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the Intel-gfx mailing list