drm/i915/guc: limit forcewake to blitter domain in guc_send
diff mbox

Message ID 1490366919-34715-1-git-send-email-daniele.ceraolospurio@intel.com
State New
Headers show

Commit Message

Daniele Ceraolo Spurio March 24, 2017, 2:48 p.m. UTC
The forcewake_get call in the guc_send_mmio function was added to
avoid getting and releasing forcewake on each register access.
While this makes sense, all GuC registers are in the blitter range
so no need to wake all the wells.

Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
---
 drivers/gpu/drm/i915/intel_uc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

sagar.a.kamble@intel.com March 24, 2017, 3:42 p.m. UTC | #1
Reviewed-by: Sagar Arun Kamble <sagar.a.kamble@intel.com>

On 3/24/2017 8:18 PM, Daniele Ceraolo Spurio wrote:
> The forcewake_get call in the guc_send_mmio function was added to
> avoid getting and releasing forcewake on each register access.
> While this makes sense, all GuC registers are in the blitter range
> so no need to wake all the wells.
>
> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> ---
>   drivers/gpu/drm/i915/intel_uc.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
> index 4a872cd..e016227 100644
> --- a/drivers/gpu/drm/i915/intel_uc.c
> +++ b/drivers/gpu/drm/i915/intel_uc.c
> @@ -245,7 +245,7 @@ int intel_guc_send_mmio(struct intel_guc *guc, const u32 *action, u32 len)
>   		return -EINVAL;
>   
>   	mutex_lock(&guc->send_mutex);
> -	intel_uncore_forcewake_get(dev_priv, FORCEWAKE_ALL);
> +	intel_uncore_forcewake_get(dev_priv, FORCEWAKE_BLITTER);
>   
>   	dev_priv->guc.action_count += 1;
>   	dev_priv->guc.action_cmd = action[0];
> @@ -283,7 +283,7 @@ int intel_guc_send_mmio(struct intel_guc *guc, const u32 *action, u32 len)
>   	}
>   	dev_priv->guc.action_status = status;
>   
> -	intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
> +	intel_uncore_forcewake_put(dev_priv, FORCEWAKE_BLITTER);
>   	mutex_unlock(&guc->send_mutex);
>   
>   	return ret;
Chris Wilson March 24, 2017, 3:59 p.m. UTC | #2
On Fri, Mar 24, 2017 at 09:12:13PM +0530, Kamble, Sagar A wrote:
>    Reviewed-by: Sagar Arun Kamble [1]<sagar.a.kamble@intel.com>

and pushed.

Sagar, you might want to turn off sending html email for intel-gfx@.
-Chris

Patch
diff mbox

diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
index 4a872cd..e016227 100644
--- a/drivers/gpu/drm/i915/intel_uc.c
+++ b/drivers/gpu/drm/i915/intel_uc.c
@@ -245,7 +245,7 @@  int intel_guc_send_mmio(struct intel_guc *guc, const u32 *action, u32 len)
 		return -EINVAL;
 
 	mutex_lock(&guc->send_mutex);
-	intel_uncore_forcewake_get(dev_priv, FORCEWAKE_ALL);
+	intel_uncore_forcewake_get(dev_priv, FORCEWAKE_BLITTER);
 
 	dev_priv->guc.action_count += 1;
 	dev_priv->guc.action_cmd = action[0];
@@ -283,7 +283,7 @@  int intel_guc_send_mmio(struct intel_guc *guc, const u32 *action, u32 len)
 	}
 	dev_priv->guc.action_status = status;
 
-	intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
+	intel_uncore_forcewake_put(dev_priv, FORCEWAKE_BLITTER);
 	mutex_unlock(&guc->send_mutex);
 
 	return ret;