[Intel-gfx] [PATCH 2/5] drm/i915/guc: Introduce intel_uc_init()

Srivatsa, Anusha anusha.srivatsa at intel.com
Tue Dec 20 22:00:09 UTC 2016



>-----Original Message-----
>From: Hiler, Arkadiusz
>Sent: Thursday, December 15, 2016 7:47 AM
>To: intel-gfx at lists.freedesktop.org
>Cc: Srivatsa, Anusha <anusha.srivatsa at intel.com>; Mcgee, Jeff
><jeff.mcgee at intel.com>; Winiarski, Michal <michal.winiarski at intel.com>
>Subject: [PATCH 2/5] drm/i915/guc: Introduce intel_uc_init()
>
>We will be able to bulk call all firmware _init() function from single point and
>offset some general logic there.

Following this logic shouldn't we call intel_huc_init() as well?
Anusha

>Cc: Anusha Srivatsa <anusha.srivatsa at intel.com>
>Cc: Jeff McGee <jeff.mcgee at intel.com>
>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 | 2 +-
> drivers/gpu/drm/i915/intel_uc.c | 5 +++++  drivers/gpu/drm/i915/intel_uc.h | 1 +
> 3 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 6428588..55a5546c 100644
>--- a/drivers/gpu/drm/i915/i915_drv.c
>+++ b/drivers/gpu/drm/i915/i915_drv.c
>@@ -600,7 +600,7 @@ static int i915_load_modeset_init(struct drm_device
>*dev)
> 	if (ret)
> 		goto cleanup_irq;
>
>-	intel_guc_init(dev_priv);
>+	intel_uc_init(dev_priv);
>
> 	ret = i915_gem_init(dev_priv);
> 	if (ret)
>diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
>index 8ae6795..8eec035 100644
>--- a/drivers/gpu/drm/i915/intel_uc.c
>+++ b/drivers/gpu/drm/i915/intel_uc.c
>@@ -30,6 +30,11 @@ void intel_uc_init_early(struct drm_i915_private
>*dev_priv)
> 	mutex_init(&dev_priv->guc.send_mutex);
> }
>
>+void intel_uc_init(struct drm_i915_private *dev_priv) {
>+	intel_guc_init(dev_priv);
>+}
>+
> /*
>  * Read GuC command/status register (SOFT_SCRATCH_0)
>  * Return true if it contains a response rather than a command diff --git
>a/drivers/gpu/drm/i915/intel_uc.h b/drivers/gpu/drm/i915/intel_uc.h index
>7222e6c..ec1a5b2 100644
>--- a/drivers/gpu/drm/i915/intel_uc.h
>+++ b/drivers/gpu/drm/i915/intel_uc.h
>@@ -170,6 +170,7 @@ struct intel_guc {
>
> /* intel_uc.c */
> void intel_uc_init_early(struct drm_i915_private *dev_priv);
>+void intel_uc_init(struct drm_i915_private *dev_priv);
> bool intel_guc_recv(struct drm_i915_private *dev_priv, u32 *status);  int
>intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len);  int
>intel_guc_sample_forcewake(struct intel_guc *guc);
>--
>2.9.3



More information about the Intel-gfx mailing list