Skip to contentSkip to conversation

Revert "Revert "drm/i915: revert eDP bpp clamping code changes""

PATCH In review Joseph Salisbury 4 participants 9 messages Oct 16, 2013 – Oct 31, 2013

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

cover Revert "Revert "drm/i915: revert eDP bpp clamping code changes""

Hi Daniel,

A bug was opened against the Ubuntu kernel[0]. It was found that reverting the following commit resolved this bug:

commit 657445fe8660100ad174600ebfa61536392b7624

Author: Daniel Vetter <[email protected]>
Date:   Sat May 4 10:09:18 2013 +0200

Revert "drm/i915: revert eDP bpp clamping code changes"

The regression was introduced as of v3.10-rc2 and affects a large number of end users.

I see this code has gone back and forth a few times, so I was wondering if we could get some feedback. The revert of commit 657445f was tested aginst 3.11 stable and could not be done cleanly, so I had to make some modifications. The modifications I made for 3.11 are in [PATCH 1/1]. The revert can't be done cleanly against 3.12 neither. The modifications I made for 3.11 will not work cleanly on 3.12 due to recent changes in 3.12, such as commit 7984211. However, I can create a patch specific for 3.12 if you think this is the best way to go.

Thanks,

Joe

http://pad.lv/1195483

Joseph Salisbury (1):
Revert "Revert "drm/i915: revert eDP bpp clamping code changes""

 drivers/gpu/drm/i915/intel_dp.c |   18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 Revert "Revert "drm/i915: revert eDP bpp clamping code changes""

This reverts commit 657445fe8660100ad174600ebfa61536392b7624.

---
 drivers/gpu/drm/i915/intel_dp.c |   18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +14 -4
index 26e162b..ce933ad 100644
@@ -709,10 +709,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,
 
 	/* Walk through all bpp values. Luckily they're all nicely spaced with 2
 	 * bpc in between. */
-	bpp = pipe_config->pipe_bpp;
-	if (is_edp(intel_dp) && dev_priv->vbt.edp_bpp)
-		bpp = min_t(int, bpp, dev_priv->vbt.edp_bpp);
-
+	bpp = min_t(int, 8*3, pipe_config->pipe_bpp);
 	for (; bpp >= 6*3; bpp -= 2*3) {
 		mode_rate = intel_dp_link_required(adjusted_mode->clock, bpp);
 
@@ -763,6 +760,19 @@ found:
 			       &pipe_config->dp_m_n);
 
 	intel_dp_set_clock(encoder, pipe_config, intel_dp->link_bw);
+	/*
+	 * XXX: We have a strange regression where using the vbt edp bpp value
+	 * for the link bw computation results in black screens, the panel only
+	 * works when we do the computation at the usual 24bpp (but still
+	 * requires us to use 18bpp). Until that's fully debugged, stay
+	 * bug-for-bug compatible with the old code.
+	 */
+	if (is_edp(intel_dp) && dev_priv->vbt.edp_bpp) {
+		DRM_DEBUG_KMS("clamping display bpc (was %d) to eDP (%d)\n",
+			      bpp, dev_priv->vbt.edp_bpp);
+		bpp = min_t(int, bpp, dev_priv->vbt.edp_bpp);
+	}
+	pipe_config->pipe_bpp = bpp;
 
 	return true;
 }
Signature · 1 line
1.7.9.5
#2 lore raw
Quoted 9 lines · Joseph Salisbury

This reverts commit 657445fe8660100ad174600ebfa61536392b7624.

It's by far not that simple. Jani is working on both the underlying bug and a better w/a. See

https://bugzilla.kernel.org/show_bug.cgi?id=59841

for the full story in its entire glory.

Cheers, Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#3 lore raw
Quoted 10 lines · Daniel Vetter
Quoted 9 lines · Joseph Salisbury

This reverts commit 657445fe8660100ad174600ebfa61536392b7624.

Quoted 8 lines

It's by far not that simple. Jani is working on both the underlying bug and a better w/a. See

https://bugzilla.kernel.org/show_bug.cgi?id=59841

for the full story in its entire glory.

Cheers, Daniel

Thanks for the feedback, Daniel. Is there an estimate on what mainline release might contain Jani's work?

Thanks again,

Joe

maintainer
#4 lore raw
Quoted 4 lines · Joseph Salisbury
Quoted 3 lines · Daniel Vetter

It's by far not that simple. Jani is working on both the underlying bug and a better w/a. See

Quoted 8 lines
Quoted 5 lines

https://bugzilla.kernel.org/show_bug.cgi?id=59841

for the full story in its entire glory.

Cheers, Daniel

Thanks for the feedback, Daniel. Is there an estimate on what mainline release might contain Jani's work?

commit c6cd2ee2d59111a07cd9199564c9bdcb2d11e5cf

Author: Jani Nikula <[email protected]>
Date:   Mon Oct 21 10:52:07 2013 +0300

drm/i915/dp: workaround BIOS eDP bpp clamping issue

and a couple of dependencies are now in Linus' tree, i.e. should be released in 3.12. The commits are also CC: stable.

