Skip to contentSkip to conversation

drm/i915: Make g4x_fixup_plane() operational again

PATCH Superseded [email protected] 2 participants 4 messages Jun 7, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Make g4x_fixup_plane() operational again

From: Ville Syrjälä <[email protected]>

Don't enable the cursor until g4x_fixup_plane() had a chance to do cast its magic spell.

Egbert writes:
"Today I had the chance to test this. First I tried
if I can still reproduce the blank with this patch added when I disable my voodoo g4x_fixup_plane():
It turned out it still happens however very rarely (like 1 out of 20 tries). When I reenabled my voodoo the issue still occurred.
I had to switch two lines around, ie:

         intel_enable_plane(dev_priv, plane, pipe);
         if (IS_G4X(dev))
                 g4x_fixup_plane(dev_priv, pipe);

+ intel_crtc_update_cursor(crtc, true);

to avoid the blank screen issue - which is it didn't happen in ~75 tries."

---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +1 -1
index b9b8ca0..eb95b5e 100644
@@ -3697,9 +3697,9 @@ static void i9xx_crtc_enable(struct drm_crtc *crtc)
 	intel_enable_pipe(dev_priv, pipe, false);
 	intel_enable_plane(dev_priv, plane, pipe);
 	intel_enable_planes(crtc);
-	intel_crtc_update_cursor(crtc, true);
 	if (IS_G4X(dev))
 		g4x_fixup_plane(dev_priv, pipe);
+	intel_crtc_update_cursor(crtc, true);
 
 	/* Give the overlay scaler a chance to enable if it's on this pipe */
 	intel_crtc_dpms_overlay(intel_crtc, true);
Signature · 6 lines
1.8.1.5

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 17 lines · On Fri, Jun 7, 2013 at 11:41 AM, <[email protected]> wrote:

From: Ville Syrjälä <[email protected]>

Don't enable the cursor until g4x_fixup_plane() had a chance to do cast its magic spell.

Egbert writes:
"Today I had the chance to test this. First I tried
if I can still reproduce the blank with this patch added when I disable my voodoo g4x_fixup_plane():
It turned out it still happens however very rarely (like 1 out of 20 tries). When I reenabled my voodoo the issue still occurred.
I had to switch two lines around, ie:

         intel_enable_plane(dev_priv, plane, pipe);
         if (IS_G4X(dev))
                 g4x_fixup_plane(dev_priv, pipe);
Quoted 7 lines

+ intel_crtc_update_cursor(crtc, true);

to avoid the blank screen issue - which is it didn't happen in ~75 tries."

Can you please add a comment in the code so that we don't do the same mistake again?
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

#2 lore raw

PATCH v2 1/1 drm/i915: Make g4x_fixup_plane() operational again

From: Ville Syrjälä <[email protected]>

Don't enable the cursor until g4x_fixup_plane() had a chance to do cast its magic spell.

Egbert writes:
"Today I had the chance to test this. First I tried
if I can still reproduce the blank with this patch added when I disable my voodoo g4x_fixup_plane():
It turned out it still happens however very rarely (like 1 out of 20 tries). When I reenabled my voodoo the issue still occurred.
I had to switch two lines around, ie:

         intel_enable_plane(dev_priv, plane, pipe);
         if (IS_G4X(dev))
                 g4x_fixup_plane(dev_priv, pipe);

+ intel_crtc_update_cursor(crtc, true);

to avoid the blank screen issue - which is it didn't happen in ~75 tries."

v2: Add a comment to remind people of the ordering constraints

---
 drivers/gpu/drm/i915/intel_display.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +2 -1
index 92fd0d4..338559b 100644
@@ -3700,9 +3700,10 @@ static void i9xx_crtc_enable(struct drm_crtc *crtc)
 	intel_enable_pipe(dev_priv, pipe, false);
 	intel_enable_plane(dev_priv, plane, pipe);
 	intel_enable_planes(crtc);
-	intel_crtc_update_cursor(crtc, true);
+	/* The fixup needs to happen before cursor is enabled */
 	if (IS_G4X(dev))
 		g4x_fixup_plane(dev_priv, pipe);
+	intel_crtc_update_cursor(crtc, true);
 
 	/* Give the overlay scaler a chance to enable if it's on this pipe */
 	intel_crtc_dpms_overlay(intel_crtc, true);
Signature · 6 lines
1.8.1.5

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw
Quoted 19 lines · On Fri, Jun 07, 2013 at 06:52:24PM +0300, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Don't enable the cursor until g4x_fixup_plane() had a chance to do cast its magic spell.

Egbert writes:
"Today I had the chance to test this. First I tried
if I can still reproduce the blank with this patch added when I disable my voodoo g4x_fixup_plane():
It turned out it still happens however very rarely (like 1 out of 20 tries). When I reenabled my voodoo the issue still occurred.
I had to switch two lines around, ie:

         intel_enable_plane(dev_priv, plane, pipe);
         if (IS_G4X(dev))
                 g4x_fixup_plane(dev_priv, pipe);

+ intel_crtc_update_cursor(crtc, true);

Quoted 7 lines

to avoid the blank screen issue - which is it didn't happen in ~75 tries."

v2: Add a comment to remind people of the ordering constraints

Queued for -next, thanks for the patch.
-Daniel

Quoted 27 lines
---
 drivers/gpu/drm/i915/intel_display.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +2 -1
index 92fd0d4..338559b 100644
@@ -3700,9 +3700,10 @@ static void i9xx_crtc_enable(struct drm_crtc *crtc)
 	intel_enable_pipe(dev_priv, pipe, false);
 	intel_enable_plane(dev_priv, plane, pipe);
 	intel_enable_planes(crtc);
-	intel_crtc_update_cursor(crtc, true);
+	/* The fixup needs to happen before cursor is enabled */
 	if (IS_G4X(dev))
 		g4x_fixup_plane(dev_priv, pipe);
+	intel_crtc_update_cursor(crtc, true);
 
 	/* Give the overlay scaler a chance to enable if it's on this pipe */
 	intel_crtc_dpms_overlay(intel_crtc, true);
Signature · 6 lines
1.8.1.5

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch