diff mbox

[RESEND,FOR,CI,v2] drm/i915: Fix eDP low vswing for Broadwell

Message ID 1460538675-16289-1-git-send-email-mika.kahola@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mika Kahola April 13, 2016, 9:11 a.m. UTC
It was noticed on bug #94087 that module parameter
i915.edp_vswing=2 that should override the VBT setting
to use default voltage swing (400 mV) was not applied
for Broadwell.

This patch provides a fix for this by checking if default
i.e. higher voltage swing is requested to be used and
applies the DDI translations table for DP instead of eDP
(low vswing) table.

v2: Combine two if statements into one (Jani)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94087
Signed-off-by: Mika Kahola <mika.kahola@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_ddi.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

Comments

Ville Syrjälä April 14, 2016, 4:20 p.m. UTC | #1
On Wed, Apr 13, 2016 at 05:07:04PM -0000, Patchwork wrote:
> == Series Details ==
> 
> Series: drm/i915: Fix eDP low vswing for Broadwell (rev3)
> URL   : https://patchwork.freedesktop.org/series/4499/
> State : failure
> 
> == Summary ==
> 
>   CC      drivers/usb/host/xhci-trace.o
>   CC      drivers/usb/storage/usual-tables.o
>   CC      drivers/usb/host/xhci-pci.o
>   CONMK   drivers/tty/vt/consolemap_deftbl.c
>   CC      drivers/tty/vt/consolemap.o
>   CC      drivers/tty/vt/vt.o
>   SHIPPED drivers/tty/vt/defkeymap.c
>   CC      drivers/tty/vt/consolemap_deftbl.o
>   CC      drivers/tty/vt/defkeymap.o
>   CC [M]  drivers/net/ethernet/intel/igb/igb_ptp.o
>   CC [M]  drivers/net/ethernet/intel/igb/igb_hwmon.o
>   LD      drivers/usb/storage/usb-storage.o
>   LD      drivers/usb/storage/built-in.o
> scripts/Makefile.build:440: recipe for target 'drivers/gpu/drm/i915' failed
> make[3]: *** [drivers/gpu/drm/i915] Error 2
> scripts/Makefile.build:440: recipe for target 'drivers/gpu/drm' failed
> make[2]: *** [drivers/gpu/drm] Error 2
> scripts/Makefile.build:440: recipe for target 'drivers/gpu' failed
> make[1]: *** [drivers/gpu] Error 2
> make[1]: *** Waiting for unfinished jobs....
>   LD [M]  drivers/net/ethernet/intel/igb/igb.o
>   LD      drivers/usb/host/xhci-hcd.o
>   LD      drivers/usb/host/built-in.o
>   LD      drivers/usb/built-in.o
>   LD      drivers/net/ethernet/built-in.o
>   LD      drivers/net/built-in.o
>   LD      drivers/tty/vt/built-in.o
>   LD      drivers/tty/built-in.o
> Makefile:962: recipe for target 'drivers' failed
> make: *** [drivers] Error 2

Looks like CI hates you.

