[Intel-gfx] [PATCH 4/5] drm/i915/guc: Init send_mutex in intel_uc_init()

Chris Wilson chris at chris-wilson.co.uk
Thu Nov 24 17:12:46 UTC 2016


On Thu, Nov 24, 2016 at 05:13:22PM +0100, Arkadiusz Hiler wrote:
> send_mutex is used to serialise communication with GuC via
> intel_guc_send().
> 
> Since functions that utilize it are no longer limited to submission,
> initialization should be handled as a part of general setup.
> 
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Michal Winiarski <michal.winiarski at intel.com>
> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler at intel.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.c            | 1 +
>  drivers/gpu/drm/i915/i915_guc_submission.c | 1 -
>  drivers/gpu/drm/i915/intel_uc.c            | 5 +++++
>  drivers/gpu/drm/i915/intel_uc.h            | 1 +
>  4 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index b893e67..21d61dc 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -603,6 +603,7 @@ static int i915_load_modeset_init(struct drm_device *dev)
>  	if (ret)
>  		goto cleanup_irq;
>  
> +	intel_uc_init(dev_priv);
>  	intel_guc_init(dev);

Probably wants to be in i915_driver_init_early() or i915_driver_init_mmio().
My preferences would be i915_driver_init_early(). (So call it
intel_uc_init_early()).

With that minor change,
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list