Re: [PATCH 3/3] drm/i915: Introduce concept of a sub-platform

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Tvrtko Ursulin (2019-03-18 09:52:58)
> From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> 
> Concept of a sub-platform already exist in our code (like ULX and ULT
> platform variants and similar),implemented via the macros which check a
> list of device ids to determine a match.
> 
> With this patch we consolidate device ids checking into a single function
> called during early driver load.
> 
> A few low bits in the platform mask are reserved for sub-platform
> identification and defined as a per-platform namespace.
> 
> At the same time it future proofs the platform_mask handling by preparing
> the code for easy extending, and tidies the very verbose WARN strings
> generated when IS_PLATFORM macros are embedded into a WARN type
> statements.
> 
> v2: Fixed IS_SUBPLATFORM. Updated commit msg.
> v3: Chris was right, there is an ordering problem.
> 
> v4:
>  * Catch-up with new sub-platforms.
>  * Rebase for RUNTIME_INFO.
>  * Drop subplatform mask union tricks and convert platform_mask to an
>    array for extensibility.
> 
> v5:
>  * Fix subplatform check.
>  * Protect against forgetting to expand subplatform bits.
>  * Remove platform enum tallying.
>  * Add subplatform to error state. (Chris)
>  * Drop macros and just use static inlines.
>  * Remove redundant IRONLAKE_M. (Ville)
> 
> v6:
>  * Split out Ironlake change.
>  * Optimize subplatform check.
>  * Use __always_inline. (Lucas)
>  * Add platform_mask comment. (Paulo)
>  * Pass stored runtime info in error capture. (Chris)
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> Suggested-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Jani Nikula <jani.nikula@xxxxxxxxx>
> Cc: Lucas De Marchi <lucas.demarchi@xxxxxxxxx>
> Cc: Jose Souza <jose.souza@xxxxxxxxx>
> Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> Cc: Paulo Zanoni <paulo.r.zanoni@xxxxxxxxx>
> ---
> The main question here is whether the subplatform concept is an
> improvement with regards to cleaning up where we sprinkle device ids
> both in the source and during runtime checks.

I am strongly in favour of avoiding device-id checks, and much prefer
that we generalise into feature tests; subplatform looks like an easy
step forward.

The doubt is over whether or not we want to open-code bitmap.h. The
clear advantage of doing so (for what are a couple of small routines) is
that we avoid spilling out-of-line as soon as we hit the next boundary
on platform types. Plus it also ties into our desire for single sku dce.

So I think for those 2 reasons, having the bit test opencoded is sane.

Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux