All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915: Reorder media/render reset on g4x
Date: Wed, 17 May 2017 13:05:40 +0100	[thread overview]
Message-ID: <20170517120540.GO26693@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <8737c4gbwm.fsf@gaia.fi.intel.com>

On Tue, May 16, 2017 at 04:38:01PM +0300, Mika Kuoppala wrote:
> Chris Wilson <chris@chris-wilson.co.uk> writes:
> 
> > Ville found a reference to WaMediaResetBeforeFullReset which we presume
> > means that we should simply do the media reset first.
> 
> Yesterday I reordered the resets but I recall it didnt help.
> I will retry but regardless yeah resetting media first makes
> sense.
> 
> >
> > References: https://bugs.freedesktop.org/show_bug.cgi?id=100942
> > Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Cc: Mika Kuoppala <mika.kuoppala@intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_uncore.c | 12 ++++++------
> >  1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
> > index fc3da0a6fdbb..c3d0d81b50e4 100644
> > --- a/drivers/gpu/drm/i915/intel_uncore.c
> > +++ b/drivers/gpu/drm/i915/intel_uncore.c
> > @@ -1504,12 +1504,6 @@ static int g4x_do_reset(struct drm_i915_private *dev_priv, unsigned engine_mask)
> >  	struct pci_dev *pdev = dev_priv->drm.pdev;
> >  	int ret;
> >  
> > -	pci_write_config_byte(pdev, I915_GDRST,
> > -			      GRDOM_RENDER | GRDOM_RESET_ENABLE);
> > -	ret =  wait_for(g4x_reset_complete(pdev), 500);
> > -	if (ret)
> > -		goto out;
> > -
> >  	/* WaVcpClkGateDisableForMediaReset:ctg,elk */
> >  	I915_WRITE(VDECCLK_GATE_D, I915_READ(VDECCLK_GATE_D) | VCP_UNIT_CLOCK_GATE_DISABLE);
> >  	POSTING_READ(VDECCLK_GATE_D);
> > @@ -1517,11 +1511,17 @@ static int g4x_do_reset(struct drm_i915_private *dev_priv, unsigned engine_mask)
> >  	pci_write_config_byte(pdev, I915_GDRST,
> >  			      GRDOM_MEDIA | GRDOM_RESET_ENABLE);
> >  	ret =  wait_for(g4x_reset_complete(pdev), 500);
> > +	if (ret)
> > +		goto out;
> >
> 
> We should restore the WaVcp... state if we fail. Not that it
> was right to begin with.

Did it right in the previous patch, then promptly undid it. I was
thinking if we should just do the clock gate tweak for the whole
function, it will look slightly easier to follow.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-05-17 12:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-16 13:14 [PATCH 1/2] drm/i915: Try harder to reset the GPU Chris Wilson
2017-05-16 13:14 ` [PATCH 2/2] drm/i915: Reorder media/render reset on g4x Chris Wilson
2017-05-16 13:38   ` Mika Kuoppala
2017-05-17 11:40     ` Ville Syrjälä
2017-05-17 11:48       ` Mika Kuoppala
2017-05-17 12:05     ` Chris Wilson [this message]
2017-05-16 13:55 ` [PATCH 1/2] drm/i915: Try harder to reset the GPU Mika Kuoppala
2017-05-17 11:51   ` Chris Wilson
2017-05-16 14:16 ` ✓ Fi.CI.BAT: success for series starting with [1/2] " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170517120540.GO26693@nuc-i3427.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=mika.kuoppala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.