diff mbox

[2/8] drm/i915/guc: Create intel_guc_init_early

Message ID 1505729491-26148-2-git-send-email-sagar.a.kamble@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

sagar.a.kamble@intel.com Sept. 18, 2017, 10:11 a.m. UTC
Prepared intel_guc_init_early for GuC Specific early
initialization to be done from intel_uc_init_early.

Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@intel.com>
---
 drivers/gpu/drm/i915/intel_uc.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Comments

Michal Wajdeczko Sept. 18, 2017, 10:50 a.m. UTC | #1
On Mon, 18 Sep 2017 12:11:25 +0200, Sagar Arun Kamble  
<sagar.a.kamble@intel.com> wrote:

> Prepared intel_guc_init_early for GuC Specific early
> initialization to be done from intel_uc_init_early.
>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Michał Winiarski <michal.winiarski@intel.com>
> Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_uc.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_uc.c  
> b/drivers/gpu/drm/i915/intel_uc.c
> index 499ecf3..af4bc3b 100644
> --- a/drivers/gpu/drm/i915/intel_uc.c
> +++ b/drivers/gpu/drm/i915/intel_uc.c
> @@ -101,10 +101,8 @@ static void gen8_guc_raise_irq(struct intel_guc  
> *guc)
>  	I915_WRITE(GUC_SEND_INTERRUPT, GUC_SEND_TRIGGER);
>  }
> -void intel_uc_init_early(struct drm_i915_private *dev_priv)
> +static void intel_guc_init_early(struct intel_guc *guc)
>  {
> -	struct intel_guc *guc = &dev_priv->guc;
> -
>  	intel_guc_ct_init_early(&guc->ct);
> 	mutex_init(&guc->send_mutex);
> @@ -112,6 +110,11 @@ void intel_uc_init_early(struct drm_i915_private  
> *dev_priv)
>  	guc->notify = gen8_guc_raise_irq;
>  }
> +void intel_uc_init_early(struct drm_i915_private *dev_priv)
> +{
> +	intel_guc_init_early(&dev_priv->guc);
> +}
> +
>  static void fetch_uc_fw(struct drm_i915_private *dev_priv,
>  			struct intel_uc_fw *uc_fw)
>  {

hmm, maybe this patch can be squashed with next one as signature
of the intel_guc_init_early() is changed there again

Michal
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
index 499ecf3..af4bc3b 100644
--- a/drivers/gpu/drm/i915/intel_uc.c
+++ b/drivers/gpu/drm/i915/intel_uc.c
@@ -101,10 +101,8 @@  static void gen8_guc_raise_irq(struct intel_guc *guc)
 	I915_WRITE(GUC_SEND_INTERRUPT, GUC_SEND_TRIGGER);
 }
 
-void intel_uc_init_early(struct drm_i915_private *dev_priv)
+static void intel_guc_init_early(struct intel_guc *guc)
 {
-	struct intel_guc *guc = &dev_priv->guc;
-
 	intel_guc_ct_init_early(&guc->ct);
 
 	mutex_init(&guc->send_mutex);
@@ -112,6 +110,11 @@  void intel_uc_init_early(struct drm_i915_private *dev_priv)
 	guc->notify = gen8_guc_raise_irq;
 }
 
+void intel_uc_init_early(struct drm_i915_private *dev_priv)
+{
+	intel_guc_init_early(&dev_priv->guc);
+}
+
 static void fetch_uc_fw(struct drm_i915_private *dev_priv,
 			struct intel_uc_fw *uc_fw)
 {