All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: Disable RCS flips on Ivybridge
@ 2014-07-08  9:40 Chris Wilson
  2014-07-08  9:40 ` [PATCH 2/2] drm/i915: Use mmio flips to change tiling mode on Baytrail Chris Wilson
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Wilson @ 2014-07-08  9:40 UTC (permalink / raw)
  To: intel-gfx

We currently see random GPU hangs when using RCS flips with multiple
pipes on Ivybridge. Now that we have mmio flips, we can fairly cheaply
fallback to using CPU driven flips instead.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_display.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index b7adb328238d..103d8f450e74 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9747,6 +9747,8 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
 
 	if (IS_VALLEYVIEW(dev)) {
 		ring = &dev_priv->ring[BCS];
+	} else if (IS_IVYBRIDGE(dev)) {
+		ring = &dev_priv->ring[BCS];
 	} else if (INTEL_INFO(dev)->gen >= 7) {
 		ring = obj->ring;
 		if (ring == NULL || ring->id != RCS)
-- 
2.0.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] drm/i915: Use mmio flips to change tiling mode on Baytrail
  2014-07-08  9:40 [PATCH 1/2] drm/i915: Disable RCS flips on Ivybridge Chris Wilson
@ 2014-07-08  9:40 ` Chris Wilson
  2014-07-08 11:16   ` Daniel Vetter
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Wilson @ 2014-07-08  9:40 UTC (permalink / raw)
  To: intel-gfx

For whatever reason, MI_DISPLAY_FLIP fails to change tiling mode on
Baytrail, so just use CPU driven mmio flips instead.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76176
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_display.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 103d8f450e74..8a9695697380 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9453,6 +9453,9 @@ static bool use_mmio_flip(struct intel_engine_cs *ring,
 	 * So using MMIO flips there would disrupt this mechanism.
 	 */
 
+	if (ring == NULL)
+		return true;
+
 	if (INTEL_INFO(ring->dev)->gen < 5)
 		return false;
 
@@ -9747,6 +9750,9 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
 
 	if (IS_VALLEYVIEW(dev)) {
 		ring = &dev_priv->ring[BCS];
+		if (obj->tiling_mode != work->old_fb_obj->tiling_mode)
+			/* vlv: DISPLAY_FLIP fails to change tiling */
+			ring = NULL;
 	} else if (IS_IVYBRIDGE(dev)) {
 		ring = &dev_priv->ring[BCS];
 	} else if (INTEL_INFO(dev)->gen >= 7) {
-- 
2.0.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] drm/i915: Use mmio flips to change tiling mode on Baytrail
  2014-07-08  9:40 ` [PATCH 2/2] drm/i915: Use mmio flips to change tiling mode on Baytrail Chris Wilson
@ 2014-07-08 11:16   ` Daniel Vetter
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2014-07-08 11:16 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

On Tue, Jul 08, 2014 at 10:40:30AM +0100, Chris Wilson wrote:
> For whatever reason, MI_DISPLAY_FLIP fails to change tiling mode on
> Baytrail, so just use CPU driven mmio flips instead.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76176
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Both merged to dinq with the bz link for the first patch added.
-Daniel

> ---
>  drivers/gpu/drm/i915/intel_display.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 103d8f450e74..8a9695697380 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -9453,6 +9453,9 @@ static bool use_mmio_flip(struct intel_engine_cs *ring,
>  	 * So using MMIO flips there would disrupt this mechanism.
>  	 */
>  
> +	if (ring == NULL)
> +		return true;
> +
>  	if (INTEL_INFO(ring->dev)->gen < 5)
>  		return false;
>  
> @@ -9747,6 +9750,9 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
>  
>  	if (IS_VALLEYVIEW(dev)) {
>  		ring = &dev_priv->ring[BCS];
> +		if (obj->tiling_mode != work->old_fb_obj->tiling_mode)
> +			/* vlv: DISPLAY_FLIP fails to change tiling */
> +			ring = NULL;
>  	} else if (IS_IVYBRIDGE(dev)) {
>  		ring = &dev_priv->ring[BCS];
>  	} else if (INTEL_INFO(dev)->gen >= 7) {
> -- 
> 2.0.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-08 11:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-08  9:40 [PATCH 1/2] drm/i915: Disable RCS flips on Ivybridge Chris Wilson
2014-07-08  9:40 ` [PATCH 2/2] drm/i915: Use mmio flips to change tiling mode on Baytrail Chris Wilson
2014-07-08 11:16   ` Daniel Vetter

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.