Quoting Tvrtko Ursulin (2019-03-18 09:52:58) > From: Tvrtko Ursulin <tvrtko.ursu...@intel.com> > > 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.ursu...@intel.com> > Suggested-by: Chris Wilson <ch...@chris-wilson.co.uk> > Cc: Chris Wilson <ch...@chris-wilson.co.uk> > Cc: Jani Nikula <jani.nik...@intel.com> > Cc: Lucas De Marchi <lucas.demar...@intel.com> > Cc: Jose Souza <jose.so...@intel.com> > Cc: Ville Syrjälä <ville.syrj...@linux.intel.com> > Cc: Paulo Zanoni <paulo.r.zan...@intel.com> > --- > 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 <ch...@chris-wilson.co.uk> -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx