diff mbox series

[v2,10/22] drm/i915/guc: Always ask GuC to update power domain states

Message ID 20190411084436.24384-11-michal.wajdeczko@intel.com (mailing list archive)
State New, archived
Headers show
Series GuC 32.0.3 | expand

Commit Message

Michal Wajdeczko April 11, 2019, 8:44 a.m. UTC
With newer GuC firmware it is always ok to ask GuC to update power
domain states. Make it an unconditional initialization step.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: John Spotswood <john.a.spotswood@intel.com>
---
 drivers/gpu/drm/i915/intel_guc_submission.c | 4 ----
 drivers/gpu/drm/i915/intel_uc.c             | 8 ++++----
 2 files changed, 4 insertions(+), 8 deletions(-)

Comments

Daniele Ceraolo Spurio April 15, 2019, 8:46 p.m. UTC | #1
On 4/11/19 1:44 AM, Michal Wajdeczko wrote:
> With newer GuC firmware it is always ok to ask GuC to update power
> domain states. Make it an unconditional initialization step.
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Cc: John Spotswood <john.a.spotswood@intel.com>

Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>

Daniele

> ---
>   drivers/gpu/drm/i915/intel_guc_submission.c | 4 ----
>   drivers/gpu/drm/i915/intel_uc.c             | 8 ++++----
>   2 files changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/intel_guc_submission.c
> index dea87253d141..856505dbbe91 100644
> --- a/drivers/gpu/drm/i915/intel_guc_submission.c
> +++ b/drivers/gpu/drm/i915/intel_guc_submission.c
> @@ -1319,10 +1319,6 @@ int intel_guc_submission_enable(struct intel_guc *guc)
>   
>   	GEM_BUG_ON(!guc->execbuf_client);
>   
> -	err = intel_guc_sample_forcewake(guc);
> -	if (err)
> -		return err;
> -
>   	err = guc_clients_enable(guc);
>   	if (err)
>   		return err;
> diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
> index 21310b917ccc..8e5e4226df53 100644
> --- a/drivers/gpu/drm/i915/intel_uc.c
> +++ b/drivers/gpu/drm/i915/intel_uc.c
> @@ -405,14 +405,14 @@ int intel_uc_init_hw(struct drm_i915_private *i915)
>   			goto err_communication;
>   	}
>   
> +	ret = intel_guc_sample_forcewake(guc);
> +	if (ret)
> +		goto err_communication;
> +
>   	if (USES_GUC_SUBMISSION(i915)) {
>   		ret = intel_guc_submission_enable(guc);
>   		if (ret)
>   			goto err_communication;
> -	} else if (INTEL_GEN(i915) < 11) {
> -		ret = intel_guc_sample_forcewake(guc);
> -		if (ret)
> -			goto err_communication;
>   	}
>   
>   	dev_info(i915->drm.dev, "GuC firmware version %u.%u\n",
>
John Spotswood April 16, 2019, 11:26 p.m. UTC | #2
On Mon, 2019-04-15 at 13:46 -0700, Ceraolo Spurio, Daniele wrote:
> 
> On 4/11/19 1:44 AM, Michal Wajdeczko wrote:
> > 
> > With newer GuC firmware it is always ok to ask GuC to update power
> > domain states. Make it an unconditional initialization step.
> > 
> > Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> > Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> > Cc: John Spotswood <john.a.spotswood@intel.com>
> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> 
> Daniele

Reviewed-by: John Spotswood <john.a.spotswood@intel.com>

> 
> > 
> > ---
> >   drivers/gpu/drm/i915/intel_guc_submission.c | 4 ----
> >   drivers/gpu/drm/i915/intel_uc.c             | 8 ++++----
> >   2 files changed, 4 insertions(+), 8 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c
> > b/drivers/gpu/drm/i915/intel_guc_submission.c
> > index dea87253d141..856505dbbe91 100644
> > --- a/drivers/gpu/drm/i915/intel_guc_submission.c
> > +++ b/drivers/gpu/drm/i915/intel_guc_submission.c
> > @@ -1319,10 +1319,6 @@ int intel_guc_submission_enable(struct
> > intel_guc *guc)
> >   
> >   	GEM_BUG_ON(!guc->execbuf_client);
> >   
> > -	err = intel_guc_sample_forcewake(guc);
> > -	if (err)
> > -		return err;
> > -
> >   	err = guc_clients_enable(guc);
> >   	if (err)
> >   		return err;
> > diff --git a/drivers/gpu/drm/i915/intel_uc.c
> > b/drivers/gpu/drm/i915/intel_uc.c
> > index 21310b917ccc..8e5e4226df53 100644
> > --- a/drivers/gpu/drm/i915/intel_uc.c
> > +++ b/drivers/gpu/drm/i915/intel_uc.c
> > @@ -405,14 +405,14 @@ int intel_uc_init_hw(struct drm_i915_private
> > *i915)
> >   			goto err_communication;
> >   	}
> >   
> > +	ret = intel_guc_sample_forcewake(guc);
> > +	if (ret)
> > +		goto err_communication;
> > +
> >   	if (USES_GUC_SUBMISSION(i915)) {
> >   		ret = intel_guc_submission_enable(guc);
> >   		if (ret)
> >   			goto err_communication;
> > -	} else if (INTEL_GEN(i915) < 11) {
> > -		ret = intel_guc_sample_forcewake(guc);
> > -		if (ret)
> > -			goto err_communication;
> >   	}
> >   
> >   	dev_info(i915->drm.dev, "GuC firmware version %u.%u\n",
> >
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/intel_guc_submission.c
index dea87253d141..856505dbbe91 100644
--- a/drivers/gpu/drm/i915/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/intel_guc_submission.c
@@ -1319,10 +1319,6 @@  int intel_guc_submission_enable(struct intel_guc *guc)
 
 	GEM_BUG_ON(!guc->execbuf_client);
 
-	err = intel_guc_sample_forcewake(guc);
-	if (err)
-		return err;
-
 	err = guc_clients_enable(guc);
 	if (err)
 		return err;
diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
index 21310b917ccc..8e5e4226df53 100644
--- a/drivers/gpu/drm/i915/intel_uc.c
+++ b/drivers/gpu/drm/i915/intel_uc.c
@@ -405,14 +405,14 @@  int intel_uc_init_hw(struct drm_i915_private *i915)
 			goto err_communication;
 	}
 
+	ret = intel_guc_sample_forcewake(guc);
+	if (ret)
+		goto err_communication;
+
 	if (USES_GUC_SUBMISSION(i915)) {
 		ret = intel_guc_submission_enable(guc);
 		if (ret)
 			goto err_communication;
-	} else if (INTEL_GEN(i915) < 11) {
-		ret = intel_guc_sample_forcewake(guc);
-		if (ret)
-			goto err_communication;
 	}
 
 	dev_info(i915->drm.dev, "GuC firmware version %u.%u\n",