* [PATCH v2 1/3] drm/i915: Replace vbt edp.support with int_lvds_support
@ 2018-05-08 12:41 Ville Syrjala
2018-05-08 12:41 ` [PATCH v2 2/3] drm/i915: Consult VBT "LVDS config" bits to determine whether internal LVDS is present Ville Syrjala
` (9 more replies)
0 siblings, 10 replies; 18+ messages in thread
From: Ville Syrjala @ 2018-05-08 12:41 UTC (permalink / raw)
To: intel-gfx; +Cc: Jani Nikula, Ondrej Zary
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
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.
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
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(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 04e27806e581..3bdc7cfd4189 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -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;
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 702d3fab97fc..49c6816d008c 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -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;
/*
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index d35d2d50f595..05d012358df8 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -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;
--
2.16.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH v2 2/3] drm/i915: Consult VBT "LVDS config" bits to determine whether internal LVDS is present
2018-05-08 12:41 [PATCH v2 1/3] drm/i915: Replace vbt edp.support with int_lvds_support Ville Syrjala
@ 2018-05-08 12:41 ` Ville Syrjala
2018-05-08 14:08 ` [PATCH v3 " Ville Syrjala
2018-05-18 15:01 ` [PATCH v4 1/1] " Ville Syrjala
2018-05-08 12:41 ` [PATCH v2 3/3] drm/i915: Eliminate the unused dev_priv->vbt.lvds_vbt Ville Syrjala
` (8 subsequent siblings)
9 siblings, 2 replies; 18+ messages in thread
From: Ville Syrjala @ 2018-05-08 12:41 UTC (permalink / raw)
To: intel-gfx; +Cc: Jani Nikula, Ondrej Zary
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
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 <jani.nikula@intel.com>
Cc: Ondrej Zary <linux@rainbow-software.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105468
References: https://lists.freedesktop.org/archives/intel-gfx/2018-March/158408.html
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
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(-)
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 49c6816d008c..1747fa627a38 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -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);
/*
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 05d012358df8..5e5a77927369 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -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");
diff --git a/drivers/gpu/drm/i915/intel_vbt_defs.h b/drivers/gpu/drm/i915/intel_vbt_defs.h
index 458468237b5f..39c804624179 100644
--- a/drivers/gpu/drm/i915/intel_vbt_defs.h
+++ b/drivers/gpu/drm/i915/intel_vbt_defs.h
@@ -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 3
struct bdb_driver_features {
u8 boot_dev_algorithm:1;
--
2.16.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH v2 3/3] drm/i915: Eliminate the unused dev_priv->vbt.lvds_vbt
2018-05-08 12:41 [PATCH v2 1/3] drm/i915: Replace vbt edp.support with int_lvds_support Ville Syrjala
2018-05-08 12:41 ` [PATCH v2 2/3] drm/i915: Consult VBT "LVDS config" bits to determine whether internal LVDS is present Ville Syrjala
@ 2018-05-08 12:41 ` Ville Syrjala
2018-05-08 13:29 ` [PATCH v2 1/3] drm/i915: Replace vbt edp.support with int_lvds_support Jani Nikula
` (7 subsequent siblings)
9 siblings, 0 replies; 18+ messages in thread
From: Ville Syrjala @ 2018-05-08 12:41 UTC (permalink / raw)
To: intel-gfx
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
dev_priv->vbt.lvds_vbt is set but never actually used. Kill it.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
drivers/gpu/drm/i915/i915_drv.h | 1 -
drivers/gpu/drm/i915/intel_bios.c | 3 ---
2 files changed, 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 3bdc7cfd4189..8fb6fe1c788a 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -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;
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 1747fa627a38..cf53edcdba21 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -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;
--
2.16.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH v2 1/3] drm/i915: Replace vbt edp.support with int_lvds_support
2018-05-08 12:41 [PATCH v2 1/3] drm/i915: Replace vbt edp.support with int_lvds_support Ville Syrjala
2018-05-08 12:41 ` [PATCH v2 2/3] drm/i915: Consult VBT "LVDS config" bits to determine whether internal LVDS is present Ville Syrjala
2018-05-08 12:41 ` [PATCH v2 3/3] drm/i915: Eliminate the unused dev_priv->vbt.lvds_vbt Ville Syrjala
@ 2018-05-08 13:29 ` Jani Nikula
2018-05-08 13:41 ` Ville Syrjälä
2018-05-08 14:08 ` Ville Syrjala
` (6 subsequent siblings)
9 siblings, 1 reply; 18+ messages in thread
From: Jani Nikula @ 2018-05-08 13:29 UTC (permalink / raw)
To: Ville Syrjala, intel-gfx; +Cc: Ondrej Zary
On Tue, 08 May 2018, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> 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.
>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Ondrej Zary <linux@rainbow-software.org>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> 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(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 04e27806e581..3bdc7cfd4189 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -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;
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index 702d3fab97fc..49c6816d008c 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -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.
>
> 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;
> /*
> diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
> index d35d2d50f595..05d012358df8 100644
> --- a/drivers/gpu/drm/i915/intel_lvds.c
> +++ b/drivers/gpu/drm/i915/intel_lvds.c
> @@ -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;
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v2 1/3] drm/i915: Replace vbt edp.support with int_lvds_support
2018-05-08 13:29 ` [PATCH v2 1/3] drm/i915: Replace vbt edp.support with int_lvds_support Jani Nikula
@ 2018-05-08 13:41 ` Ville Syrjälä
0 siblings, 0 replies; 18+ messages in thread
From: Ville Syrjälä @ 2018-05-08 13:41 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx, Ondrej Zary
On Tue, May 08, 2018 at 04:29:01PM +0300, Jani Nikula wrote:
> On Tue, 08 May 2018, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > 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.
> >
> > Cc: Jani Nikula <jani.nikula@intel.com>
> > Cc: Ondrej Zary <linux@rainbow-software.org>
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > 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(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> > index 04e27806e581..3bdc7cfd4189 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.h
> > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > @@ -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;
> > diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> > index 702d3fab97fc..49c6816d008c 100644
> > --- a/drivers/gpu/drm/i915/intel_bios.c
> > +++ b/drivers/gpu/drm/i915/intel_bios.c
> > @@ -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.
Ack.
>
> parse_edp() also needs to drop references to dev_priv->vbt.edp.support.
Hmm. Did I not even compile test this? Bad me.
>
> BR,
> Jani.
>
> >
> > 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;
> > /*
> > diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
> > index d35d2d50f595..05d012358df8 100644
> > --- a/drivers/gpu/drm/i915/intel_lvds.c
> > +++ b/drivers/gpu/drm/i915/intel_lvds.c
> > @@ -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;
>
> --
> Jani Nikula, Intel Open Source Technology Center
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH v2 1/3] drm/i915: Replace vbt edp.support with int_lvds_support
2018-05-08 12:41 [PATCH v2 1/3] drm/i915: Replace vbt edp.support with int_lvds_support Ville Syrjala
` (2 preceding siblings ...)
2018-05-08 13:29 ` [PATCH v2 1/3] drm/i915: Replace vbt edp.support with int_lvds_support Jani Nikula
@ 2018-05-08 14:08 ` Ville Syrjala
2018-05-08 14:18 ` Jani Nikula
2018-05-08 16:21 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [v2,1/3] drm/i915: Replace vbt edp.support with int_lvds_support (rev3) Patchwork
` (5 subsequent siblings)
9 siblings, 1 reply; 18+ messages in thread
From: Ville Syrjala @ 2018-05-08 14:08 UTC (permalink / raw)
To: intel-gfx; +Cc: Jani Nikula, Ondrej Zary
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
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)
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
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(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 04e27806e581..3bdc7cfd4189 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -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;
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 702d3fab97fc..62cc9d3e20f5 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -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;
/*
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index d35d2d50f595..05d012358df8 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -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;
--
2.16.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH v3 2/3] drm/i915: Consult VBT "LVDS config" bits to determine whether internal LVDS is present
2018-05-08 12:41 ` [PATCH v2 2/3] drm/i915: Consult VBT "LVDS config" bits to determine whether internal LVDS is present Ville Syrjala
@ 2018-05-08 14:08 ` Ville Syrjala
2018-05-08 14:22 ` Jani Nikula
2018-05-16 14:34 ` Ville Syrjälä
2018-05-18 15:01 ` [PATCH v4 1/1] " Ville Syrjala
1 sibling, 2 replies; 18+ messages in thread
From: Ville Syrjala @ 2018-05-08 14:08 UTC (permalink / raw)
To: intel-gfx; +Cc: Jani Nikula, Ondrej Zary
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
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 <jani.nikula@intel.com>
Cc: Ondrej Zary <linux@rainbow-software.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105468
References: https://lists.freedesktop.org/archives/intel-gfx/2018-March/158408.html
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
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(-)
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 62cc9d3e20f5..f3545b5aabbc 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -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);
/*
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 05d012358df8..5e5a77927369 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -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");
diff --git a/drivers/gpu/drm/i915/intel_vbt_defs.h b/drivers/gpu/drm/i915/intel_vbt_defs.h
index 458468237b5f..39c804624179 100644
--- a/drivers/gpu/drm/i915/intel_vbt_defs.h
+++ b/drivers/gpu/drm/i915/intel_vbt_defs.h
@@ -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 3
struct bdb_driver_features {
u8 boot_dev_algorithm:1;
--
2.16.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH v2 1/3] drm/i915: Replace vbt edp.support with int_lvds_support
2018-05-08 14:08 ` Ville Syrjala
@ 2018-05-08 14:18 ` Jani Nikula
0 siblings, 0 replies; 18+ messages in thread
From: Jani Nikula @ 2018-05-08 14:18 UTC (permalink / raw)
To: Ville Syrjala, intel-gfx; +Cc: Ondrej Zary
On Tue, 08 May 2018, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> 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)
>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Ondrej Zary <linux@rainbow-software.org>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> 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(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 04e27806e581..3bdc7cfd4189 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -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;
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index 702d3fab97fc..62cc9d3e20f5 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -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;
> /*
> diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
> index d35d2d50f595..05d012358df8 100644
> --- a/drivers/gpu/drm/i915/intel_lvds.c
> +++ b/drivers/gpu/drm/i915/intel_lvds.c
> @@ -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;
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v3 2/3] drm/i915: Consult VBT "LVDS config" bits to determine whether internal LVDS is present
2018-05-08 14:08 ` [PATCH v3 " Ville Syrjala
@ 2018-05-08 14:22 ` Jani Nikula
2018-05-16 14:34 ` Ville Syrjälä
1 sibling, 0 replies; 18+ messages in thread
From: Jani Nikula @ 2018-05-08 14:22 UTC (permalink / raw)
To: Ville Syrjala, intel-gfx; +Cc: Ondrej Zary
On Tue, 08 May 2018, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> 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 <jani.nikula@intel.com>
> Cc: Ondrej Zary <linux@rainbow-software.org>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105468
> References: https://lists.freedesktop.org/archives/intel-gfx/2018-March/158408.html
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> 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(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index 62cc9d3e20f5..f3545b5aabbc 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -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);
> /*
> diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
> index 05d012358df8..5e5a77927369 100644
> --- a/drivers/gpu/drm/i915/intel_lvds.c
> +++ b/drivers/gpu/drm/i915/intel_lvds.c
> @@ -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");
> diff --git a/drivers/gpu/drm/i915/intel_vbt_defs.h b/drivers/gpu/drm/i915/intel_vbt_defs.h
> index 458468237b5f..39c804624179 100644
> --- a/drivers/gpu/drm/i915/intel_vbt_defs.h
> +++ b/drivers/gpu/drm/i915/intel_vbt_defs.h
> @@ -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 3
>
> struct bdb_driver_features {
> u8 boot_dev_algorithm:1;
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* ✗ Fi.CI.CHECKPATCH: warning for series starting with [v2,1/3] drm/i915: Replace vbt edp.support with int_lvds_support (rev3)
2018-05-08 12:41 [PATCH v2 1/3] drm/i915: Replace vbt edp.support with int_lvds_support Ville Syrjala
` (3 preceding siblings ...)
2018-05-08 14:08 ` Ville Syrjala
@ 2018-05-08 16:21 ` Patchwork
2018-05-08 16:22 ` ✗ Fi.CI.SPARSE: " Patchwork
` (4 subsequent siblings)
9 siblings, 0 replies; 18+ messages in thread
From: Patchwork @ 2018-05-08 16:21 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: intel-gfx
== 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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* ✗ Fi.CI.SPARSE: warning for series starting with [v2,1/3] drm/i915: Replace vbt edp.support with int_lvds_support (rev3)
2018-05-08 12:41 [PATCH v2 1/3] drm/i915: Replace vbt edp.support with int_lvds_support Ville Syrjala
` (4 preceding siblings ...)
2018-05-08 16:21 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [v2,1/3] drm/i915: Replace vbt edp.support with int_lvds_support (rev3) Patchwork
@ 2018-05-08 16:22 ` Patchwork
2018-05-08 16:41 ` ✓ Fi.CI.BAT: success " Patchwork
` (3 subsequent siblings)
9 siblings, 0 replies; 18+ messages in thread
From: Patchwork @ 2018-05-08 16:22 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: intel-gfx
== 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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* ✓ Fi.CI.BAT: success for series starting with [v2,1/3] drm/i915: Replace vbt edp.support with int_lvds_support (rev3)
2018-05-08 12:41 [PATCH v2 1/3] drm/i915: Replace vbt edp.support with int_lvds_support Ville Syrjala
` (5 preceding siblings ...)
2018-05-08 16:22 ` ✗ Fi.CI.SPARSE: " Patchwork
@ 2018-05-08 16:41 ` Patchwork
2018-05-08 19:47 ` ✓ Fi.CI.IGT: " Patchwork
` (2 subsequent siblings)
9 siblings, 0 replies; 18+ messages in thread
From: Patchwork @ 2018-05-08 16:41 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: intel-gfx
== 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_vbt
b19c242bf040 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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* ✓ Fi.CI.IGT: success for series starting with [v2,1/3] drm/i915: Replace vbt edp.support with int_lvds_support (rev3)
2018-05-08 12:41 [PATCH v2 1/3] drm/i915: Replace vbt edp.support with int_lvds_support Ville Syrjala
` (6 preceding siblings ...)
2018-05-08 16:41 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2018-05-08 19:47 ` Patchwork
2018-05-08 21:19 ` [PATCH v2 1/3] drm/i915: Replace vbt edp.support with int_lvds_support kbuild test robot
2018-05-08 22:39 ` kbuild test robot
9 siblings, 0 replies; 18+ messages in thread
From: Patchwork @ 2018-05-08 19:47 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: intel-gfx
== 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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v2 1/3] drm/i915: Replace vbt edp.support with int_lvds_support
2018-05-08 12:41 [PATCH v2 1/3] drm/i915: Replace vbt edp.support with int_lvds_support Ville Syrjala
` (7 preceding siblings ...)
2018-05-08 19:47 ` ✓ Fi.CI.IGT: " Patchwork
@ 2018-05-08 21:19 ` kbuild test robot
2018-05-08 22:39 ` kbuild test robot
9 siblings, 0 replies; 18+ messages in thread
From: kbuild test robot @ 2018-05-08 21:19 UTC (permalink / raw)
To: Ville Syrjala; +Cc: Jani Nikula, intel-gfx, Ondrej Zary, kbuild-all
[-- Attachment #1: Type: text/plain, Size: 9321 bytes --]
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 <jani.nikula@intel.com>
:::::: CC: Jani Nikula <jani.nikula@intel.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31430 bytes --]
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v2 1/3] drm/i915: Replace vbt edp.support with int_lvds_support
2018-05-08 12:41 [PATCH v2 1/3] drm/i915: Replace vbt edp.support with int_lvds_support Ville Syrjala
` (8 preceding siblings ...)
2018-05-08 21:19 ` [PATCH v2 1/3] drm/i915: Replace vbt edp.support with int_lvds_support kbuild test robot
@ 2018-05-08 22:39 ` kbuild test robot
9 siblings, 0 replies; 18+ messages in thread
From: kbuild test robot @ 2018-05-08 22:39 UTC (permalink / raw)
To: Ville Syrjala; +Cc: Jani Nikula, intel-gfx, Ondrej Zary, kbuild-all
[-- Attachment #1: Type: text/plain, Size: 10871 bytes --]
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 <jani.nikula@intel.com>
:::::: CC: Jani Nikula <jani.nikula@intel.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28099 bytes --]
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v3 2/3] drm/i915: Consult VBT "LVDS config" bits to determine whether internal LVDS is present
2018-05-08 14:08 ` [PATCH v3 " Ville Syrjala
2018-05-08 14:22 ` Jani Nikula
@ 2018-05-16 14:34 ` Ville Syrjälä
1 sibling, 0 replies; 18+ messages in thread
From: Ville Syrjälä @ 2018-05-16 14:34 UTC (permalink / raw)
To: intel-gfx; +Cc: Jani Nikula, Ondrej Zary
On Tue, May 08, 2018 at 05:08:35PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> 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 <jani.nikula@intel.com>
> Cc: Ondrej Zary <linux@rainbow-software.org>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105468
> References: https://lists.freedesktop.org/archives/intel-gfx/2018-March/158408.html
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> 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(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index 62cc9d3e20f5..f3545b5aabbc 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -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;
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.
> + }
>
> DRM_DEBUG_KMS("DRRS State Enabled:%d\n", driver->drrs_enabled);
> /*
> diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
> index 05d012358df8..5e5a77927369 100644
> --- a/drivers/gpu/drm/i915/intel_lvds.c
> +++ b/drivers/gpu/drm/i915/intel_lvds.c
> @@ -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");
> diff --git a/drivers/gpu/drm/i915/intel_vbt_defs.h b/drivers/gpu/drm/i915/intel_vbt_defs.h
> index 458468237b5f..39c804624179 100644
> --- a/drivers/gpu/drm/i915/intel_vbt_defs.h
> +++ b/drivers/gpu/drm/i915/intel_vbt_defs.h
> @@ -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 3
>
> struct bdb_driver_features {
> u8 boot_dev_algorithm:1;
> --
> 2.16.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH v4 1/1] drm/i915: Consult VBT "LVDS config" bits to determine whether internal LVDS is present
2018-05-08 12:41 ` [PATCH v2 2/3] drm/i915: Consult VBT "LVDS config" bits to determine whether internal LVDS is present Ville Syrjala
2018-05-08 14:08 ` [PATCH v3 " Ville Syrjala
@ 2018-05-18 15:01 ` Ville Syrjala
2018-05-25 15:02 ` Ville Syrjälä
1 sibling, 1 reply; 18+ messages in thread
From: Ville Syrjala @ 2018-05-18 15:01 UTC (permalink / raw)
To: intel-gfx; +Cc: Jani Nikula, Ondrej Zary
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
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
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
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(-)
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 5c863e2714ec..26b59118ef7b 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -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);
/*
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index cda46bfa7041..a78d2b181819 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -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");
diff --git a/drivers/gpu/drm/i915/intel_vbt_defs.h b/drivers/gpu/drm/i915/intel_vbt_defs.h
index 458468237b5f..39c804624179 100644
--- a/drivers/gpu/drm/i915/intel_vbt_defs.h
+++ b/drivers/gpu/drm/i915/intel_vbt_defs.h
@@ -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 3
struct bdb_driver_features {
u8 boot_dev_algorithm:1;
--
2.16.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH v4 1/1] drm/i915: Consult VBT "LVDS config" bits to determine whether internal LVDS is present
2018-05-18 15:01 ` [PATCH v4 1/1] " Ville Syrjala
@ 2018-05-25 15:02 ` Ville Syrjälä
0 siblings, 0 replies; 18+ messages in thread
From: Ville Syrjälä @ 2018-05-25 15:02 UTC (permalink / raw)
To: intel-gfx; +Cc: Jani Nikula, Ondrej Zary
On Fri, May 18, 2018 at 06:01:38PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> 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
>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Ondrej Zary <linux@rainbow-software.org>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
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...
> ---
> 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(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index 5c863e2714ec..26b59118ef7b 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -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);
> /*
> diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
> index cda46bfa7041..a78d2b181819 100644
> --- a/drivers/gpu/drm/i915/intel_lvds.c
> +++ b/drivers/gpu/drm/i915/intel_lvds.c
> @@ -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");
> diff --git a/drivers/gpu/drm/i915/intel_vbt_defs.h b/drivers/gpu/drm/i915/intel_vbt_defs.h
> index 458468237b5f..39c804624179 100644
> --- a/drivers/gpu/drm/i915/intel_vbt_defs.h
> +++ b/drivers/gpu/drm/i915/intel_vbt_defs.h
> @@ -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 3
>
> struct bdb_driver_features {
> u8 boot_dev_algorithm:1;
> --
> 2.16.1
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2018-05-25 15:02 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-08 12:41 [PATCH v2 1/3] drm/i915: Replace vbt edp.support with int_lvds_support Ville Syrjala
2018-05-08 12:41 ` [PATCH v2 2/3] drm/i915: Consult VBT "LVDS config" bits to determine whether internal LVDS is present Ville Syrjala
2018-05-08 14:08 ` [PATCH v3 " Ville Syrjala
2018-05-08 14:22 ` Jani Nikula
2018-05-16 14:34 ` Ville Syrjälä
2018-05-18 15:01 ` [PATCH v4 1/1] " Ville Syrjala
2018-05-25 15:02 ` Ville Syrjälä
2018-05-08 12:41 ` [PATCH v2 3/3] drm/i915: Eliminate the unused dev_priv->vbt.lvds_vbt Ville Syrjala
2018-05-08 13:29 ` [PATCH v2 1/3] drm/i915: Replace vbt edp.support with int_lvds_support Jani Nikula
2018-05-08 13:41 ` Ville Syrjälä
2018-05-08 14:08 ` Ville Syrjala
2018-05-08 14:18 ` Jani Nikula
2018-05-08 16:21 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [v2,1/3] drm/i915: Replace vbt edp.support with int_lvds_support (rev3) Patchwork
2018-05-08 16:22 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-05-08 16:41 ` ✓ Fi.CI.BAT: success " Patchwork
2018-05-08 19:47 ` ✓ Fi.CI.IGT: " Patchwork
2018-05-08 21:19 ` [PATCH v2 1/3] drm/i915: Replace vbt edp.support with int_lvds_support kbuild test robot
2018-05-08 22:39 ` kbuild test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.