[Intel-gfx] [PATCH] drm/i915/skl: Use correct use counters for force wakes

Damien Lespiau damien.lespiau at intel.com
Thu Sep 25 12:29:16 CEST 2014


On Thu, Sep 25, 2014 at 11:17:00AM +0100, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> 
> Write and reads following the block changed use engine specific use counters
> and unless that is matched here force wake use counting goes bad. Same
> force wake is attempted to be taken twice which leads to at least time outs.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Is it worth a v2 to have gen >= 9 here?

-- 
Damien

> ---
>  drivers/gpu/drm/i915/intel_lrc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 3048d78..4b33767 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -301,7 +301,7 @@ static void execlists_elsp_write(struct intel_engine_cs *ring,
>  	 * Instead, we do the runtime_pm_get/put when creating/destroying requests.
>  	 */
>  	spin_lock_irqsave(&dev_priv->uncore.lock, flags);
> -	if (IS_CHERRYVIEW(dev_priv->dev)) {
> +	if (IS_CHERRYVIEW(dev_priv->dev) || IS_GEN9(dev_priv->dev)) {
>  		if (dev_priv->uncore.fw_rendercount++ == 0)
>  			dev_priv->uncore.funcs.force_wake_get(dev_priv,
>  							      FORCEWAKE_RENDER);
> @@ -326,7 +326,7 @@ static void execlists_elsp_write(struct intel_engine_cs *ring,
>  
>  	/* Release Force Wakeup (see the big comment above). */
>  	spin_lock_irqsave(&dev_priv->uncore.lock, flags);
> -	if (IS_CHERRYVIEW(dev_priv->dev)) {
> +	if (IS_CHERRYVIEW(dev_priv->dev) || IS_GEN9(dev_priv->dev)) {
>  		if (--dev_priv->uncore.fw_rendercount == 0)
>  			dev_priv->uncore.funcs.force_wake_put(dev_priv,
>  							      FORCEWAKE_RENDER);
> -- 
> 2.1.0
> 



More information about the Intel-gfx mailing list