From: Daniel Vetter <daniel@ffwll.ch>
To: ville.syrjala@linux.intel.com
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 4/4] drm/i915: Use the g4x+ approach on gen2 for handling display stuff around GPU reset
Date: Fri, 5 Aug 2016 22:43:34 +0200 [thread overview]
Message-ID: <20160805204334.GS6232@phenom.ffwll.local> (raw)
In-Reply-To: <1470428910-12125-5-git-send-email-ville.syrjala@linux.intel.com>
On Fri, Aug 05, 2016 at 11:28:30PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> We don't have GPU reset support for gen2, which means the display
> hardware is unaffected when a GPU hang is handled. However as the ring
> has in fact stopped, any flips still in the ring will never complete,
> and thus the display base address updates will never happen. So we
> really need to fix that up manually just like we do on g4x+.
>
> In fact, let's just use intel_has_gpu_reset() instead of IS_GEN2()
> since that'll also handle cases where someone would disable the GPU
> reset support on gen3/4 for whatever reason.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/i915/intel_display.c | 11 ++---------
> 1 file changed, 2 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 632739f9cc44..74375ec651e5 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -3137,7 +3137,8 @@ __intel_display_resume(struct drm_device *dev,
>
> static bool gpu_reset_clobbers_display(struct drm_i915_private *dev_priv)
> {
> - return INTEL_GEN(dev_priv) < 5 && !IS_G4X(dev_priv);
> + return intel_has_gpu_reset(dev_priv) &&
> + INTEL_GEN(dev_priv) < 5 && !IS_G4X(dev_priv);
> }
>
> void intel_prepare_reset(struct drm_i915_private *dev_priv)
> @@ -3147,10 +3148,6 @@ void intel_prepare_reset(struct drm_i915_private *dev_priv)
> struct drm_atomic_state *state;
> int ret;
>
> - /* no reset support for gen2 */
> - if (IS_GEN2(dev_priv))
> - return;
> -
> /*
> * Need mode_config.mutex so that we don't
> * trample ongoing ->detect() and whatnot.
> @@ -3210,10 +3207,6 @@ void intel_finish_reset(struct drm_i915_private *dev_priv)
> */
> intel_complete_page_flips(dev_priv);
>
> - /* no reset support for gen2 */
> - if (IS_GEN2(dev_priv))
> - return;
> -
> dev_priv->modeset_restore_state = NULL;
>
> /* reset doesn't touch the display */
> --
> 2.7.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-08-05 20:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-05 20:28 [PATCH 0/4] drm/i915: Maarten's pre-g4x GPU reset regression fix + other reset stuff ville.syrjala
2016-08-05 20:28 ` [PATCH v5 1/4] drm/i915: Fix modeset handling during gpu reset, v5 ville.syrjala
2016-08-08 7:52 ` Maarten Lankhorst
2016-08-08 7:52 ` Maarten Lankhorst
2016-08-08 8:05 ` Ville Syrjälä
2016-08-08 8:05 ` Ville Syrjälä
2016-08-08 8:40 ` Maarten Lankhorst
2016-08-08 8:57 ` Ville Syrjälä
2016-08-08 9:08 ` Maarten Lankhorst
2016-08-08 11:13 ` Ville Syrjälä
2016-08-05 20:28 ` [PATCH v2 2/4] drm/i915: Add a way to test the modeset done during gpu reset, v3 ville.syrjala
2016-08-05 20:28 ` [PATCH 3/4] drm/i915: Introduce gpu_reset_clobbers_display() ville.syrjala
2016-08-05 20:42 ` Daniel Vetter
2016-08-05 20:28 ` [PATCH 4/4] drm/i915: Use the g4x+ approach on gen2 for handling display stuff around GPU reset ville.syrjala
2016-08-05 20:43 ` Daniel Vetter [this message]
2016-08-06 8:45 ` ✗ Ro.CI.BAT: failure for drm/i915: Maarten's pre-g4x GPU reset regression fix + other reset stuff Patchwork
2016-08-09 5:46 ` Ville Syrjälä
2016-08-09 15:07 ` [PATCH 0/4] " Ville Syrjälä
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=20160805204334.GS6232@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@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.