This error log doesn't look entirely useful either. Maybe it just
dropped the actually relevant infrormation due to eg. -j<something>?
Tomi, can something be done about this?
Sarvela, Tomi P April 15, 2016, 7:30 a.m. UTC | #2
On Thursday 14 April 2016 19:20:22 Ville Syrjälä wrote:
> On Wed, Apr 13, 2016 at 05:07:04PM -0000, Patchwork wrote:
> > == Series Details ==
> > 
> > Series: drm/i915: Fix eDP low vswing for Broadwell (rev3)
> > URL   : https://patchwork.freedesktop.org/series/4499/
> > State : failure
> > 
> > == Summary ==
> > 
> >   CC      drivers/usb/host/xhci-trace.o
> >   CC      drivers/usb/storage/usual-tables.o
> >   CC      drivers/usb/host/xhci-pci.o
> >   CONMK   drivers/tty/vt/consolemap_deftbl.c
> >   CC      drivers/tty/vt/consolemap.o
> >   CC      drivers/tty/vt/vt.o
> >   SHIPPED drivers/tty/vt/defkeymap.c
> >   CC      drivers/tty/vt/consolemap_deftbl.o
> >   CC      drivers/tty/vt/defkeymap.o
> >   CC [M]  drivers/net/ethernet/intel/igb/igb_ptp.o
> >   CC [M]  drivers/net/ethernet/intel/igb/igb_hwmon.o
> >   LD      drivers/usb/storage/usb-storage.o
> >   LD      drivers/usb/storage/built-in.o
> > 
> > scripts/Makefile.build:440: recipe for target 'drivers/gpu/drm/i915'
> > failed
> > make[3]: *** [drivers/gpu/drm/i915] Error 2
> > scripts/Makefile.build:440: recipe for target 'drivers/gpu/drm' failed
> > make[2]: *** [drivers/gpu/drm] Error 2
> > scripts/Makefile.build:440: recipe for target 'drivers/gpu' failed
> > make[1]: *** [drivers/gpu] Error 2
> > make[1]: *** Waiting for unfinished jobs....
> > 
> >   LD [M]  drivers/net/ethernet/intel/igb/igb.o
> >   LD      drivers/usb/host/xhci-hcd.o
> >   LD      drivers/usb/host/built-in.o
> >   LD      drivers/usb/built-in.o
> >   LD      drivers/net/ethernet/built-in.o
> >   LD      drivers/net/built-in.o
> >   LD      drivers/tty/vt/built-in.o
> >   LD      drivers/tty/built-in.o
> > 
> > Makefile:962: recipe for target 'drivers' failed
> > make: *** [drivers] Error 2
> 
> Looks like CI hates you.
> 
> This error log doesn't look entirely useful either. Maybe it just
> dropped the actually relevant infrormation due to eg. -j<something>?
> Tomi, can something be done about this?

