diff mbox

[Saucy,SRU,1/1] (no-up) Revert "Revert "drm/i915: revert eDP bpp clamping code changes""

Message ID 397b1b6f028317a3ef897cdaf79eb1e5519e587d.1381939165.git.joseph.salisbury@canonical.com
State New
Headers show

Commit Message

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

This reverts commit 657445fe8660100ad174600ebfa61536392b7624.

Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
---
 drivers/gpu/drm/i915/intel_dp.c |   18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

Comments

Joseph Salisbury Oct. 16, 2013, 9:06 p.m. UTC | #1
On 10/16/2013 04:57 PM, Joseph Salisbury wrote:
> BugLink: http://bugs.launchpad.net/bugs/1195483
>
> This reverts commit 657445fe8660100ad174600ebfa61536392b7624.
>
> Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
> ---
>  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;
>  }

A proper fix is also being discussed upstream:
https://bugzilla.kernel.org/show_bug.cgi?id=59841

Maybe an alternative to this patch is to add something to the Saucy
release notes until this is fixed upstream?
Tim Gardner Oct. 24, 2013, 10:22 p.m. UTC | #2
On 10/16/2013 02:06 PM, Joseph Salisbury wrote:
> On 10/16/2013 04:57 PM, Joseph Salisbury wrote:
>> BugLink: http://bugs.launchpad.net/bugs/1195483
>>
>> This reverts commit 657445fe8660100ad174600ebfa61536392b7624.
>>
>> Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
>> ---
>>   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;
>>   }
>
> A proper fix is also being discussed upstream:
> https://bugzilla.kernel.org/show_bug.cgi?id=59841
>
> Maybe an alternative to this patch is to add something to the Saucy
> release notes until this is fixed upstream?
>
>

Joe - any upstream movement on this ?
Joseph Salisbury Oct. 31, 2013, 4:03 p.m. UTC | #3
On 10/24/2013 06:22 PM, Tim Gardner wrote:
> On 10/16/2013 02:06 PM, Joseph Salisbury wrote:
>> On 10/16/2013 04:57 PM, Joseph Salisbury wrote:
>>> BugLink: http://bugs.launchpad.net/bugs/1195483
>>>
>>> This reverts commit 657445fe8660100ad174600ebfa61536392b7624.
>>>
>>> Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
>>> ---
>>>   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;
>>>   }
>>
>> A proper fix is also being discussed upstream:
>> https://bugzilla.kernel.org/show_bug.cgi?id=59841
>>
>> Maybe an alternative to this patch is to add something to the Saucy
>> release notes until this is fixed upstream?
>>
>>
>
> Joe - any upstream movement on this ?
>
A fix is avaiable upstream and also cc'd to stable:

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.
Robert Hooker Oct. 31, 2013, 5:36 p.m. UTC | #4
On Thu, Oct 31, 2013 at 12:03 PM, Joseph Salisbury
<joseph.salisbury@canonical.com> wrote:
> On 10/24/2013 06:22 PM, Tim Gardner wrote:
>> On 10/16/2013 02:06 PM, Joseph Salisbury wrote:
>>> On 10/16/2013 04:57 PM, Joseph Salisbury wrote:
>>>> BugLink: http://bugs.launchpad.net/bugs/1195483
>>>>
>>>> This reverts commit 657445fe8660100ad174600ebfa61536392b7624.
>>>>
>>>> Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
>>>> ---
>>>>   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;
>>>>   }
>>>
>>> A proper fix is also being discussed upstream:
>>> https://bugzilla.kernel.org/show_bug.cgi?id=59841
>>>
>>> Maybe an alternative to this patch is to add something to the Saucy
>>> release notes until this is fixed upstream?
>>>
>>>
>>
>> Joe - any upstream movement on this ?
>>
> A fix is avaiable upstream and also cc'd to stable:
>
> 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.
>
>
> --
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team


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

are the required extra commits according to the mailing list thread.
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;
 }