BR,
Jani.

Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
#5 lore raw
Quoted 16 lines · Jani Nikula
Quoted 11 lines · Joseph Salisbury
Quoted 8 lines · Daniel Vetter

It's by far not that simple. Jani is working on both the underlying bug and a better w/a. See

https://bugzilla.kernel.org/show_bug.cgi?id=59841

for the full story in its entire glory.

Cheers, Daniel

Thanks for the feedback, Daniel. Is there an estimate on what mainline release might contain Jani's work?

commit c6cd2ee2d59111a07cd9199564c9bdcb2d11e5cf

Author: Jani Nikula <[email protected]>
Date:   Mon Oct 21 10:52:07 2013 +0300
Quoted 9 lines

drm/i915/dp: workaround BIOS eDP bpp clamping issue

and a couple of dependencies are now in Linus' tree, i.e. should be released in 3.12. The commits are also CC: stable.

BR,
Jani.

Great news! Thanks, Jani.

#6 lore raw
In reply to Jani Nikula
Quoted 14 lines · Jani Nikula
Quoted 4 lines · Joseph Salisbury
Quoted 3 lines · Daniel Vetter

It's by far not that simple. Jani is working on both the underlying bug and a better w/a. See

Quoted 8 lines
Quoted 5 lines

https://bugzilla.kernel.org/show_bug.cgi?id=59841

for the full story in its entire glory.

Cheers, Daniel

Thanks for the feedback, Daniel. Is there an estimate on what mainline release might contain Jani's work?

Quoted 8 lines

commit c6cd2ee2d59111a07cd9199564c9bdcb2d11e5cf

Author: Jani Nikula <[email protected]>
Date:   Mon Oct 21 10:52:07 2013 +0300

drm/i915/dp: workaround BIOS eDP bpp clamping issue

and a couple of dependencies are now in Linus' tree, i.e. should be released in 3.12. The commits are also CC: stable.

Are the dependency commits you mentioned these?

commit 7195a50b5c7e00cc3312934fd022c3006b533d12

Author: Ville Syrjälä <[email protected]>
Date:   Tue Sep 24 14:24:05 2013 +0300

drm/i915: Add HSW CRT output readout support

commit 4f56d12ebb28fceac4c6e60c8993fbfc122e1399

Author: Ville Syrjälä <[email protected]>
Date:   Mon Oct 21 10:52:06 2013 +0300

drm/i915: Add support for pipe_bpp readout

josh

maintainer
#7 lore raw
Quoted 20 lines · Josh Boyer
Quoted 18 lines · Jani Nikula
Quoted 4 lines · Joseph Salisbury
Quoted 3 lines · Daniel Vetter

It's by far not that simple. Jani is working on both the underlying bug and a better w/a. See

Quoted 8 lines
Quoted 5 lines

https://bugzilla.kernel.org/show_bug.cgi?id=59841

for the full story in its entire glory.

Cheers, Daniel

Thanks for the feedback, Daniel. Is there an estimate on what mainline release might contain Jani's work?

commit c6cd2ee2d59111a07cd9199564c9bdcb2d11e5cf

Author: Jani Nikula <[email protected]>
Date:   Mon Oct 21 10:52:07 2013 +0300
Quoted 6 lines
Quoted 4 lines

drm/i915/dp: workaround BIOS eDP bpp clamping issue

and a couple of dependencies are now in Linus' tree, i.e. should be released in 3.12. The commits are also CC: stable.

Are the dependency commits you mentioned these?

Yes; sorry for not mentioning them explicitly.

BR,
Jani.

Quoted 13 lines

commit 7195a50b5c7e00cc3312934fd022c3006b533d12

Author: Ville Syrjälä <[email protected]>
Date:   Tue Sep 24 14:24:05 2013 +0300

drm/i915: Add HSW CRT output readout support

commit 4f56d12ebb28fceac4c6e60c8993fbfc122e1399

Author: Ville Syrjälä <[email protected]>
Date:   Mon Oct 21 10:52:06 2013 +0300

drm/i915: Add support for pipe_bpp readout

josh

Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
#8 lore raw
Quoted 21 lines · Jani Nikula
Quoted 20 lines · Josh Boyer
Quoted 18 lines · Jani Nikula
Quoted 4 lines · Joseph Salisbury
Quoted 3 lines · Daniel Vetter

It's by far not that simple. Jani is working on both the underlying bug and a better w/a. See

Quoted 8 lines
Quoted 5 lines

https://bugzilla.kernel.org/show_bug.cgi?id=59841

for the full story in its entire glory.

Cheers, Daniel

Thanks for the feedback, Daniel. Is there an estimate on what mainline release might contain Jani's work?

commit c6cd2ee2d59111a07cd9199564c9bdcb2d11e5cf

Author: Jani Nikula <[email protected]>
Date:   Mon Oct 21 10:52:07 2013 +0300
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

drm/i915/dp: workaround BIOS eDP bpp clamping issue

and a couple of dependencies are now in Linus' tree, i.e. should be released in 3.12. The commits are also CC: stable.

Are the dependency commits you mentioned these?

Yes; sorry for not mentioning them explicitly.

No problem. Thanks for confirming.

josh