The full build logs are saved (make is -j24 if that's what you mean), but it seems that 
I've forgotten to make CI attach that information.

http://benchsrv.fi.intel.com/archive/deploy/logs/CI_Patchwork_build_1884/[1] 

The error is nowhere near the end of the log, so it's cut from mail sent:

drivers/gpu/drm/i915/intel_ddi.c: In function 'intel_prepare_ddi_buffer':
drivers/gpu/drm/i915/intel_ddi.c:447:15: error: 'struct drm_i915_private' has no 
member named 'edp_low_vswing'
   if (dev_priv->edp_low_vswing) {
               ^
scripts/Makefile.build:291: recipe for target 'drivers/gpu/drm/i915/intel_ddi.o' failed
make[4]: *** [drivers/gpu/drm/i915/intel_ddi.o] Error 1
make[4]: *** Waiting for unfinished jobs....
Tomi





--------
[1] http://benchsrv.fi.intel.com/archive/deploy/logs/CI_Patchwork_build_1884/
Mika Kahola April 20, 2016, 11:31 a.m. UTC | #3
CI hasn't catch this patch for testing?

On Wed, 2016-04-13 at 12:11 +0300, Mika Kahola wrote:
> It was noticed on bug #94087 that module parameter
> i915.edp_vswing=2 that should override the VBT setting
> to use default voltage swing (400 mV) was not applied
> for Broadwell.
> 
> This patch provides a fix for this by checking if default
> i.e. higher voltage swing is requested to be used and
> applies the DDI translations table for DP instead of eDP
> (low vswing) table.
> 
> v2: Combine two if statements into one (Jani)
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94087
> Signed-off-by: Mika Kahola <mika.kahola@intel.com>
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_ddi.c | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index 921edf1..d9af2de 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -443,9 +443,17 @@ void intel_prepare_ddi_buffer(struct intel_encoder *encoder)
>  	} else if (IS_BROADWELL(dev_priv)) {
>  		ddi_translations_fdi = bdw_ddi_translations_fdi;
>  		ddi_translations_dp = bdw_ddi_translations_dp;
> -		ddi_translations_edp = bdw_ddi_translations_edp;
> +
> +		if (dev_priv->edp_low_vswing) {
> +			ddi_translations_edp = bdw_ddi_translations_edp;
> +			n_edp_entries = ARRAY_SIZE(bdw_ddi_translations_edp);
> +		} else {
> +			ddi_translations_edp = bdw_ddi_translations_dp;
> +			n_edp_entries = ARRAY_SIZE(bdw_ddi_translations_dp);
> +		}
> +
>  		ddi_translations_hdmi = bdw_ddi_translations_hdmi;
> -		n_edp_entries = ARRAY_SIZE(bdw_ddi_translations_edp);
> +
>  		n_dp_entries = ARRAY_SIZE(bdw_ddi_translations_dp);
>  		n_hdmi_entries = ARRAY_SIZE(bdw_ddi_translations_hdmi);
>  		hdmi_default_entry = 7;
Jani Nikula April 20, 2016, 11:36 a.m. UTC | #4
On Wed, 20 Apr 2016, Mika Kahola <mika.kahola@intel.com> wrote:
> CI hasn't catch this patch for testing?

It has http://mid.gmane.org/20160413170704.11600.78300@emeril.freedesktop.org

>
> On Wed, 2016-04-13 at 12:11 +0300, Mika Kahola wrote:
>> It was noticed on bug #94087 that module parameter
>> i915.edp_vswing=2 that should override the VBT setting
>> to use default voltage swing (400 mV) was not applied
>> for Broadwell.
>> 
>> This patch provides a fix for this by checking if default
>> i.e. higher voltage swing is requested to be used and
>> applies the DDI translations table for DP instead of eDP
>> (low vswing) table.
>> 
>> v2: Combine two if statements into one (Jani)
>> 
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94087
>> Signed-off-by: Mika Kahola <mika.kahola@intel.com>
>> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>> ---
>>  drivers/gpu/drm/i915/intel_ddi.c | 12 ++++++++++--
>>  1 file changed, 10 insertions(+), 2 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
>> index 921edf1..d9af2de 100644
>> --- a/drivers/gpu/drm/i915/intel_ddi.c
>> +++ b/drivers/gpu/drm/i915/intel_ddi.c
>> @@ -443,9 +443,17 @@ void intel_prepare_ddi_buffer(struct intel_encoder *encoder)
>>  	} else if (IS_BROADWELL(dev_priv)) {
>>  		ddi_translations_fdi = bdw_ddi_translations_fdi;
>>  		ddi_translations_dp = bdw_ddi_translations_dp;
>> -		ddi_translations_edp = bdw_ddi_translations_edp;
>> +
>> +		if (dev_priv->edp_low_vswing) {
>> +			ddi_translations_edp = bdw_ddi_translations_edp;
>> +			n_edp_entries = ARRAY_SIZE(bdw_ddi_translations_edp);
>> +		} else {
>> +			ddi_translations_edp = bdw_ddi_translations_dp;
>> +			n_edp_entries = ARRAY_SIZE(bdw_ddi_translations_dp);
>> +		}
>> +
>>  		ddi_translations_hdmi = bdw_ddi_translations_hdmi;
>> -		n_edp_entries = ARRAY_SIZE(bdw_ddi_translations_edp);
>> +
>>  		n_dp_entries = ARRAY_SIZE(bdw_ddi_translations_dp);
>>  		n_hdmi_entries = ARRAY_SIZE(bdw_ddi_translations_hdmi);
>>  		hdmi_default_entry = 7;
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 921edf1..d9af2de 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -443,9 +443,17 @@  void intel_prepare_ddi_buffer(struct intel_encoder *encoder)
 	} else if (IS_BROADWELL(dev_priv)) {
 		ddi_translations_fdi = bdw_ddi_translations_fdi;
 		ddi_translations_dp = bdw_ddi_translations_dp;
-		ddi_translations_edp = bdw_ddi_translations_edp;
+
+		if (dev_priv->edp_low_vswing) {
+			ddi_translations_edp = bdw_ddi_translations_edp;
+			n_edp_entries = ARRAY_SIZE(bdw_ddi_translations_edp);
+		} else {
+			ddi_translations_edp = bdw_ddi_translations_dp;
+			n_edp_entries = ARRAY_SIZE(bdw_ddi_translations_dp);
+		}
+
 		ddi_translations_hdmi = bdw_ddi_translations_hdmi;
-		n_edp_entries = ARRAY_SIZE(bdw_ddi_translations_edp);
+
 		n_dp_entries = ARRAY_SIZE(bdw_ddi_translations_dp);
 		n_hdmi_entries = ARRAY_SIZE(bdw_ddi_translations_hdmi);
 		hdmi_default_entry = 7;