[PATCH 1/2] drm/xe/mocs: Update MOCS assertions and remove redundant checks
Lucas De Marchi
lucas.demarchi at intel.com
Fri Jun 28 20:40:36 UTC 2024
On Thu, Jun 27, 2024 at 01:37:42PM GMT, Matt Roper wrote:
>Rely more heavily on assertions to describe the MOCS programming
>invariants. CI checks these assertions and will ensure no violations
>sneak in due to programmer error, so we can remove some of the redundant
>WARN and silent return checks from non-debug builds.
>
>Also tweak/augment some of the existing assertions: there's no reason
>we'd ever want a platform not to have a MOCS 'ops' structure hooked up
>so ensure info->ops is non-NULL. Likewise, we should never have a case
>where the bspec-defined MOCS setting table is larger than the number of
>MOCS registers exposed by the hardware, so add an extra assert on those
>sizes as well.
>
>Cc: Michal Wajdeczko <michal.wajdeczko at intel.com>
>Signed-off-by: Matt Roper <matthew.d.roper at intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>
Lucas De Marchi
More information about the Intel-xe
mailing list