diff mbox

[v3.10,v3.11,v3.12,Regression,1/1] Revert "Revert "drm/i915: revert eDP bpp clamping code changes""

Message ID 397b1b6f028317a3ef897cdaf79eb1e5519e587d.1381939165.git.joseph.salisbury@canonical.com (mailing list archive)
State New, archived
Headers show

Commit Message

Joseph Salisbury Oct. 16, 2013, 8:34 p.m. UTC
BugLink: http://bugs.launchpad.net/bugs/1195483

This reverts commit 657445fe8660100ad174600ebfa61536392b7624.

Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Paulo Zanoni <przanoni@gmail.com>
Cc: David Airlie <airlied@linux.ie>
Cc: stable@vger.kernel.org


---
 drivers/gpu/drm/i915/intel_dp.c |   18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

Comments

Joseph Salisbury Oct. 25, 2013, 3:36 p.m. UTC | #1
On 10/16/2013 05:02 PM, Daniel Vetter wrote:
> On Wed, Oct 16, 2013 at 04:34:57PM -0400, Joseph Salisbury wrote:
>> BugLink: http://bugs.launchpad.net/bugs/1195483
>>
>> This reverts commit 657445fe8660100ad174600ebfa61536392b7624.
>>
>> Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
>> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>> Cc: Paulo Zanoni <przanoni@gmail.com>
>> Cc: David Airlie <airlied@linux.ie>
>> Cc: stable@vger.kernel.org
> 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
Jani Nikula Oct. 31, 2013, 2:58 p.m. UTC | #2
On Fri, 25 Oct 2013, Joseph Salisbury <joseph.salisbury@canonical.com> wrote:
> On 10/16/2013 05:02 PM, Daniel Vetter wrote:
>> 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 <jani.nikula@intel.com>
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.
Joseph Salisbury Oct. 31, 2013, 4:41 p.m. UTC | #3
On 10/31/2013 10:58 AM, Jani Nikula wrote:
> On Fri, 25 Oct 2013, Joseph Salisbury <joseph.salisbury@canonical.com> wrote:
>> On 10/16/2013 05:02 PM, Daniel Vetter wrote:
>>> 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 <jani.nikula@intel.com>
> 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.
>
>
Great news!  Thanks, Jani.
Josh Boyer Oct. 31, 2013, 4:57 p.m. UTC | #4
On Thu, Oct 31, 2013 at 10:58 AM, Jani Nikula
<jani.nikula@linux.intel.com> wrote:
> On Fri, 25 Oct 2013, Joseph Salisbury <joseph.salisbury@canonical.com> wrote:
>> On 10/16/2013 05:02 PM, Daniel Vetter wrote:
>>> 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 <jani.nikula@intel.com>
> 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ä <ville.syrjala@linux.intel.com>
Date:   Tue Sep 24 14:24:05 2013 +0300

    drm/i915: Add HSW CRT output readout support

commit 4f56d12ebb28fceac4c6e60c8993fbfc122e1399
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Mon Oct 21 10:52:06 2013 +0300

    drm/i915: Add support for pipe_bpp readout

josh
Jani Nikula Oct. 31, 2013, 5:01 p.m. UTC | #5
On Thu, 31 Oct 2013, Josh Boyer <jwboyer@fedoraproject.org> wrote:
> On Thu, Oct 31, 2013 at 10:58 AM, Jani Nikula
> <jani.nikula@linux.intel.com> wrote:
>> On Fri, 25 Oct 2013, Joseph Salisbury <joseph.salisbury@canonical.com> wrote:
>>> On 10/16/2013 05:02 PM, Daniel Vetter wrote:
>>>> 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 <jani.nikula@intel.com>
>> 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?

Yes; sorry for not mentioning them explicitly.

BR,
Jani.


> commit 7195a50b5c7e00cc3312934fd022c3006b533d12
> Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Date:   Tue Sep 24 14:24:05 2013 +0300
>
>     drm/i915: Add HSW CRT output readout support
>
> commit 4f56d12ebb28fceac4c6e60c8993fbfc122e1399
> Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Date:   Mon Oct 21 10:52:06 2013 +0300
>
>     drm/i915: Add support for pipe_bpp readout
>
> josh
Josh Boyer Oct. 31, 2013, 5:11 p.m. UTC | #6
On Thu, Oct 31, 2013 at 1:01 PM, Jani Nikula
<jani.nikula@linux.intel.com> wrote:
> On Thu, 31 Oct 2013, Josh Boyer <jwboyer@fedoraproject.org> wrote:
>> On Thu, Oct 31, 2013 at 10:58 AM, Jani Nikula
>> <jani.nikula@linux.intel.com> wrote:
>>> On Fri, 25 Oct 2013, Joseph Salisbury <joseph.salisbury@canonical.com> wrote:
>>>> On 10/16/2013 05:02 PM, Daniel Vetter wrote:
>>>>> 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 <jani.nikula@intel.com>
>>> 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?
>
> Yes; sorry for not mentioning them explicitly.

No problem.  Thanks for confirming.

josh
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 26e162b..ce933ad 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -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;
 }