[Intel-gfx] [PATCH v2 4/4] drm/i915/uc: Add sanitize to to intel_uc_ops

Chris Wilson chris at chris-wilson.co.uk
Fri Jan 10 19:48:42 UTC 2020


Quoting Michal Wajdeczko (2020-01-10 16:29:30)
> uC sanitization is only meaningful if we are running with uC present
> or enabled. Make this function part of the uc_ops.
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>

Series is 
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>

> ---
>  drivers/gpu/drm/i915/gt/uc/intel_uc.c | 10 ++--------
>  drivers/gpu/drm/i915/gt/uc/intel_uc.h |  3 ++-
>  2 files changed, 4 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.c b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
> index 1b07135a8515..c1d5af775713 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_uc.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
> @@ -12,6 +12,7 @@
>  
>  #include "i915_drv.h"
>  
> +static int __uc_sanitize(struct intel_uc *uc);
>  static void __uc_fetch_firmwares(struct intel_uc *uc);
>  static void __uc_cleanup_firmwares(struct intel_uc *uc);
>  static void __uc_init(struct intel_uc *uc);
> @@ -25,6 +26,7 @@ static const struct intel_uc_ops uc_ops_off = {
>  };
>  
>  static const struct intel_uc_ops uc_ops_on = {
> +       .sanitize = __uc_sanitize,
>         .init_fw = __uc_fetch_firmwares,
>         .fini_fw = __uc_cleanup_firmwares,
>         .init = __uc_init,

The only nit is that I would use whitespace here more consistently here
to break up the phases, and I would suggest making the ops forwards
declared rather than every function.
-Chris


More information about the Intel-gfx mailing list