diff mbox

drm/i915: Notify GuC rc6 state

Message ID 1439933687-22326-1-git-send-email-yu.dai@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

yu.dai@intel.com Aug. 18, 2015, 9:34 p.m. UTC
From: Alex Dai <yu.dai@intel.com>

If rc6 is enabled, notify GuC so it can do proper forcewake before
command submission.

Signed-off-by: Alex Dai <yu.dai@intel.com>
---
 drivers/gpu/drm/i915/i915_guc_submission.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Comments

Tom.O'Rourke@intel.com Aug. 27, 2015, 7:47 p.m. UTC | #1
On Tue, Aug 18, 2015 at 02:34:47PM -0700, yu.dai@intel.com wrote:
> From: Alex Dai <yu.dai@intel.com>
> 
> If rc6 is enabled, notify GuC so it can do proper forcewake before
> command submission.
> 
> Signed-off-by: Alex Dai <yu.dai@intel.com>

Reviewed-by: Tom O'Rourke <Tom.O'Rourke@intel.com>

> ---
>  drivers/gpu/drm/i915/i915_guc_submission.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
> index ec70393..792d0b9 100644
> --- a/drivers/gpu/drm/i915/i915_guc_submission.c
> +++ b/drivers/gpu/drm/i915/i915_guc_submission.c
> @@ -151,6 +151,18 @@ static int host2guc_release_doorbell(struct intel_guc *guc,
>  	return host2guc_action(guc, data, 2);
>  }
>  
> +static int host2guc_sample_forcewake(struct intel_guc *guc,
> +				     struct i915_guc_client *client)
> +{
> +	struct drm_i915_private *dev_priv = guc_to_i915(guc);
> +	u32 data[2];
> +
> +	data[0] = HOST2GUC_ACTION_SAMPLE_FORCEWAKE;
> +	data[1] = (intel_enable_rc6(dev_priv->dev)) ? 1 : 0;
> +
> +	return host2guc_action(guc, data, 2);
> +}
> +
>  /*
>   * Initialise, update, or clear doorbell data shared with the GuC
>   *
> @@ -874,6 +886,9 @@ int i915_guc_submission_enable(struct drm_device *dev)
>  	}
>  
>  	guc->execbuf_client = client;
> +
> +	host2guc_sample_forcewake(guc, client);
> +
>  	return 0;
>  }
>  
> -- 
> 1.9.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Daniel Vetter Sept. 2, 2015, 7:56 a.m. UTC | #2
On Thu, Aug 27, 2015 at 12:47:30PM -0700, O'Rourke, Tom wrote:
> On Tue, Aug 18, 2015 at 02:34:47PM -0700, yu.dai@intel.com wrote:
> > From: Alex Dai <yu.dai@intel.com>
> > 
> > If rc6 is enabled, notify GuC so it can do proper forcewake before
> > command submission.
> > 
> > Signed-off-by: Alex Dai <yu.dai@intel.com>
> 
> Reviewed-by: Tom O'Rourke <Tom.O'Rourke@intel.com>

Queued for -next, thanks for the patch.
-Daniel
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
index ec70393..792d0b9 100644
--- a/drivers/gpu/drm/i915/i915_guc_submission.c
+++ b/drivers/gpu/drm/i915/i915_guc_submission.c
@@ -151,6 +151,18 @@  static int host2guc_release_doorbell(struct intel_guc *guc,
 	return host2guc_action(guc, data, 2);
 }
 
+static int host2guc_sample_forcewake(struct intel_guc *guc,
+				     struct i915_guc_client *client)
+{
+	struct drm_i915_private *dev_priv = guc_to_i915(guc);
+	u32 data[2];
+
+	data[0] = HOST2GUC_ACTION_SAMPLE_FORCEWAKE;
+	data[1] = (intel_enable_rc6(dev_priv->dev)) ? 1 : 0;
+
+	return host2guc_action(guc, data, 2);
+}
+
 /*
  * Initialise, update, or clear doorbell data shared with the GuC
  *
@@ -874,6 +886,9 @@  int i915_guc_submission_enable(struct drm_device *dev)
 	}
 
 	guc->execbuf_client = client;
+
+	host2guc_sample_forcewake(guc, client);
+
 	return 0;
 }