Patchwork [SRU,Precise] UBUNTU: SAUCE: fix i915 regression after commit 9594e7e

login
register
mail settings
Submitter Herton Ronaldo Krzesinski
Date Feb. 12, 2013, 11:19 p.m.
Message ID <1360711152-20994-1-git-send-email-herton.krzesinski@canonical.com>
Download mbox | patch
Permalink /patch/220009/
State New
Headers show

Comments

Herton Ronaldo Krzesinski - Feb. 12, 2013, 11:19 p.m.
commit 9594e7e, A backport for stable from commit
e7d841ca03b7ab668620045cd7b428eda9f41601 upstream ("drm/i915: Close race
between processing unpin task and queueing the flip"), and which came
through 3.2.36 stable update, has two issues: duplicated
intel_mark_page_flip_active calls on intel_gen4_queue_flip, and one
intel_mark_page_flip_active call missing on intel_gen6_queue_flip.

The second issue is what should be causing issues, and the problems
being reported on bug 1096966. I was able to reproduce the issue,
and bisected to the described commit on stable. This fix solved the
problem.

BugLink: http://bugs.launchpad.net/bugs/1119809
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
---
 drivers/gpu/drm/i915/intel_display.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Herton Ronaldo Krzesinski - Feb. 12, 2013, 11:22 p.m.
On Tue, Feb 12, 2013 at 09:19:12PM -0200, Herton Ronaldo Krzesinski wrote:
> commit 9594e7e, A backport for stable from commit
> e7d841ca03b7ab668620045cd7b428eda9f41601 upstream ("drm/i915: Close race
> between processing unpin task and queueing the flip"), and which came
> through 3.2.36 stable update, has two issues: duplicated
> intel_mark_page_flip_active calls on intel_gen4_queue_flip, and one
> intel_mark_page_flip_active call missing on intel_gen6_queue_flip.
> 
> The second issue is what should be causing issues, and the problems
> being reported on bug 1096966. I was able to reproduce the issue,

This is a typo, I meant bug 1119809... (please change it when commiting)
Andy Whitcroft - Feb. 13, 2013, 10:23 a.m.
On Tue, Feb 12, 2013 at 09:19:12PM -0200, Herton Ronaldo Krzesinski wrote:
> commit 9594e7e, A backport for stable from commit
> e7d841ca03b7ab668620045cd7b428eda9f41601 upstream ("drm/i915: Close race
> between processing unpin task and queueing the flip"), and which came
> through 3.2.36 stable update, has two issues: duplicated
> intel_mark_page_flip_active calls on intel_gen4_queue_flip, and one
> intel_mark_page_flip_active call missing on intel_gen6_queue_flip.
> 
> The second issue is what should be causing issues, and the problems
> being reported on bug 1096966. I was able to reproduce the issue,

This is the bug number ^^^ which needs changing on commit.

> and bisected to the described commit on stable. This fix solved the
> problem.
> 
> BugLink: http://bugs.launchpad.net/bugs/1119809
> Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 4da3c7e..ce23961 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -7155,8 +7155,6 @@ static int intel_gen4_queue_flip(struct drm_device *dev,
>  	OUT_RING(pf | pipesrc);
>  
>  	intel_mark_page_flip_active(intel_crtc);
> -
> -	intel_mark_page_flip_active(intel_crtc);
>  	ADVANCE_LP_RING();
>  	return 0;
>  
> @@ -7192,6 +7190,8 @@ static int intel_gen6_queue_flip(struct drm_device *dev,
>  	pf = I915_READ(PF_CTL(intel_crtc->pipe)) & PF_ENABLE;
>  	pipesrc = I915_READ(PIPESRC(intel_crtc->pipe)) & 0x0fff0fff;
>  	OUT_RING(pf | pipesrc);
> +
> +	intel_mark_page_flip_active(intel_crtc);
>  	ADVANCE_LP_RING();
>  	return 0;

Clear case of patch doing the wrong thing.  Doh.

Looks reasonable and the testing is good.

Acked-by: Andy Whitcroft <apw@canonical.com>

-apw
Stefan Bader - Feb. 13, 2013, 10:37 a.m.
Given positive testing and also sounding reasonable.
Luis Henriques - Feb. 13, 2013, 11:13 a.m.
Fixed the bug # in description and applied to Precise.

On Tue, Feb 12, 2013 at 09:19:12PM -0200, Herton R. Krzesinski wrote:
> commit 9594e7e, A backport for stable from commit
> e7d841ca03b7ab668620045cd7b428eda9f41601 upstream ("drm/i915: Close race
> between processing unpin task and queueing the flip"), and which came
> through 3.2.36 stable update, has two issues: duplicated
> intel_mark_page_flip_active calls on intel_gen4_queue_flip, and one
> intel_mark_page_flip_active call missing on intel_gen6_queue_flip.
> 
> The second issue is what should be causing issues, and the problems
> being reported on bug 1096966. I was able to reproduce the issue,
> and bisected to the described commit on stable. This fix solved the
> problem.
> 
> BugLink: http://bugs.launchpad.net/bugs/1119809
> Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 4da3c7e..ce23961 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -7155,8 +7155,6 @@ static int intel_gen4_queue_flip(struct drm_device *dev,
>  	OUT_RING(pf | pipesrc);
>  
>  	intel_mark_page_flip_active(intel_crtc);
> -
> -	intel_mark_page_flip_active(intel_crtc);
>  	ADVANCE_LP_RING();
>  	return 0;
>  
> @@ -7192,6 +7190,8 @@ static int intel_gen6_queue_flip(struct drm_device *dev,
>  	pf = I915_READ(PF_CTL(intel_crtc->pipe)) & PF_ENABLE;
>  	pipesrc = I915_READ(PIPESRC(intel_crtc->pipe)) & 0x0fff0fff;
>  	OUT_RING(pf | pipesrc);
> +
> +	intel_mark_page_flip_active(intel_crtc);
>  	ADVANCE_LP_RING();
>  	return 0;
>  
> -- 
> 1.7.9.5
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

Cheers,
--
Luis

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 4da3c7e..ce23961 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -7155,8 +7155,6 @@  static int intel_gen4_queue_flip(struct drm_device *dev,
 	OUT_RING(pf | pipesrc);
 
 	intel_mark_page_flip_active(intel_crtc);
-
-	intel_mark_page_flip_active(intel_crtc);
 	ADVANCE_LP_RING();
 	return 0;
 
@@ -7192,6 +7190,8 @@  static int intel_gen6_queue_flip(struct drm_device *dev,
 	pf = I915_READ(PF_CTL(intel_crtc->pipe)) & PF_ENABLE;
 	pipesrc = I915_READ(PIPESRC(intel_crtc->pipe)) & 0x0fff0fff;
 	OUT_RING(pf | pipesrc);
+
+	intel_mark_page_flip_active(intel_crtc);
 	ADVANCE_LP_RING();
 	return 0;