[Intel-gfx] [PATCH v2] drm/i915/guc: Make intel_guc_send a function pointer
Michal Wajdeczko
michal.wajdeczko at intel.com
Wed Mar 1 18:33:52 UTC 2017
On Tue, Feb 07, 2017 at 01:20:35AM -0800, Oscar Mateo wrote:
> From: Michal Wajdeczko <michal.wajdeczko at intel.com>
>
> Prepare for an alternate GuC communication interface.
>
> v2: Make a few functions static and name them correctly while we are at it (Oscar)
> v3: Leave an intel_guc_send_mmio interface for users that require old-style communication
>
> Signed-off-by: Michel Thierry <michel.thierry at intel.com>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
> Signed-off-by: Oscar Mateo <oscar.mateo at intel.com>
> ---
> drivers/gpu/drm/i915/intel_uc.c | 25 +++++++++++++++----------
> drivers/gpu/drm/i915/intel_uc.h | 10 +++++++++-
> 2 files changed, 24 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
> index c46bc85..2fa70a9 100644
> --- a/drivers/gpu/drm/i915/intel_uc.c
> +++ b/drivers/gpu/drm/i915/intel_uc.c
<snip>
> @@ -98,6 +96,14 @@ int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len)
> return ret;
> }
>
> +void intel_uc_init_early(struct drm_i915_private *dev_priv)
> +{
> + struct intel_guc *guc = &dev_priv->guc;
> +
> + mutex_init(&guc->send_mutex);
> + guc->send = intel_guc_send_mmio;
> +}
> +
As intel_guc_send_mmio() is again public, there is no need to move
intel_uc_init_early() down to this place, it can stay at the top
of the file.
-Michal
More information about the Intel-gfx
mailing list