2013-10-16 20:35:41

by Joseph Salisbury

[permalink] [raw]
Subject: [v3.10][v3.11][v3.12][Regression][PATCH 0/1] 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(-)

--
1.7.9.5


2013-10-16 20:35:40

by Joseph Salisbury

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

BugLink: http://bugs.launchpad.net/bugs/1195483

This reverts commit 657445fe8660100ad174600ebfa61536392b7624.

Signed-off-by: Joseph Salisbury <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Paulo Zanoni <[email protected]>
Cc: David Airlie <[email protected]>
Cc: [email protected]


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

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;
}
--
1.7.9.5

2013-10-16 21:01:54

by Daniel Vetter

[permalink] [raw]
Subject: Re: [v3.10][v3.11][v3.12][Regression][PATCH 1/1] Revert "Revert "drm/i915: revert eDP bpp clamping code changes""

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 <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: Paulo Zanoni <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: [email protected]

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
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

2013-10-25 15:36:16

by Joseph Salisbury

[permalink] [raw]
Subject: Re: [v3.10][v3.11][v3.12][Regression][PATCH 1/1] Revert "Revert "drm/i915: revert eDP bpp clamping code changes""

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 <[email protected]>
>> Cc: Daniel Vetter <[email protected]>
>> Cc: Paulo Zanoni <[email protected]>
>> Cc: David Airlie <[email protected]>
>> Cc: [email protected]
> 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

2013-10-31 15:02:12

by Jani Nikula

[permalink] [raw]
Subject: Re: [Intel-gfx] [v3.10][v3.11][v3.12][Regression][PATCH 1/1] Revert "Revert "drm/i915: revert eDP bpp clamping code changes""

On Fri, 25 Oct 2013, Joseph Salisbury <[email protected]> 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 <[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.


--
Jani Nikula, Intel Open Source Technology Center

2013-10-31 16:41:26

by Joseph Salisbury

[permalink] [raw]
Subject: Re: [Intel-gfx] [v3.10][v3.11][v3.12][Regression][PATCH 1/1] Revert "Revert "drm/i915: revert eDP bpp clamping code changes""

On 10/31/2013 10:58 AM, Jani Nikula wrote:
> On Fri, 25 Oct 2013, Joseph Salisbury <[email protected]> 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 <[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.
>
>
Great news! Thanks, Jani.

2013-10-31 16:57:34

by Josh Boyer

[permalink] [raw]
Subject: Re: [Intel-gfx] [v3.10][v3.11][v3.12][Regression][PATCH 1/1] Revert "Revert "drm/i915: revert eDP bpp clamping code changes""

On Thu, Oct 31, 2013 at 10:58 AM, Jani Nikula
<[email protected]> wrote:
> On Fri, 25 Oct 2013, Joseph Salisbury <[email protected]> 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 <[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

2013-10-31 17:04:28

by Jani Nikula

[permalink] [raw]
Subject: Re: [Intel-gfx] [v3.10][v3.11][v3.12][Regression][PATCH 1/1] Revert "Revert "drm/i915: revert eDP bpp clamping code changes""

On Thu, 31 Oct 2013, Josh Boyer <[email protected]> wrote:
> On Thu, Oct 31, 2013 at 10:58 AM, Jani Nikula
> <[email protected]> wrote:
>> On Fri, 25 Oct 2013, Joseph Salisbury <[email protected]> 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 <[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?

Yes; sorry for not mentioning them explicitly.

BR,
Jani.


> 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

--
Jani Nikula, Intel Open Source Technology Center

2013-10-31 17:12:03

by Josh Boyer

[permalink] [raw]
Subject: Re: [Intel-gfx] [v3.10][v3.11][v3.12][Regression][PATCH 1/1] Revert "Revert "drm/i915: revert eDP bpp clamping code changes""

On Thu, Oct 31, 2013 at 1:01 PM, Jani Nikula
<[email protected]> wrote:
> On Thu, 31 Oct 2013, Josh Boyer <[email protected]> wrote:
>> On Thu, Oct 31, 2013 at 10:58 AM, Jani Nikula
>> <[email protected]> wrote:
>>> On Fri, 25 Oct 2013, Joseph Salisbury <[email protected]> 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 <[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?
>
> Yes; sorry for not mentioning them explicitly.

No problem. Thanks for confirming.

josh