drm/i915: Replace vbt edp.support with int_lvds_support
Subsystems (2)
PATCH v2 1/3 drm/i915: Replace vbt edp.support with int_lvds_support
From: Ville Syrjälä <[email protected]>
Replace dev_priv->vbt.edp.support with dev_priv->vbt.int_lvds_support. We'll want to extend its use beyond the LVDS vs. eDP case in the future.
--- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_bios.c | 5 ++++- drivers/gpu/drm/i915/intel_lvds.c | 9 +++++---- 3 files changed, 10 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +1 -1
@@ -1052,6 +1052,7 @@ struct intel_vbt_data { unsigned int lvds_vbt:1; unsigned int int_crt_support:1; unsigned int lvds_use_ssc:1; + unsigned int int_lvds_support:1; unsigned int display_clock_mode:1; unsigned int fdi_rx_polarity_inverted:1; unsigned int panel_type:4;
@@ -1067,7 +1068,6 @@ struct intel_vbt_data {int vswing;bool low_vswing;bool initialized; -bool support;int bpp;struct edp_power_seq pps; } edp;
drivers/gpu/drm/i915/intel_bios.c +4 -1
@@ -519,7 +519,7 @@ parse_driver_features(struct drm_i915_private *dev_priv,return ;if (driver->lvds_config ==BDB_DRIVER_FEATURE_EDP ) - dev_priv->vbt.edp.support =1 ; + dev_priv->vbt.int_lvds_support =0 ;DRM_DEBUG_KMS ("DRRS State Enabled:%d\n" , driver->drrs_enabled);/*
@@ -1512,6 +1512,9 @@ init_vbt_defaults(struct drm_i915_private *dev_priv) dev_priv->vbt.int_tv_support =1 ; dev_priv->vbt.int_crt_support =1 ; +/* driver features */ + dev_priv->vbt.int_lvds_support =1 ; +/* Default to using SSC */ dev_priv->vbt.lvds_use_ssc =1 ;/*
drivers/gpu/drm/i915/intel_lvds.c +5 -4
@@ -965,6 +965,11 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)if (dmi_check_system (intel_no_lvds))return ; +if (!dev_priv->vbt.int_lvds_support) { +DRM_DEBUG_KMS ("Internal LVDS support disabled by VBT\n" ); +return ; + } +if (HAS_PCH_SPLIT (dev_priv)) lvds_reg =PCH_LVDS ;else
@@ -975,10 +980,6 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)if (HAS_PCH_SPLIT (dev_priv)) {if ((lvds &LVDS_DETECTED ) ==0 )return ; -if (dev_priv->vbt.edp.support) { -DRM_DEBUG_KMS ("disable LVDS for eDP support\n" ); -return ; - } } pin =GMBUS_PIN_PANEL ;
Signature · 6 lines
2.16.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 1/3 drm/i915: Replace vbt edp.support with int_lvds_support
From: Ville Syrjälä <[email protected]>
Replace dev_priv->vbt.edp.support with dev_priv->vbt.int_lvds_support. We'll want to extend its use beyond the LVDS vs. eDP case in the future.
v2: Nuke the edp.support from parse_edp() (Jani)
Only clear int_lvds_support for gen5+ to preserve the current behaviour (Jani)
--- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_bios.c | 13 +++++++------ drivers/gpu/drm/i915/intel_lvds.c | 9 +++++---- 3 files changed, 13 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +1 -1
@@ -1052,6 +1052,7 @@ struct intel_vbt_data { unsigned int lvds_vbt:1; unsigned int int_crt_support:1; unsigned int lvds_use_ssc:1; + unsigned int int_lvds_support:1; unsigned int display_clock_mode:1; unsigned int fdi_rx_polarity_inverted:1; unsigned int panel_type:4;
@@ -1067,7 +1068,6 @@ struct intel_vbt_data {int vswing;bool low_vswing;bool initialized; -bool support;int bpp;struct edp_power_seq pps; } edp;
drivers/gpu/drm/i915/intel_bios.c +7 -6
@@ -518,8 +518,9 @@ parse_driver_features(struct drm_i915_private *dev_priv,if (!driver)return ; -if (driver->lvds_config ==BDB_DRIVER_FEATURE_EDP ) - dev_priv->vbt.edp.support =1 ; +if (INTEL_GEN (dev_priv) >=5 && + driver->lvds_config ==BDB_DRIVER_FEATURE_EDP ) + dev_priv->vbt.int_lvds_support =0 ;DRM_DEBUG_KMS ("DRRS State Enabled:%d\n" , driver->drrs_enabled);/*
@@ -541,11 +542,8 @@ parse_edp(struct drm_i915_private *dev_priv, const struct bdb_header *bdb)int panel_type = dev_priv->vbt.panel_type; edp =find_section (bdb,BDB_EDP ); -if (!edp) { -if (dev_priv->vbt.edp.support) -DRM_DEBUG_KMS ("No eDP BDB found but eDP panel supported.\n" ); +if (!edp)return ; - }switch ((edp->color_depth >> (panel_type *2 )) &3 ) {case EDP_18BPP :
@@ -1512,6 +1510,9 @@ init_vbt_defaults(struct drm_i915_private *dev_priv) dev_priv->vbt.int_tv_support =1 ; dev_priv->vbt.int_crt_support =1 ; +/* driver features */ + dev_priv->vbt.int_lvds_support =1 ; +/* Default to using SSC */ dev_priv->vbt.lvds_use_ssc =1 ;/*
drivers/gpu/drm/i915/intel_lvds.c +5 -4
@@ -965,6 +965,11 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)if (dmi_check_system (intel_no_lvds))return ; +if (!dev_priv->vbt.int_lvds_support) { +DRM_DEBUG_KMS ("Internal LVDS support disabled by VBT\n" ); +return ; + } +if (HAS_PCH_SPLIT (dev_priv)) lvds_reg =PCH_LVDS ;else
@@ -975,10 +980,6 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)if (HAS_PCH_SPLIT (dev_priv)) {if ((lvds &LVDS_DETECTED ) ==0 )return ; -if (dev_priv->vbt.edp.support) { -DRM_DEBUG_KMS ("disable LVDS for eDP support\n" ); -return ; - } } pin =GMBUS_PIN_PANEL ;
Signature · 6 lines
2.16.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 6 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
Replace
dev_priv->vbt.edp.supportwithdev_priv->vbt.int_lvds_support. We'll want to extend its use beyond the LVDS vs. eDP case in the future.
Quoted 7 lines
v2: Nuke the edp.support from
parse_edp()(Jani)
Only clearint_lvds_supportfor gen5+ to preserve the current behaviour (Jani)Cc Jani Nikula <[email protected]>Cc Ondrej Zary <[email protected]>Signed-off-by Ville Syrjälä <[email protected]>
Quoted 92 lines
--- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_bios.c | 13 +++++++------ drivers/gpu/drm/i915/intel_lvds.c | 9 +++++---- 3 files changed, 13 insertions(+), 11 deletions(-)drivers/gpu/drm/i915/i915_drv.h +1
-1@@ -1052,6 +1052,7 @@ struct intel_vbt_data { unsigned int lvds_vbt:1; unsigned int int_crt_support:1; unsigned int lvds_use_ssc:1; + unsigned int int_lvds_support:1; unsigned int display_clock_mode:1; unsigned int fdi_rx_polarity_inverted:1; unsigned int panel_type:4;@@ -1067,7 +1068,6 @@ struct intel_vbt_data {int vswing;bool low_vswing;bool initialized; -bool support;int bpp;struct edp_power_seq pps; } edp;drivers/gpu/drm/i915/intel_bios.c +7
-6@@ -518,8 +518,9 @@ parse_driver_features(struct drm_i915_private *dev_priv,if (!driver)return ; -if (driver->lvds_config ==BDB_DRIVER_FEATURE_EDP ) - dev_priv->vbt.edp.support =1 ; +if (INTEL_GEN (dev_priv) >=5 && + driver->lvds_config ==BDB_DRIVER_FEATURE_EDP ) + dev_priv->vbt.int_lvds_support =0 ;DRM_DEBUG_KMS ("DRRS State Enabled:%d\n" , driver->drrs_enabled);/* @@ -541,11 +542,8 @@ parse_edp(struct drm_i915_private *dev_priv, const struct bdb_header *bdb)int panel_type = dev_priv->vbt.panel_type; edp =find_section (bdb,BDB_EDP ); -if (!edp) { -if (dev_priv->vbt.edp.support) -DRM_DEBUG_KMS ("No eDP BDB found but eDP panel supported.\n" ); +if (!edp)return ; - }switch ((edp->color_depth >> (panel_type *2 )) &3 ) {case EDP_18BPP :@@ -1512,6 +1510,9 @@ init_vbt_defaults(struct drm_i915_private *dev_priv) dev_priv->vbt.int_tv_support =1 ; dev_priv->vbt.int_crt_support =1 ; +/* driver features */ + dev_priv->vbt.int_lvds_support =1 ; +/* Default to using SSC */ dev_priv->vbt.lvds_use_ssc =1 ;/* drivers/gpu/drm/i915/intel_lvds.c +5
-4@@ -965,6 +965,11 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)if (dmi_check_system (intel_no_lvds))return ; +if (!dev_priv->vbt.int_lvds_support) { +DRM_DEBUG_KMS ("Internal LVDS support disabled by VBT\n" ); +return ; + } +if (HAS_PCH_SPLIT (dev_priv)) lvds_reg =PCH_LVDS ;else @@ -975,10 +980,6 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)if (HAS_PCH_SPLIT (dev_priv)) {if ((lvds &LVDS_DETECTED ) ==0 )return ; -if (dev_priv->vbt.edp.support) { -DRM_DEBUG_KMS ("disable LVDS for eDP support\n" ); -return ; - } } pin =GMBUS_PIN_PANEL ;
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 2/3 drm/i915: Consult VBT "LVDS config" bits to determine whether internal LVDS is present
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
VBT seems to have some bits to tell us whether the internal LVDS port has something hooked up. In theory one might expect the VBT to not have a child device for the LVDS port if there's no panel hooked up, but in practice many VBTs still add the child device. The "LVDS config" bits seem more reliable though, so let's check those.
So far we've used the "LVDS config" bits to check for eDP support on ILK+, and disable the internal LVDS when the value is 3. That value is actually documented as "Both internal LVDS and SDVO LVDS", but in practice it looks to mean "eDP" on all the ilk+ VBTs I've seen. So let's keep that interpretation, but for pre-ILK we will consider the value 3 to also indicate the presence of the internal LVDS.
Currently we have 25 DMI matches for the "no internal LVDS" quirk. In an effort to reduce that let's toss in a WARN when the DMI match and VBT both tell us that the internal LVDS is not present. The hope is that people will report a bug, and then we can just nuke the corresponding entry from the DMI quirk list. Credits to Jani for this idea.
v2: Split the basic int_lvds_support thing to a separate patch (Jani)
Cc: Jani Nikula <[email protected]>
Cc: Ondrej Zary <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105468
References: https://lists.freedesktop.org/archives/intel-gfx/2018-March/158408.html
--- drivers/gpu/drm/i915/intel_bios.c | 15 +++++++++++++-- drivers/gpu/drm/i915/intel_lvds.c | 5 ++++- drivers/gpu/drm/i915/intel_vbt_defs.h | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_bios.c +13 -2
@@ -518,8 +518,19 @@ parse_driver_features(struct drm_i915_private *dev_priv,if (!driver)return ; -if (driver->lvds_config ==BDB_DRIVER_FEATURE_EDP ) - dev_priv->vbt.int_lvds_support =0 ; +if (INTEL_GEN (dev_priv) >=5 ) { +/* +* Note that we consider BDB_DRIVER_FEATURE_INT_SDVO_LVDS +* to mean "eDP". The VBT spec doesn't agree with that +* interpretation, but real world VBTs seem to. +*/ +if (driver->lvds_config !=BDB_DRIVER_FEATURE_INT_LVDS ) + dev_priv->vbt.int_lvds_support =0 ; + }else { +if (driver->lvds_config !=BDB_DRIVER_FEATURE_INT_LVDS && + driver->lvds_config !=BDB_DRIVER_FEATURE_INT_SDVO_LVDS ) + dev_priv->vbt.int_lvds_support =0 ; + }DRM_DEBUG_KMS ("DRRS State Enabled:%d\n" , driver->drrs_enabled);/*
drivers/gpu/drm/i915/intel_lvds.c +4 -1
@@ -962,8 +962,11 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)return ;/* Skip init on machines we know falsely report LVDS */ -if (dmi_check_system (intel_no_lvds)) +if (dmi_check_system (intel_no_lvds)) { +WARN (!dev_priv->vbt.int_lvds_support, +"Useless DMI match. Internal LVDS support disabled by VBT\n" );return ; + }if (!dev_priv->vbt.int_lvds_support) {DRM_DEBUG_KMS ("Internal LVDS support disabled by VBT\n" );
drivers/gpu/drm/i915/intel_vbt_defs.h +1 -1
@@ -635,7 +635,7 @@ struct bdb_sdvo_lvds_options {#define BDB_DRIVER_FEATURE_NO_LVDS 0#define BDB_DRIVER_FEATURE_INT_LVDS 1#define BDB_DRIVER_FEATURE_SDVO_LVDS 2 -#define BDB_DRIVER_FEATURE_EDP 3 +#define BDB_DRIVER_FEATURE_INT_SDVO_LVDS 3struct bdb_driver_features {u8 boot_dev_algorithm:1 ;
Signature · 6 lines
2.16.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v3 2/3 drm/i915: Consult VBT "LVDS config" bits to determine whether internal LVDS is present
From: Ville Syrjälä <[email protected]>
VBT seems to have some bits to tell us whether the internal LVDS port has something hooked up. In theory one might expect the VBT to not have a child device for the LVDS port if there's no panel hooked up, but in practice many VBTs still add the child device. The "LVDS config" bits seem more reliable though, so let's check those.
So far we've used the "LVDS config" bits to check for eDP support on ILK+, and disable the internal LVDS when the value is 3. That value is actually documented as "Both internal LVDS and SDVO LVDS", but in practice it looks to mean "eDP" on all the ilk+ VBTs I've seen. So let's keep that interpretation, but for pre-ILK we will consider the value 3 to also indicate the presence of the internal LVDS.
Currently we have 25 DMI matches for the "no internal LVDS" quirk. In an effort to reduce that let's toss in a WARN when the DMI match and VBT both tell us that the internal LVDS is not present. The hope is that people will report a bug, and then we can just nuke the corresponding entry from the DMI quirk list. Credits to Jani for this idea.
v2: Split the basic int_lvds_support thing to a separate patch (Jani)
v3: Rebase
Cc: Jani Nikula <[email protected]>
Cc: Ondrej Zary <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105468
References: https://lists.freedesktop.org/archives/intel-gfx/2018-March/158408.html
--- drivers/gpu/drm/i915/intel_bios.c | 16 +++++++++++++--- drivers/gpu/drm/i915/intel_lvds.c | 5 ++++- drivers/gpu/drm/i915/intel_vbt_defs.h | 2 +- 3 files changed, 18 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/intel_bios.c +13 -3
@@ -518,9 +518,19 @@ parse_driver_features(struct drm_i915_private *dev_priv,if (!driver)return ; -if (INTEL_GEN (dev_priv) >=5 && - driver->lvds_config ==BDB_DRIVER_FEATURE_EDP ) - dev_priv->vbt.int_lvds_support =0 ; +if (INTEL_GEN (dev_priv) >=5 ) { +/* +* Note that we consider BDB_DRIVER_FEATURE_INT_SDVO_LVDS +* to mean "eDP". The VBT spec doesn't agree with that +* interpretation, but real world VBTs seem to. +*/ +if (driver->lvds_config !=BDB_DRIVER_FEATURE_INT_LVDS ) + dev_priv->vbt.int_lvds_support =0 ; + }else { +if (driver->lvds_config !=BDB_DRIVER_FEATURE_INT_LVDS && + driver->lvds_config !=BDB_DRIVER_FEATURE_INT_SDVO_LVDS ) + dev_priv->vbt.int_lvds_support =0 ; + }DRM_DEBUG_KMS ("DRRS State Enabled:%d\n" , driver->drrs_enabled);/*
drivers/gpu/drm/i915/intel_lvds.c +4 -1
@@ -962,8 +962,11 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)return ;/* Skip init on machines we know falsely report LVDS */ -if (dmi_check_system (intel_no_lvds)) +if (dmi_check_system (intel_no_lvds)) { +WARN (!dev_priv->vbt.int_lvds_support, +"Useless DMI match. Internal LVDS support disabled by VBT\n" );return ; + }if (!dev_priv->vbt.int_lvds_support) {DRM_DEBUG_KMS ("Internal LVDS support disabled by VBT\n" );
drivers/gpu/drm/i915/intel_vbt_defs.h +1 -1
@@ -635,7 +635,7 @@ struct bdb_sdvo_lvds_options {#define BDB_DRIVER_FEATURE_NO_LVDS 0#define BDB_DRIVER_FEATURE_INT_LVDS 1#define BDB_DRIVER_FEATURE_SDVO_LVDS 2 -#define BDB_DRIVER_FEATURE_EDP 3 +#define BDB_DRIVER_FEATURE_INT_SDVO_LVDS 3struct bdb_driver_features {u8 boot_dev_algorithm:1 ;
Signature · 6 lines
2.16.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v3 2/3] drm/i915: Consult VBT "LVDS config" bits to determine whether internal LVDS is present
Quoted 21 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
VBT seems to have some bits to tell us whether the internal LVDS port has something hooked up. In theory one might expect the VBT to not have a child device for the LVDS port if there's no panel hooked up, but in practice many VBTs still add the child device. The "LVDS config" bits seem more reliable though, so let's check those.
So far we've used the "LVDS config" bits to check for eDP support on ILK+, and disable the internal LVDS when the value is 3. That value is actually documented as "Both internal LVDS and SDVO LVDS", but in practice it looks to mean "eDP" on all the ilk+ VBTs I've seen. So let's keep that interpretation, but for pre-ILK we will consider the value 3 to also indicate the presence of the internal LVDS.
Currently we have 25 DMI matches for the "no internal LVDS" quirk. In an effort to reduce that let's toss in a WARN when the DMI match and VBT both tell us that the internal LVDS is not present. The hope is that people will report a bug, and then we can just nuke the corresponding entry from the DMI quirk list. Credits to Jani for this idea.
Quoted 8 lines
v2: Split the basic
int_lvds_supportthing to a separate patch (Jani)
v3: RebaseCc: Jani Nikula <[email protected]>
Cc: Ondrej Zary <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105468
References: https://lists.freedesktop.org/archives/intel-gfx/2018-March/158408.htmlSigned-off-by Ville Syrjälä <[email protected]>
Quoted 63 lines
--- drivers/gpu/drm/i915/intel_bios.c | 16 +++++++++++++--- drivers/gpu/drm/i915/intel_lvds.c | 5 ++++- drivers/gpu/drm/i915/intel_vbt_defs.h | 2 +- 3 files changed, 18 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/intel_bios.c +13
-3@@ -518,9 +518,19 @@ parse_driver_features(struct drm_i915_private *dev_priv,if (!driver)return ; -if (INTEL_GEN (dev_priv) >=5 && - driver->lvds_config ==BDB_DRIVER_FEATURE_EDP ) - dev_priv->vbt.int_lvds_support =0 ; +if (INTEL_GEN (dev_priv) >=5 ) { +/* +* Note that we consider BDB_DRIVER_FEATURE_INT_SDVO_LVDS +* to mean "eDP". The VBT spec doesn't agree with that +* interpretation, but real world VBTs seem to. +*/ +if (driver->lvds_config !=BDB_DRIVER_FEATURE_INT_LVDS ) + dev_priv->vbt.int_lvds_support =0 ; + }else { +if (driver->lvds_config !=BDB_DRIVER_FEATURE_INT_LVDS && + driver->lvds_config !=BDB_DRIVER_FEATURE_INT_SDVO_LVDS ) + dev_priv->vbt.int_lvds_support =0 ; + }DRM_DEBUG_KMS ("DRRS State Enabled:%d\n" , driver->drrs_enabled);/* drivers/gpu/drm/i915/intel_lvds.c +4
-1@@ -962,8 +962,11 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)return ;/* Skip init on machines we know falsely report LVDS */ -if (dmi_check_system (intel_no_lvds)) +if (dmi_check_system (intel_no_lvds)) { +WARN (!dev_priv->vbt.int_lvds_support, +"Useless DMI match. Internal LVDS support disabled by VBT\n" );return ; + }if (!dev_priv->vbt.int_lvds_support) {DRM_DEBUG_KMS ("Internal LVDS support disabled by VBT\n" );drivers/gpu/drm/i915/intel_vbt_defs.h +1
-1@@ -635,7 +635,7 @@ struct bdb_sdvo_lvds_options {#define BDB_DRIVER_FEATURE_NO_LVDS 0#define BDB_DRIVER_FEATURE_INT_LVDS 1#define BDB_DRIVER_FEATURE_SDVO_LVDS 2 -#define BDB_DRIVER_FEATURE_EDP 3 +#define BDB_DRIVER_FEATURE_INT_SDVO_LVDS 3struct bdb_driver_features {u8 boot_dev_algorithm:1 ;
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v3 2/3] drm/i915: Consult VBT "LVDS config" bits to determine whether internal LVDS is present
In reply to Ville SyrjalaQuoted 48 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
VBT seems to have some bits to tell us whether the internal LVDS port has something hooked up. In theory one might expect the VBT to not have a child device for the LVDS port if there's no panel hooked up, but in practice many VBTs still add the child device. The "LVDS config" bits seem more reliable though, so let's check those.
So far we've used the "LVDS config" bits to check for eDP support on ILK+, and disable the internal LVDS when the value is 3. That value is actually documented as "Both internal LVDS and SDVO LVDS", but in practice it looks to mean "eDP" on all the ilk+ VBTs I've seen. So let's keep that interpretation, but for pre-ILK we will consider the value 3 to also indicate the presence of the internal LVDS.
Currently we have 25 DMI matches for the "no internal LVDS" quirk. In an effort to reduce that let's toss in a WARN when the DMI match and VBT both tell us that the internal LVDS is not present. The hope is that people will report a bug, and then we can just nuke the corresponding entry from the DMI quirk list. Credits to Jani for this idea.
v2: Split the basic
int_lvds_supportthing to a separate patch (Jani)
v3: RebaseCc: Jani Nikula <[email protected]>
Cc: Ondrej Zary <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105468
References: https://lists.freedesktop.org/archives/intel-gfx/2018-March/158408.htmlSigned-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_bios.c | 16 +++++++++++++--- drivers/gpu/drm/i915/intel_lvds.c | 5 ++++- drivers/gpu/drm/i915/intel_vbt_defs.h | 2 +- 3 files changed, 18 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/intel_bios.c +2
-3@@ -518,9 +518,19 @@ parse_driver_features(struct drm_i915_private *dev_priv,if (!driver)return ; -if (INTEL_GEN (dev_priv) >=5 && - driver->lvds_config ==BDB_DRIVER_FEATURE_EDP ) - dev_priv->vbt.int_lvds_support =0 ; +if (INTEL_GEN (dev_priv) >=5 ) { +/*
drivers/gpu/drm/i915/intel_bios.c parse_driver_features(struct drm_i915_private *dev_priv, · line 532
Quoted 10 lines
drivers/gpu/drm/i915/intel_bios.c +10
-0+* Note that we consider BDB_DRIVER_FEATURE_INT_SDVO_LVDS +* to mean "eDP". The VBT spec doesn't agree with that +* interpretation, but real world VBTs seem to. +*/ +if (driver->lvds_config !=BDB_DRIVER_FEATURE_INT_LVDS ) + dev_priv->vbt.int_lvds_support =0 ; + }else { +if (driver->lvds_config !=BDB_DRIVER_FEATURE_INT_LVDS && + driver->lvds_config !=BDB_DRIVER_FEATURE_INT_SDVO_LVDS ) + dev_priv->vbt.int_lvds_support =0 ;
Ugh. Actually we can't do this. I have a 85x machine myself that has an LVDS panel but the VBT LVDS config bits set to 0 :(
Looking at the revision history in some VBT spec, I see a note "0.92 | Add two definitions for VBT value of LVDS Active Config (00b and 11b values defined) | 06/13/2005". Unfortunately no information which VBT version this corresponds with.
I do have a 945gm machine with VBT version 134 that does have the LVDS config bits correctly populated. I believe the 2005 date does correspond pretty well with the release of 945 chipsets, so 945gm might be the first platform where we can actually trust this.
So I think we either have to just scrap this patch or limit it either to 945+ or VBT versions >= 134 (and we could refine that later if we discover older versions that have the bits populated already).
As to the bug report that started this whole thing, I think I'll just go ahead an apply the DMI quirk patch as that's a 85x machine and clearly we can't use the VBT information there.
Quoted 41 lines
drivers/gpu/drm/i915/intel_bios.c +1
-0+ }DRM_DEBUG_KMS ("DRRS State Enabled:%d\n" , driver->drrs_enabled);/* drivers/gpu/drm/i915/intel_lvds.c +4
-1@@ -962,8 +962,11 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)return ;/* Skip init on machines we know falsely report LVDS */ -if (dmi_check_system (intel_no_lvds)) +if (dmi_check_system (intel_no_lvds)) { +WARN (!dev_priv->vbt.int_lvds_support, +"Useless DMI match. Internal LVDS support disabled by VBT\n" );return ; + }if (!dev_priv->vbt.int_lvds_support) {DRM_DEBUG_KMS ("Internal LVDS support disabled by VBT\n" );drivers/gpu/drm/i915/intel_vbt_defs.h +1
-1@@ -635,7 +635,7 @@ struct bdb_sdvo_lvds_options {#define BDB_DRIVER_FEATURE_NO_LVDS 0#define BDB_DRIVER_FEATURE_INT_LVDS 1#define BDB_DRIVER_FEATURE_SDVO_LVDS 2 -#define BDB_DRIVER_FEATURE_EDP 3 +#define BDB_DRIVER_FEATURE_INT_SDVO_LVDS 3struct bdb_driver_features {u8 boot_dev_algorithm:1 ;Signature · 6 lines
2.16.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v4 1/1 drm/i915: Consult VBT "LVDS config" bits to determine whether internal LVDS is present
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
VBT seems to have some bits to tell us whether the internal LVDS port has something hooked up. In theory one might expect the VBT to not have a child device for the LVDS port if there's no panel hooked up, but in practice many VBTs still add the child device. The "LVDS config" bits seem more reliable though, so let's check those.
So far we've used the "LVDS config" bits to check for eDP support on ILK+, and disable the internal LVDS when the value is 3. That value is actually documented as "Both internal LVDS and SDVO LVDS", but in practice it looks to mean "eDP" on all the ilk+ VBTs I've seen. So let's keep that interpretation, but for pre-ILK we will consider the value 3 to also indicate the presence of the internal LVDS.
Currently we have 25 DMI matches for the "no internal LVDS" quirk. In an effort to reduce that let's toss in a WARN when the DMI match and VBT both tell us that the internal LVDS is not present. The hope is that people will report a bug, and then we can just nuke the corresponding entry from the DMI quirk list. Credits to Jani for this idea.
v2: Split the basic int_lvds_support thing to a separate patch (Jani)
v3: Rebase
v4: Limit this to VBT version >= 134
--- drivers/gpu/drm/i915/intel_bios.c | 28 +++++++++++++++++++++++++--- drivers/gpu/drm/i915/intel_lvds.c | 5 ++++- drivers/gpu/drm/i915/intel_vbt_defs.h | 2 +- 3 files changed, 30 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/intel_bios.c +25 -3
@@ -518,9 +518,31 @@ parse_driver_features(struct drm_i915_private *dev_priv,if (!driver)return ; -if (INTEL_GEN (dev_priv) >=5 && - driver->lvds_config ==BDB_DRIVER_FEATURE_EDP ) - dev_priv->vbt.int_lvds_support =0 ; +if (INTEL_GEN (dev_priv) >=5 ) { +/* +* Note that we consider BDB_DRIVER_FEATURE_INT_SDVO_LVDS +* to mean "eDP". The VBT spec doesn't agree with that +* interpretation, but real world VBTs seem to. +*/ +if (driver->lvds_config !=BDB_DRIVER_FEATURE_INT_LVDS ) + dev_priv->vbt.int_lvds_support =0 ; + }else { +/* +* FIXME it's not clear which BDB version has the LVDS config +* bits defined. Revision history in the VBT spec says: +* "0.92 | Add two definitions for VBT value of LVDS Active +* Config (00b and 11b values defined) | 06/13/2005" +* but does not the specify the BDB version. +* +* So far version 134 (on i945gm) is the oldest VBT observed +* in the wild with the bits correctly populated. Version +* 108 (on i85x) does not have the bits correctly populated. +*/ +if (bdb->version >=134 && + driver->lvds_config !=BDB_DRIVER_FEATURE_INT_LVDS && + driver->lvds_config !=BDB_DRIVER_FEATURE_INT_SDVO_LVDS ) + dev_priv->vbt.int_lvds_support =0 ; + }DRM_DEBUG_KMS ("DRRS State Enabled:%d\n" , driver->drrs_enabled);/*
drivers/gpu/drm/i915/intel_lvds.c +4 -1
@@ -973,8 +973,11 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)return ;/* Skip init on machines we know falsely report LVDS */ -if (dmi_check_system (intel_no_lvds)) +if (dmi_check_system (intel_no_lvds)) { +WARN (!dev_priv->vbt.int_lvds_support, +"Useless DMI match. Internal LVDS support disabled by VBT\n" );return ; + }if (!dev_priv->vbt.int_lvds_support) {DRM_DEBUG_KMS ("Internal LVDS support disabled by VBT\n" );
drivers/gpu/drm/i915/intel_vbt_defs.h +1 -1
@@ -635,7 +635,7 @@ struct bdb_sdvo_lvds_options {#define BDB_DRIVER_FEATURE_NO_LVDS 0#define BDB_DRIVER_FEATURE_INT_LVDS 1#define BDB_DRIVER_FEATURE_SDVO_LVDS 2 -#define BDB_DRIVER_FEATURE_EDP 3 +#define BDB_DRIVER_FEATURE_INT_SDVO_LVDS 3struct bdb_driver_features {u8 boot_dev_algorithm:1 ;
Signature · 6 lines
2.16.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v4 1/1] drm/i915: Consult VBT "LVDS config" bits to determine whether internal LVDS is present
Quoted 21 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
VBT seems to have some bits to tell us whether the internal LVDS port has something hooked up. In theory one might expect the VBT to not have a child device for the LVDS port if there's no panel hooked up, but in practice many VBTs still add the child device. The "LVDS config" bits seem more reliable though, so let's check those.
So far we've used the "LVDS config" bits to check for eDP support on ILK+, and disable the internal LVDS when the value is 3. That value is actually documented as "Both internal LVDS and SDVO LVDS", but in practice it looks to mean "eDP" on all the ilk+ VBTs I've seen. So let's keep that interpretation, but for pre-ILK we will consider the value 3 to also indicate the presence of the internal LVDS.
Currently we have 25 DMI matches for the "no internal LVDS" quirk. In an effort to reduce that let's toss in a WARN when the DMI match and VBT both tell us that the internal LVDS is not present. The hope is that people will report a bug, and then we can just nuke the corresponding entry from the DMI quirk list. Credits to Jani for this idea.
Quoted 7 lines
v2: Split the basic
int_lvds_supportthing to a separate patch (Jani)
v3: Rebase
v4: Limit this to VBT version >= 134Cc Jani Nikula <[email protected]>Cc Ondrej Zary <[email protected]>Signed-off-by Ville Syrjälä <[email protected]>
I picked up Jani's r-b from v3 and pushed to dinq. Let's see how badly I'll end up regretting this one...
Quoted 77 lines
--- drivers/gpu/drm/i915/intel_bios.c | 28 +++++++++++++++++++++++++--- drivers/gpu/drm/i915/intel_lvds.c | 5 ++++- drivers/gpu/drm/i915/intel_vbt_defs.h | 2 +- 3 files changed, 30 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/intel_bios.c +25
-3@@ -518,9 +518,31 @@ parse_driver_features(struct drm_i915_private *dev_priv,if (!driver)return ; -if (INTEL_GEN (dev_priv) >=5 && - driver->lvds_config ==BDB_DRIVER_FEATURE_EDP ) - dev_priv->vbt.int_lvds_support =0 ; +if (INTEL_GEN (dev_priv) >=5 ) { +/* +* Note that we consider BDB_DRIVER_FEATURE_INT_SDVO_LVDS +* to mean "eDP". The VBT spec doesn't agree with that +* interpretation, but real world VBTs seem to. +*/ +if (driver->lvds_config !=BDB_DRIVER_FEATURE_INT_LVDS ) + dev_priv->vbt.int_lvds_support =0 ; + }else { +/* +* FIXME it's not clear which BDB version has the LVDS config +* bits defined. Revision history in the VBT spec says: +* "0.92 | Add two definitions for VBT value of LVDS Active +* Config (00b and 11b values defined) | 06/13/2005" +* but does not the specify the BDB version. +* +* So far version 134 (on i945gm) is the oldest VBT observed +* in the wild with the bits correctly populated. Version +* 108 (on i85x) does not have the bits correctly populated. +*/ +if (bdb->version >=134 && + driver->lvds_config !=BDB_DRIVER_FEATURE_INT_LVDS && + driver->lvds_config !=BDB_DRIVER_FEATURE_INT_SDVO_LVDS ) + dev_priv->vbt.int_lvds_support =0 ; + }DRM_DEBUG_KMS ("DRRS State Enabled:%d\n" , driver->drrs_enabled);/* drivers/gpu/drm/i915/intel_lvds.c +4
-1@@ -973,8 +973,11 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)return ;/* Skip init on machines we know falsely report LVDS */ -if (dmi_check_system (intel_no_lvds)) +if (dmi_check_system (intel_no_lvds)) { +WARN (!dev_priv->vbt.int_lvds_support, +"Useless DMI match. Internal LVDS support disabled by VBT\n" );return ; + }if (!dev_priv->vbt.int_lvds_support) {DRM_DEBUG_KMS ("Internal LVDS support disabled by VBT\n" );drivers/gpu/drm/i915/intel_vbt_defs.h +1
-1@@ -635,7 +635,7 @@ struct bdb_sdvo_lvds_options {#define BDB_DRIVER_FEATURE_NO_LVDS 0#define BDB_DRIVER_FEATURE_INT_LVDS 1#define BDB_DRIVER_FEATURE_SDVO_LVDS 2 -#define BDB_DRIVER_FEATURE_EDP 3 +#define BDB_DRIVER_FEATURE_INT_SDVO_LVDS 3struct bdb_driver_features {u8 boot_dev_algorithm:1 ;Signature · 1 line
2.16.1
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 40 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
Replace
dev_priv->vbt.edp.supportwithdev_priv->vbt.int_lvds_support. We'll want to extend its use beyond the LVDS vs. eDP case in the future.Cc Jani Nikula <[email protected]>Cc Ondrej Zary <[email protected]>Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_bios.c | 5 ++++- drivers/gpu/drm/i915/intel_lvds.c | 9 +++++---- 3 files changed, 10 insertions(+), 6 deletions(-)drivers/gpu/drm/i915/i915_drv.h +1
-1@@ -1052,6 +1052,7 @@ struct intel_vbt_data { unsigned int lvds_vbt:1; unsigned int int_crt_support:1; unsigned int lvds_use_ssc:1; + unsigned int int_lvds_support:1; unsigned int display_clock_mode:1; unsigned int fdi_rx_polarity_inverted:1; unsigned int panel_type:4;@@ -1067,7 +1068,6 @@ struct intel_vbt_data {int vswing;bool low_vswing;bool initialized; -bool support;int bpp;struct edp_power_seq pps; } edp;drivers/gpu/drm/i915/intel_bios.c +0
-0
drivers/gpu/drm/i915/intel_bios.c parse_driver_features(struct drm_i915_private *dev_priv, · line 522
Quoted 5 lines
drivers/gpu/drm/i915/intel_bios.c +1
-1@@ -519,7 +519,7 @@ parse_driver_features(struct drm_i915_private *dev_priv,return ;if (driver->lvds_config ==BDB_DRIVER_FEATURE_EDP ) - dev_priv->vbt.edp.support =1 ; + dev_priv->vbt.int_lvds_support =0 ;
Sorry to nitpick, but this now changes behaviour for pre-PCH split platforms. Worse, patch 2 then reverts that change. I think you could've added the if (gen >= 5) check already here to not modify behaviour.
parse_edp() also needs to drop references to dev_priv->vbt.edp.support.
BR,
Jani.
Quoted 40 lines
drivers/gpu/drm/i915/intel_bios.c +3
-0DRM_DEBUG_KMS ("DRRS State Enabled:%d\n" , driver->drrs_enabled);/* @@ -1512,6 +1512,9 @@ init_vbt_defaults(struct drm_i915_private *dev_priv) dev_priv->vbt.int_tv_support =1 ; dev_priv->vbt.int_crt_support =1 ; +/* driver features */ + dev_priv->vbt.int_lvds_support =1 ; +/* Default to using SSC */ dev_priv->vbt.lvds_use_ssc =1 ;/* drivers/gpu/drm/i915/intel_lvds.c +5
-4@@ -965,6 +965,11 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)if (dmi_check_system (intel_no_lvds))return ; +if (!dev_priv->vbt.int_lvds_support) { +DRM_DEBUG_KMS ("Internal LVDS support disabled by VBT\n" ); +return ; + } +if (HAS_PCH_SPLIT (dev_priv)) lvds_reg =PCH_LVDS ;else @@ -975,10 +980,6 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)if (HAS_PCH_SPLIT (dev_priv)) {if ((lvds &LVDS_DETECTED ) ==0 )return ; -if (dev_priv->vbt.edp.support) { -DRM_DEBUG_KMS ("disable LVDS for eDP support\n" ); -return ; - } } pin =GMBUS_PIN_PANEL ;
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 43 lines · Jani Nikula
Quoted 42 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
Replace
dev_priv->vbt.edp.supportwithdev_priv->vbt.int_lvds_support. We'll want to extend its use beyond the LVDS vs. eDP case in the future.Cc Jani Nikula <[email protected]>Cc Ondrej Zary <[email protected]>Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_bios.c | 5 ++++- drivers/gpu/drm/i915/intel_lvds.c | 9 +++++---- 3 files changed, 10 insertions(+), 6 deletions(-)drivers/gpu/drm/i915/i915_drv.h +1
-1@@ -1052,6 +1052,7 @@ struct intel_vbt_data { unsigned int lvds_vbt:1; unsigned int int_crt_support:1; unsigned int lvds_use_ssc:1; + unsigned int int_lvds_support:1; unsigned int display_clock_mode:1; unsigned int fdi_rx_polarity_inverted:1; unsigned int panel_type:4;@@ -1067,7 +1068,6 @@ struct intel_vbt_data {int vswing;bool low_vswing;bool initialized; -bool support;int bpp;struct edp_power_seq pps; } edp;drivers/gpu/drm/i915/intel_bios.c +0
-0@@ -519,7 +519,7 @@ parse_driver_features(struct drm_i915_private *dev_priv,return ;
Quoted 7 lines
drivers/gpu/drm/i915/intel_bios.c parse_driver_features(struct drm_i915_private *dev_priv, · line 522
Quoted 3 lines
drivers/gpu/drm/i915/intel_bios.c +1
-1if (driver->lvds_config ==BDB_DRIVER_FEATURE_EDP ) - dev_priv->vbt.edp.support =1 ; + dev_priv->vbt.int_lvds_support =0 ;Sorry to nitpick, but this now changes behaviour for pre-PCH split platforms. Worse, patch 2 then reverts that change. I think you could've added the if (gen >= 5) check already here to not modify behaviour.
Ack.
Quoted 2 lines
parse_edp()also needs to drop references todev_priv->vbt.edp.support.
Hmm. Did I not even compile test this? Bad me.
Quoted 47 lines
BR,
Jani.Quoted 40 lines
drivers/gpu/drm/i915/intel_bios.c +3
-0DRM_DEBUG_KMS ("DRRS State Enabled:%d\n" , driver->drrs_enabled);/* @@ -1512,6 +1512,9 @@ init_vbt_defaults(struct drm_i915_private *dev_priv) dev_priv->vbt.int_tv_support =1 ; dev_priv->vbt.int_crt_support =1 ; +/* driver features */ + dev_priv->vbt.int_lvds_support =1 ; +/* Default to using SSC */ dev_priv->vbt.lvds_use_ssc =1 ;/* drivers/gpu/drm/i915/intel_lvds.c +5
-4@@ -965,6 +965,11 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)if (dmi_check_system (intel_no_lvds))return ; +if (!dev_priv->vbt.int_lvds_support) { +DRM_DEBUG_KMS ("Internal LVDS support disabled by VBT\n" ); +return ; + } +if (HAS_PCH_SPLIT (dev_priv)) lvds_reg =PCH_LVDS ;else @@ -975,10 +980,6 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)if (HAS_PCH_SPLIT (dev_priv)) {if ((lvds &LVDS_DETECTED ) ==0 )return ; -if (dev_priv->vbt.edp.support) { -DRM_DEBUG_KMS ("disable LVDS for eDP support\n" ); -return ; - } } pin =GMBUS_PIN_PANEL ;Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 3/3 drm/i915: Eliminate the unused dev_priv->vbt.lvds_vbt
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
dev_priv->vbt.lvds_vbt is set but never actually used. Kill it.
--- drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/intel_bios.c | 3 --- 2 files changed, 4 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +0 -1
@@ -1049,7 +1049,6 @@ struct intel_vbt_data {/* Feature bits */ unsigned int int_tv_support:1; unsigned int lvds_dither:1; - unsigned int lvds_vbt:1; unsigned int int_crt_support:1; unsigned int lvds_use_ssc:1; unsigned int int_lvds_support:1;
drivers/gpu/drm/i915/intel_bios.c +0 -3
@@ -267,8 +267,6 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,if (!lvds_lfp_data_ptrs)return ; - dev_priv->vbt.lvds_vbt =1 ; - panel_dvo_timing =get_lvds_dvo_timing (lvds_lfp_data, lvds_lfp_data_ptrs, panel_type);
@@ -1514,7 +1512,6 @@ init_vbt_defaults(struct drm_i915_private *dev_priv)/* LFP panel data */ dev_priv->vbt.lvds_dither =1 ; - dev_priv->vbt.lvds_vbt =0 ;/* SDVO panel data */ dev_priv->vbt.sdvo_lvds_vbt_mode =NULL ;
Signature · 6 lines
2.16.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.CHECKPATCH: warning for series starting with [v2,1/3] drm/i915: Replace vbt edp.support with int_lvds_support (rev3)
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: series starting with [v2,1/3] drm/i915: Replace vbt edp.support with int_lvds_support (rev3)
URL : https://patchwork.freedesktop.org/series/42874/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip fc3870b3cc0a drm/i915: Replace vbt edp.support with int_lvds_support b19c242bf040 drm/i915: Consult VBT "LVDS config" bits to determine whether internal LVDS is present -:35: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #35: References: https://lists.freedesktop.org/archives/intel-gfx/2018-March/158408.html
total: 0 errors, 1 warnings, 0 checks, 42 lines checked 5a2baecd6fa0 drm/i915: Eliminate the unused dev_priv->vbt.lvds_vbt
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.SPARSE: warning for series starting with [v2,1/3] drm/i915: Replace vbt edp.support with int_lvds_support (rev3)
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: series starting with [v2,1/3] drm/i915: Replace vbt edp.support with int_lvds_support (rev3)
URL : https://patchwork.freedesktop.org/series/42874/
State : warning
== Summary ==
$ dim sparse origin/drm-tip Commit: drm/i915: Replace vbt edp.support with int_lvds_support Okay!
Commit: drm/i915: Consult VBT "LVDS config" bits to determine whether internal LVDS is present Okay!
Commit: drm/i915: Eliminate the unused dev_priv->vbt.lvds_vbt -drivers/gpu/drm/i915/selftests/../i915_drv.h:3653:16: warning: expression using sizeof(void) +drivers/gpu/drm/i915/selftests/../i915_drv.h:3652:16: warning: expression using sizeof(void)
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for series starting with [v2,1/3] drm/i915: Replace vbt edp.support with int_lvds_support (rev3)
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: series starting with [v2,1/3] drm/i915: Replace vbt edp.support with int_lvds_support (rev3)
URL : https://patchwork.freedesktop.org/series/42874/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4158 -> Patchwork_8944 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/42874/revisions/3/mbox/
== Known issues ==
Here are the changes found in Patchwork_8944 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_flip@basic-flip-vs-modeset:
fi-cnl-y3: PASS -> INCOMPLETE (fdo#105086)
igt@kms_frontbuffer_tracking@basic:
{fi-hsw-peppy}: PASS -> DMESG-FAIL (fdo#102614, fdo#106103)
==== Possible fixes ====
igt@drv_module_reload@basic-reload:
fi-bsw-n3050: DMESG-FAIL (fdo#106373) -> PASS
igt@gem_exec_suspend@basic-s3:
fi-skl-guc: FAIL (fdo#104699, fdo#105900) -> PASS
igt@gem_exec_suspend@basic-s4-devices:
fi-kbl-7500u: DMESG-WARN (fdo#105128) -> PASS
igt@kms_frontbuffer_tracking@basic:
fi-hsw-4200u: DMESG-FAIL (fdo#102614, fdo#106103) -> PASS
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
fi-snb-2520m: INCOMPLETE (fdo#103713) -> PASS {name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#104699 https://bugs.freedesktop.org/show_bug.cgi?id=104699
fdo#105086 https://bugs.freedesktop.org/show_bug.cgi?id=105086
fdo#105128 https://bugs.freedesktop.org/show_bug.cgi?id=105128
fdo#105900 https://bugs.freedesktop.org/show_bug.cgi?id=105900
fdo#106103 https://bugs.freedesktop.org/show_bug.cgi?id=106103
fdo#106373 https://bugs.freedesktop.org/show_bug.cgi?id=106373
== Participating hosts (40 -> 37) ==
Additional (1): fi-byt-j1900
Missing (4): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-skl-6700hq
== Build changes ==
* Linux: CI_DRM_4158 -> Patchwork_8944
CI_DRM_4158: b4cf5831333d423c2420f167111c03e4c1729672 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4465: 41eb85f918b02918787fc59d9cb5aab93b81f323 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_8944: 5a2baecd6fa0e439d3c53af997195703ee7a71d3 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4465: 33e58d5583eb7ed3966a1b905f875a1dfa959f6b @ git://anongit.freedesktop.org/piglit
== Linux commits ==
5a2baecd6fa0 drm/i915: Eliminate the unused dev_priv->vbt.lvds_vbtb19c242bf040 drm/i915: Consult VBT "LVDS config" bits to determine whether internal LVDS is present fc3870b3cc0a drm/i915: Replace vbt edp.support with int_lvds_support
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8944/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for series starting with [v2,1/3] drm/i915: Replace vbt edp.support with int_lvds_support (rev3)
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: series starting with [v2,1/3] drm/i915: Replace vbt edp.support with int_lvds_support (rev3)
URL : https://patchwork.freedesktop.org/series/42874/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4158_full -> Patchwork_8944_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_8944_full need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_8944_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/42874/revisions/3/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_8944_full:
=== IGT changes ===
==== Warnings ====
igt@gem_mocs_settings@mocs-rc6-ctx-dirty-render:
shard-kbl: PASS -> SKIP +1
igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-onoff:
shard-hsw: SKIP -> PASS== Known issues ==
Here are the changes found in Patchwork_8944_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_ppgtt@blt-vs-render-ctxn:
shard-kbl: PASS -> INCOMPLETE (fdo#103665, fdo#106023)
igt@kms_flip@blocking-absolute-wf_vblank-interruptible:
shard-glk: PASS -> FAIL (fdo#106134)
igt@kms_flip@modeset-vs-vblank-race-interruptible:
shard-hsw: PASS -> FAIL (fdo#103060)
igt@kms_flip@plain-flip-fb-recreate:
shard-hsw: PASS -> FAIL (fdo#100368) +1
igt@kms_frontbuffer_tracking@basic:
shard-apl: PASS -> FAIL (fdo#104724, fdo#103167)
==== Possible fixes ====
igt@drv_selftest@live_gtt:
shard-apl: DMESG-FAIL -> PASS
igt@drv_selftest@live_hugepages:
shard-apl: INCOMPLETE (fdo#103927) -> PASS
igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy:
shard-hsw: FAIL (fdo#104873) -> PASS
igt@kms_flip@2x-plain-flip-ts-check:
shard-hsw: FAIL (fdo#103928) -> PASS
igt@kms_flip@absolute-wf_vblank-interruptible:
shard-glk: FAIL (fdo#106087) -> PASS
igt@kms_flip@plain-flip-ts-check-interruptible:
shard-glk: FAIL (fdo#105312) -> PASS
igt@kms_flip@wf_vblank-ts-check-interruptible:
shard-kbl: DMESG-WARN (fdo#105602, fdo#103558) -> PASS +4
igt@kms_rotation_crc@primary-rotation-270:
shard-apl: FAIL (fdo#104724, fdo#103925) -> PASS +1
igt@kms_setmode@basic:
shard-apl: FAIL (fdo#99912) -> PASS fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#103928 https://bugs.freedesktop.org/show_bug.cgi?id=103928
fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724
fdo#104873 https://bugs.freedesktop.org/show_bug.cgi?id=104873
fdo#105312 https://bugs.freedesktop.org/show_bug.cgi?id=105312
fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
fdo#106087 https://bugs.freedesktop.org/show_bug.cgi?id=106087
fdo#106134 https://bugs.freedesktop.org/show_bug.cgi?id=106134
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* Linux: CI_DRM_4158 -> Patchwork_8944
CI_DRM_4158: b4cf5831333d423c2420f167111c03e4c1729672 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4465: 41eb85f918b02918787fc59d9cb5aab93b81f323 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_8944: 5a2baecd6fa0e439d3c53af997195703ee7a71d3 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4465: 33e58d5583eb7ed3966a1b905f875a1dfa959f6b @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8944/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
kbuild test robot
build botThank you for the patch! Yet something to improve:
Hi Ville,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on v4.17-rc4 next-20180508]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Ville-Syrjala/drm-i915-Replace-vbt-edp-support-with-int_lvds_support/20180509-043426 base: git://anongit.freedesktop.org/drm-intel for-linux-next config: i386-randconfig-x003-201818 (attached as .config) compiler: gcc-7 (Debian 7.3.0-16) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=i386
All errors (new ones prefixed by >>):
drivers/gpu//drm/i915/intel_bios.c: In function 'parse_edp':
>> drivers/gpu//drm/i915/intel_bios.c:545:24: error: 'struct <anonymous>' has no member named 'support'
if (dev_priv->vbt.edp.support)
^vim +545 drivers/gpu//drm/i915/intel_bios.c
32f9d658a Zhenyu Wang 2009-07-24 534
6363ee6f4 Zhao Yakui 2009-11-24 535 static void
dcb58a40c Jani Nikula 2015-05-12 536 parse_edp(struct drm_i915_private *dev_priv, const struct bdb_header *bdb)
500a8cc46 Zhenyu Wang 2010-01-13 537 {
e8ef3b4c9 Jani Nikula 2015-04-15 538 const struct bdb_edp *edp;
e8ef3b4c9 Jani Nikula 2015-04-15 539 const struct edp_power_seq *edp_pps;
058727ee8 Jani Nikula 2017-08-25 540 const struct edp_fast_link_params *edp_link_params;
3e845c7a4 Ville Syrjälä 2016-04-08 541 int panel_type = dev_priv->vbt.panel_type;
500a8cc46 Zhenyu Wang 2010-01-13 542
500a8cc46 Zhenyu Wang 2010-01-13 543 edp = find_section(bdb, BDB_EDP);
500a8cc46 Zhenyu Wang 2010-01-13 544 if (!edp) {
6aa23e658 Jani Nikula 2016-03-24 @545 if (dev_priv->vbt.edp.support)
9a30a61f3 Jani Nikula 2012-11-12 546 DRM_DEBUG_KMS("No eDP BDB found but eDP panel supported.\n");
500a8cc46 Zhenyu Wang 2010-01-13 547 return;
500a8cc46 Zhenyu Wang 2010-01-13 548 }
500a8cc46 Zhenyu Wang 2010-01-13 549
500a8cc46 Zhenyu Wang 2010-01-13 550 switch ((edp->color_depth >> (panel_type * 2)) & 3) {
500a8cc46 Zhenyu Wang 2010-01-13 551 case EDP_18BPP:
6aa23e658 Jani Nikula 2016-03-24 552 dev_priv->vbt.edp.bpp = 18;
500a8cc46 Zhenyu Wang 2010-01-13 553 break;
500a8cc46 Zhenyu Wang 2010-01-13 554 case EDP_24BPP:
6aa23e658 Jani Nikula 2016-03-24 555 dev_priv->vbt.edp.bpp = 24;
500a8cc46 Zhenyu Wang 2010-01-13 556 break;
500a8cc46 Zhenyu Wang 2010-01-13 557 case EDP_30BPP:
6aa23e658 Jani Nikula 2016-03-24 558 dev_priv->vbt.edp.bpp = 30;
500a8cc46 Zhenyu Wang 2010-01-13 559 break;
500a8cc46 Zhenyu Wang 2010-01-13 560 }
5ceb0f9bb Chris Wilson 2010-09-24 561
9f0e7ff4b Jesse Barnes 2010-10-07 562 /* Get the eDP sequencing and link info */
9f0e7ff4b Jesse Barnes 2010-10-07 563 edp_pps = &edp->power_seqs[panel_type];
058727ee8 Jani Nikula 2017-08-25 564 edp_link_params = &edp->fast_link_params[panel_type];
5ceb0f9bb Chris Wilson 2010-09-24 565
6aa23e658 Jani Nikula 2016-03-24 566 dev_priv->vbt.edp.pps = *edp_pps;
5ceb0f9bb Chris Wilson 2010-09-24 567
e13e2b2c4 Jani Nikula 2014-05-06 568 switch (edp_link_params->rate) {
e13e2b2c4 Jani Nikula 2014-05-06 569 case EDP_RATE_1_62:
6aa23e658 Jani Nikula 2016-03-24 570 dev_priv->vbt.edp.rate = DP_LINK_BW_1_62;
e13e2b2c4 Jani Nikula 2014-05-06 571 break;
e13e2b2c4 Jani Nikula 2014-05-06 572 case EDP_RATE_2_7:
6aa23e658 Jani Nikula 2016-03-24 573 dev_priv->vbt.edp.rate = DP_LINK_BW_2_7;
e13e2b2c4 Jani Nikula 2014-05-06 574 break;
e13e2b2c4 Jani Nikula 2014-05-06 575 default:
e13e2b2c4 Jani Nikula 2014-05-06 576 DRM_DEBUG_KMS("VBT has unknown eDP link rate value %u\n",
e13e2b2c4 Jani Nikula 2014-05-06 577 edp_link_params->rate);
e13e2b2c4 Jani Nikula 2014-05-06 578 break;
e13e2b2c4 Jani Nikula 2014-05-06 579 }
e13e2b2c4 Jani Nikula 2014-05-06 580
9f0e7ff4b Jesse Barnes 2010-10-07 581 switch (edp_link_params->lanes) {
e13e2b2c4 Jani Nikula 2014-05-06 582 case EDP_LANE_1:
6aa23e658 Jani Nikula 2016-03-24 583 dev_priv->vbt.edp.lanes = 1;
9f0e7ff4b Jesse Barnes 2010-10-07 584 break;
e13e2b2c4 Jani Nikula 2014-05-06 585 case EDP_LANE_2:
6aa23e658 Jani Nikula 2016-03-24 586 dev_priv->vbt.edp.lanes = 2;
9f0e7ff4b Jesse Barnes 2010-10-07 587 break;
e13e2b2c4 Jani Nikula 2014-05-06 588 case EDP_LANE_4:
6aa23e658 Jani Nikula 2016-03-24 589 dev_priv->vbt.edp.lanes = 4;
9f0e7ff4b Jesse Barnes 2010-10-07 590 break;
e13e2b2c4 Jani Nikula 2014-05-06 591 default:
e13e2b2c4 Jani Nikula 2014-05-06 592 DRM_DEBUG_KMS("VBT has unknown eDP lane count value %u\n",
e13e2b2c4 Jani Nikula 2014-05-06 593 edp_link_params->lanes);
e13e2b2c4 Jani Nikula 2014-05-06 594 break;
9f0e7ff4b Jesse Barnes 2010-10-07 595 }
e13e2b2c4 Jani Nikula 2014-05-06 596
9f0e7ff4b Jesse Barnes 2010-10-07 597 switch (edp_link_params->preemphasis) {
e13e2b2c4 Jani Nikula 2014-05-06 598 case EDP_PREEMPHASIS_NONE:
6aa23e658 Jani Nikula 2016-03-24 599 dev_priv->vbt.edp.preemphasis = DP_TRAIN_PRE_EMPH_LEVEL_0;
9f0e7ff4b Jesse Barnes 2010-10-07 600 break;
e13e2b2c4 Jani Nikula 2014-05-06 601 case EDP_PREEMPHASIS_3_5dB:
6aa23e658 Jani Nikula 2016-03-24 602 dev_priv->vbt.edp.preemphasis = DP_TRAIN_PRE_EMPH_LEVEL_1;
9f0e7ff4b Jesse Barnes 2010-10-07 603 break;
e13e2b2c4 Jani Nikula 2014-05-06 604 case EDP_PREEMPHASIS_6dB:
6aa23e658 Jani Nikula 2016-03-24 605 dev_priv->vbt.edp.preemphasis = DP_TRAIN_PRE_EMPH_LEVEL_2;
9f0e7ff4b Jesse Barnes 2010-10-07 606 break;
e13e2b2c4 Jani Nikula 2014-05-06 607 case EDP_PREEMPHASIS_9_5dB:
6aa23e658 Jani Nikula 2016-03-24 608 dev_priv->vbt.edp.preemphasis = DP_TRAIN_PRE_EMPH_LEVEL_3;
9f0e7ff4b Jesse Barnes 2010-10-07 609 break;
e13e2b2c4 Jani Nikula 2014-05-06 610 default:
e13e2b2c4 Jani Nikula 2014-05-06 611 DRM_DEBUG_KMS("VBT has unknown eDP pre-emphasis value %u\n",
e13e2b2c4 Jani Nikula 2014-05-06 612 edp_link_params->preemphasis);
e13e2b2c4 Jani Nikula 2014-05-06 613 break;
9f0e7ff4b Jesse Barnes 2010-10-07 614 }
e13e2b2c4 Jani Nikula 2014-05-06 615
9f0e7ff4b Jesse Barnes 2010-10-07 616 switch (edp_link_params->vswing) {
e13e2b2c4 Jani Nikula 2014-05-06 617 case EDP_VSWING_0_4V:
6aa23e658 Jani Nikula 2016-03-24 618 dev_priv->vbt.edp.vswing = DP_TRAIN_VOLTAGE_SWING_LEVEL_0;
9f0e7ff4b Jesse Barnes 2010-10-07 619 break;
e13e2b2c4 Jani Nikula 2014-05-06 620 case EDP_VSWING_0_6V:
6aa23e658 Jani Nikula 2016-03-24 621 dev_priv->vbt.edp.vswing = DP_TRAIN_VOLTAGE_SWING_LEVEL_1;
9f0e7ff4b Jesse Barnes 2010-10-07 622 break;
e13e2b2c4 Jani Nikula 2014-05-06 623 case EDP_VSWING_0_8V:
6aa23e658 Jani Nikula 2016-03-24 624 dev_priv->vbt.edp.vswing = DP_TRAIN_VOLTAGE_SWING_LEVEL_2;
9f0e7ff4b Jesse Barnes 2010-10-07 625 break;
e13e2b2c4 Jani Nikula 2014-05-06 626 case EDP_VSWING_1_2V:
6aa23e658 Jani Nikula 2016-03-24 627 dev_priv->vbt.edp.vswing = DP_TRAIN_VOLTAGE_SWING_LEVEL_3;
9f0e7ff4b Jesse Barnes 2010-10-07 628 break;
e13e2b2c4 Jani Nikula 2014-05-06 629 default:
e13e2b2c4 Jani Nikula 2014-05-06 630 DRM_DEBUG_KMS("VBT has unknown eDP voltage swing value %u\n",
e13e2b2c4 Jani Nikula 2014-05-06 631 edp_link_params->vswing);
e13e2b2c4 Jani Nikula 2014-05-06 632 break;
9f0e7ff4b Jesse Barnes 2010-10-07 633 }
9a57f5bb7 Sonika Jindal 2015-02-25 634
9a57f5bb7 Sonika Jindal 2015-02-25 635 if (bdb->version >= 173) {
9a57f5bb7 Sonika Jindal 2015-02-25 636 uint8_t vswing;
9a57f5bb7 Sonika Jindal 2015-02-25 637
9e4580346 Sonika Jindal 2015-05-06 638 /* Don't read from VBT if module parameter has valid value*/
4f044a88a Michal Wajdeczko 2017-09-19 639 if (i915_modparams.edp_vswing) {
4f044a88a Michal Wajdeczko 2017-09-19 640 dev_priv->vbt.edp.low_vswing =
4f044a88a Michal Wajdeczko 2017-09-19 641 i915_modparams.edp_vswing == 1;
9e4580346 Sonika Jindal 2015-05-06 642 } else {
9a57f5bb7 Sonika Jindal 2015-02-25 643 vswing = (edp->edp_vswing_preemph >> (panel_type * 4)) & 0xF;
06411f08b Jani Nikula 2016-03-24 644 dev_priv->vbt.edp.low_vswing = vswing == 0;
9e4580346 Sonika Jindal 2015-05-06 645 }
9a57f5bb7 Sonika Jindal 2015-02-25 646 }
500a8cc46 Zhenyu Wang 2010-01-13 647 }
500a8cc46 Zhenyu Wang 2010-01-13 648 :::::: The code at line 545 was first introduced by commit
:::::: 6aa23e658d910342e8fedb23780638ddaed744d7 drm/i915: use a substruct in vbt data for edp
:::::: TO: Jani Nikula <[email protected]> :::::: CC: Jani Nikula <[email protected]>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
kbuild test robot
build botThank you for the patch! Perhaps something to improve:
Hi Ville,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on v4.17-rc4 next-20180508]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Ville-Syrjala/drm-i915-Replace-vbt-edp-support-with-int_lvds_support/20180509-043426 base: git://anongit.freedesktop.org/drm-intel for-linux-next config: i386-randconfig-x076-201818 (attached as .config) compiler: gcc-7 (Debian 7.3.0-16) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=i386
All warnings (new ones prefixed by >>):
In file included from include/linux/string.h:6:0,
from include/linux/uuid.h:20,
from include/linux/mod_devicetable.h:13,
from include/linux/i2c.h:29,
from include/drm/drm_dp_helper.h:27,
from drivers/gpu//drm/i915/intel_bios.c:28:
drivers/gpu//drm/i915/intel_bios.c: In function 'parse_edp':
drivers/gpu//drm/i915/intel_bios.c:545:24: error: 'struct <anonymous>' has no member named 'support'
if (dev_priv->vbt.edp.support)
^
include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^~~~
>> drivers/gpu//drm/i915/intel_bios.c:545:3: note: in expansion of macro 'if'
if (dev_priv->vbt.edp.support)
^~
drivers/gpu//drm/i915/intel_bios.c:545:24: error: 'struct <anonymous>' has no member named 'support'
if (dev_priv->vbt.edp.support)
^
include/linux/compiler.h:58:42: note: in definition of macro '__trace_if'
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^~~~
>> drivers/gpu//drm/i915/intel_bios.c:545:3: note: in expansion of macro 'if'
if (dev_priv->vbt.edp.support)
^~
drivers/gpu//drm/i915/intel_bios.c:545:24: error: 'struct <anonymous>' has no member named 'support'
if (dev_priv->vbt.edp.support)
^
include/linux/compiler.h:69:16: note: in definition of macro '__trace_if'
______r = !!(cond); \
^~~~
>> drivers/gpu//drm/i915/intel_bios.c:545:3: note: in expansion of macro 'if'
if (dev_priv->vbt.edp.support)
^~vim +/if +545 drivers/gpu//drm/i915/intel_bios.c
32f9d658a Zhenyu Wang 2009-07-24 534
6363ee6f4 Zhao Yakui 2009-11-24 535 static void
dcb58a40c Jani Nikula 2015-05-12 536 parse_edp(struct drm_i915_private *dev_priv, const struct bdb_header *bdb)
500a8cc46 Zhenyu Wang 2010-01-13 537 {
e8ef3b4c9 Jani Nikula 2015-04-15 538 const struct bdb_edp *edp;
e8ef3b4c9 Jani Nikula 2015-04-15 539 const struct edp_power_seq *edp_pps;
058727ee8 Jani Nikula 2017-08-25 540 const struct edp_fast_link_params *edp_link_params;
3e845c7a4 Ville Syrjälä 2016-04-08 541 int panel_type = dev_priv->vbt.panel_type;
500a8cc46 Zhenyu Wang 2010-01-13 542
500a8cc46 Zhenyu Wang 2010-01-13 543 edp = find_section(bdb, BDB_EDP);
500a8cc46 Zhenyu Wang 2010-01-13 544 if (!edp) {
6aa23e658 Jani Nikula 2016-03-24 @545 if (dev_priv->vbt.edp.support)
9a30a61f3 Jani Nikula 2012-11-12 546 DRM_DEBUG_KMS("No eDP BDB found but eDP panel supported.\n");
500a8cc46 Zhenyu Wang 2010-01-13 547 return;
500a8cc46 Zhenyu Wang 2010-01-13 548 }
500a8cc46 Zhenyu Wang 2010-01-13 549
500a8cc46 Zhenyu Wang 2010-01-13 550 switch ((edp->color_depth >> (panel_type * 2)) & 3) {
500a8cc46 Zhenyu Wang 2010-01-13 551 case EDP_18BPP:
6aa23e658 Jani Nikula 2016-03-24 552 dev_priv->vbt.edp.bpp = 18;
500a8cc46 Zhenyu Wang 2010-01-13 553 break;
500a8cc46 Zhenyu Wang 2010-01-13 554 case EDP_24BPP:
6aa23e658 Jani Nikula 2016-03-24 555 dev_priv->vbt.edp.bpp = 24;
500a8cc46 Zhenyu Wang 2010-01-13 556 break;
500a8cc46 Zhenyu Wang 2010-01-13 557 case EDP_30BPP:
6aa23e658 Jani Nikula 2016-03-24 558 dev_priv->vbt.edp.bpp = 30;
500a8cc46 Zhenyu Wang 2010-01-13 559 break;
500a8cc46 Zhenyu Wang 2010-01-13 560 }
5ceb0f9bb Chris Wilson 2010-09-24 561
9f0e7ff4b Jesse Barnes 2010-10-07 562 /* Get the eDP sequencing and link info */
9f0e7ff4b Jesse Barnes 2010-10-07 563 edp_pps = &edp->power_seqs[panel_type];
058727ee8 Jani Nikula 2017-08-25 564 edp_link_params = &edp->fast_link_params[panel_type];
5ceb0f9bb Chris Wilson 2010-09-24 565
6aa23e658 Jani Nikula 2016-03-24 566 dev_priv->vbt.edp.pps = *edp_pps;
5ceb0f9bb Chris Wilson 2010-09-24 567
e13e2b2c4 Jani Nikula 2014-05-06 568 switch (edp_link_params->rate) {
e13e2b2c4 Jani Nikula 2014-05-06 569 case EDP_RATE_1_62:
6aa23e658 Jani Nikula 2016-03-24 570 dev_priv->vbt.edp.rate = DP_LINK_BW_1_62;
e13e2b2c4 Jani Nikula 2014-05-06 571 break;
e13e2b2c4 Jani Nikula 2014-05-06 572 case EDP_RATE_2_7:
6aa23e658 Jani Nikula 2016-03-24 573 dev_priv->vbt.edp.rate = DP_LINK_BW_2_7;
e13e2b2c4 Jani Nikula 2014-05-06 574 break;
e13e2b2c4 Jani Nikula 2014-05-06 575 default:
e13e2b2c4 Jani Nikula 2014-05-06 576 DRM_DEBUG_KMS("VBT has unknown eDP link rate value %u\n",
e13e2b2c4 Jani Nikula 2014-05-06 577 edp_link_params->rate);
e13e2b2c4 Jani Nikula 2014-05-06 578 break;
e13e2b2c4 Jani Nikula 2014-05-06 579 }
e13e2b2c4 Jani Nikula 2014-05-06 580
9f0e7ff4b Jesse Barnes 2010-10-07 581 switch (edp_link_params->lanes) {
e13e2b2c4 Jani Nikula 2014-05-06 582 case EDP_LANE_1:
6aa23e658 Jani Nikula 2016-03-24 583 dev_priv->vbt.edp.lanes = 1;
9f0e7ff4b Jesse Barnes 2010-10-07 584 break;
e13e2b2c4 Jani Nikula 2014-05-06 585 case EDP_LANE_2:
6aa23e658 Jani Nikula 2016-03-24 586 dev_priv->vbt.edp.lanes = 2;
9f0e7ff4b Jesse Barnes 2010-10-07 587 break;
e13e2b2c4 Jani Nikula 2014-05-06 588 case EDP_LANE_4:
6aa23e658 Jani Nikula 2016-03-24 589 dev_priv->vbt.edp.lanes = 4;
9f0e7ff4b Jesse Barnes 2010-10-07 590 break;
e13e2b2c4 Jani Nikula 2014-05-06 591 default:
e13e2b2c4 Jani Nikula 2014-05-06 592 DRM_DEBUG_KMS("VBT has unknown eDP lane count value %u\n",
e13e2b2c4 Jani Nikula 2014-05-06 593 edp_link_params->lanes);
e13e2b2c4 Jani Nikula 2014-05-06 594 break;
9f0e7ff4b Jesse Barnes 2010-10-07 595 }
e13e2b2c4 Jani Nikula 2014-05-06 596
9f0e7ff4b Jesse Barnes 2010-10-07 597 switch (edp_link_params->preemphasis) {
e13e2b2c4 Jani Nikula 2014-05-06 598 case EDP_PREEMPHASIS_NONE:
6aa23e658 Jani Nikula 2016-03-24 599 dev_priv->vbt.edp.preemphasis = DP_TRAIN_PRE_EMPH_LEVEL_0;
9f0e7ff4b Jesse Barnes 2010-10-07 600 break;
e13e2b2c4 Jani Nikula 2014-05-06 601 case EDP_PREEMPHASIS_3_5dB:
6aa23e658 Jani Nikula 2016-03-24 602 dev_priv->vbt.edp.preemphasis = DP_TRAIN_PRE_EMPH_LEVEL_1;
9f0e7ff4b Jesse Barnes 2010-10-07 603 break;
e13e2b2c4 Jani Nikula 2014-05-06 604 case EDP_PREEMPHASIS_6dB:
6aa23e658 Jani Nikula 2016-03-24 605 dev_priv->vbt.edp.preemphasis = DP_TRAIN_PRE_EMPH_LEVEL_2;
9f0e7ff4b Jesse Barnes 2010-10-07 606 break;
e13e2b2c4 Jani Nikula 2014-05-06 607 case EDP_PREEMPHASIS_9_5dB:
6aa23e658 Jani Nikula 2016-03-24 608 dev_priv->vbt.edp.preemphasis = DP_TRAIN_PRE_EMPH_LEVEL_3;
9f0e7ff4b Jesse Barnes 2010-10-07 609 break;
e13e2b2c4 Jani Nikula 2014-05-06 610 default:
e13e2b2c4 Jani Nikula 2014-05-06 611 DRM_DEBUG_KMS("VBT has unknown eDP pre-emphasis value %u\n",
e13e2b2c4 Jani Nikula 2014-05-06 612 edp_link_params->preemphasis);
e13e2b2c4 Jani Nikula 2014-05-06 613 break;
9f0e7ff4b Jesse Barnes 2010-10-07 614 }
e13e2b2c4 Jani Nikula 2014-05-06 615
9f0e7ff4b Jesse Barnes 2010-10-07 616 switch (edp_link_params->vswing) {
e13e2b2c4 Jani Nikula 2014-05-06 617 case EDP_VSWING_0_4V:
6aa23e658 Jani Nikula 2016-03-24 618 dev_priv->vbt.edp.vswing = DP_TRAIN_VOLTAGE_SWING_LEVEL_0;
9f0e7ff4b Jesse Barnes 2010-10-07 619 break;
e13e2b2c4 Jani Nikula 2014-05-06 620 case EDP_VSWING_0_6V:
6aa23e658 Jani Nikula 2016-03-24 621 dev_priv->vbt.edp.vswing = DP_TRAIN_VOLTAGE_SWING_LEVEL_1;
9f0e7ff4b Jesse Barnes 2010-10-07 622 break;
e13e2b2c4 Jani Nikula 2014-05-06 623 case EDP_VSWING_0_8V:
6aa23e658 Jani Nikula 2016-03-24 624 dev_priv->vbt.edp.vswing = DP_TRAIN_VOLTAGE_SWING_LEVEL_2;
9f0e7ff4b Jesse Barnes 2010-10-07 625 break;
e13e2b2c4 Jani Nikula 2014-05-06 626 case EDP_VSWING_1_2V:
6aa23e658 Jani Nikula 2016-03-24 627 dev_priv->vbt.edp.vswing = DP_TRAIN_VOLTAGE_SWING_LEVEL_3;
9f0e7ff4b Jesse Barnes 2010-10-07 628 break;
e13e2b2c4 Jani Nikula 2014-05-06 629 default:
e13e2b2c4 Jani Nikula 2014-05-06 630 DRM_DEBUG_KMS("VBT has unknown eDP voltage swing value %u\n",
e13e2b2c4 Jani Nikula 2014-05-06 631 edp_link_params->vswing);
e13e2b2c4 Jani Nikula 2014-05-06 632 break;
9f0e7ff4b Jesse Barnes 2010-10-07 633 }
9a57f5bb7 Sonika Jindal 2015-02-25 634
9a57f5bb7 Sonika Jindal 2015-02-25 635 if (bdb->version >= 173) {
9a57f5bb7 Sonika Jindal 2015-02-25 636 uint8_t vswing;
9a57f5bb7 Sonika Jindal 2015-02-25 637
9e4580346 Sonika Jindal 2015-05-06 638 /* Don't read from VBT if module parameter has valid value*/
4f044a88a Michal Wajdeczko 2017-09-19 639 if (i915_modparams.edp_vswing) {
4f044a88a Michal Wajdeczko 2017-09-19 640 dev_priv->vbt.edp.low_vswing =
4f044a88a Michal Wajdeczko 2017-09-19 641 i915_modparams.edp_vswing == 1;
9e4580346 Sonika Jindal 2015-05-06 642 } else {
9a57f5bb7 Sonika Jindal 2015-02-25 643 vswing = (edp->edp_vswing_preemph >> (panel_type * 4)) & 0xF;
06411f08b Jani Nikula 2016-03-24 644 dev_priv->vbt.edp.low_vswing = vswing == 0;
9e4580346 Sonika Jindal 2015-05-06 645 }
9a57f5bb7 Sonika Jindal 2015-02-25 646 }
500a8cc46 Zhenyu Wang 2010-01-13 647 }
500a8cc46 Zhenyu Wang 2010-01-13 648 :::::: The code at line 545 was first introduced by commit
:::::: 6aa23e658d910342e8fedb23780638ddaed744d7 drm/i915: use a substruct in vbt data for edp
:::::: TO: Jani Nikula <[email protected]> :::::: CC: Jani Nikula <[email protected]>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx