Skip to contentSkip to conversation

drm/i915: disable_shared_pll doesn't work on pre-gen5

PATCH In review Jesse Barnes 4 participants 5 messages Aug 3, 2015 – Aug 11, 2015

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

PATCH 1/1 drm/i915: disable_shared_pll doesn't work on pre-gen5

Looks like

commit eddfcbcdc27fbecb33bff098967bbdd7ca75bfa6

Author: Maarten Lankhorst <[email protected]>
Date:   Mon Jun 15 12:33:53 2015 +0200

drm/i915: Update less state during modeset.

introduced the unconditional calling of disable_shared_dpll, but didn't fix up pre-gen5 to avoid the BUG_ON at the top of the function.

So change the BUG_ON into a gen check (alternately we could move the BUG_ON until later, since we shouldn't have a pll struct here either, but this seems clearer to read).

This fixes a crash on load on my x200s platform.

---
 drivers/gpu/drm/i915/intel_display.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +3 -1
index 43b0f17..b5e79b3 100644
@@ -1936,7 +1936,9 @@ static void intel_disable_shared_dpll(struct intel_crtc *crtc)
 	struct intel_shared_dpll *pll = intel_crtc_to_shared_dpll(crtc);
 
 	/* PCH only available on ILK+ */
-	BUG_ON(INTEL_INFO(dev)->gen < 5);
+	if (INTEL_INFO(dev)->gen < 5)
+		return;
+
 	if (pll == NULL)
 		return;
 
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 1/1
#1 lore raw

Op 03-08-15 om 22:09 schreef Jesse Barnes:

Quoted 26 lines

Looks like

commit eddfcbcdc27fbecb33bff098967bbdd7ca75bfa6

Author: Maarten Lankhorst <[email protected]>
Date:   Mon Jun 15 12:33:53 2015 +0200

drm/i915: Update less state during modeset.

introduced the unconditional calling of disable_shared_dpll, but didn't fix up pre-gen5 to avoid the BUG_ON at the top of the function.

So change the BUG_ON into a gen check (alternately we could move the BUG_ON until later, since we shouldn't have a pll struct here either, but this seems clearer to read).

This fixes a crash on load on my x200s platform.

---
 drivers/gpu/drm/i915/intel_display.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +0 -0
index 43b0f17..b5e79b3 100644

drivers/gpu/drm/i915/intel_display.c static void intel_disable_shared_dpll(struct intel_crtc *crtc) · line 1944

Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +3 -1
@@ -1936,7 +1936,9 @@ static void intel_disable_shared_dpll(struct intel_crtc *crtc)
 	struct intel_shared_dpll *pll = intel_crtc_to_shared_dpll(crtc);
 
 	/* PCH only available on ILK+ */
-	BUG_ON(INTEL_INFO(dev)->gen < 5);
+	if (INTEL_INFO(dev)->gen < 5)
+		return;
+
 	if (pll == NULL)
 		return;
 

Intel test bot doesn't run on < ilk? :(
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw
In reply to Jesse Barnes
Quoted 10 lines · Jesse Barnes

Looks like

commit eddfcbcdc27fbecb33bff098967bbdd7ca75bfa6

Author: Maarten Lankhorst <[email protected]>
Date:   Mon Jun 15 12:33:53 2015 +0200

drm/i915: Update less state during modeset.

introduced the unconditional calling of disable_shared_dpll, but didn't fix up pre-gen5 to avoid the BUG_ON at the top of the function.

Quoted 7 lines

So change the BUG_ON into a gen check (alternately we could move the BUG_ON until later, since we shouldn't have a pll struct here either, but this seems clearer to read).

This fixes a crash on load on my x200s platform.

This blows up in 4.1 (a BUG_ON during boot causing a hard lockup). -Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw
Quoted 15 lines · Chris Wilson
Quoted 14 lines · Jesse Barnes

Looks like

commit eddfcbcdc27fbecb33bff098967bbdd7ca75bfa6

Author: Maarten Lankhorst <[email protected]>
Date:   Mon Jun 15 12:33:53 2015 +0200

drm/i915: Update less state during modeset.

introduced the unconditional calling of disable_shared_dpll, but didn't fix up pre-gen5 to avoid the BUG_ON at the top of the function.

So change the BUG_ON into a gen check (alternately we could move the BUG_ON until later, since we shouldn't have a pll struct here either, but this seems clearer to read).

Quoted 5 lines
Quoted 3 lines

This fixes a crash on load on my x200s platform.

This blows up in 4.1 (a BUG_ON during boot causing a hard lockup).

The reference offending commit is 4.3 only. Are you sure it's the same BUG_ON? Which machine?
-Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw
Quoted 16 lines · Daniel Vetter
Quoted 15 lines · Chris Wilson
Quoted 14 lines · Jesse Barnes

Looks like

commit eddfcbcdc27fbecb33bff098967bbdd7ca75bfa6

Author: Maarten Lankhorst <[email protected]>
Date:   Mon Jun 15 12:33:53 2015 +0200

drm/i915: Update less state during modeset.

introduced the unconditional calling of disable_shared_dpll, but didn't fix up pre-gen5 to avoid the BUG_ON at the top of the function.

So change the BUG_ON into a gen check (alternately we could move the BUG_ON until later, since we shouldn't have a pll struct here either, but this seems clearer to read).

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

This fixes a crash on load on my x200s platform.

This blows up in 4.1 (a BUG_ON during boot causing a hard lockup).

The reference offending commit is 4.3 only. Are you sure it's the same BUG_ON? Which machine?

It's entirely probably that I messed up my bisect, something about compiling a kernel a day for a couple of weeks and forgetting which step it is at...
-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx