* [PATCH] drm/i915/gen9+: Rely on VBT DDI port info for eDP detection
@ 2016-12-20 15:12 Imre Deak
2016-12-20 15:31 ` Ville Syrjälä
` (4 more replies)
0 siblings, 5 replies; 15+ messages in thread
From: Imre Deak @ 2016-12-20 15:12 UTC (permalink / raw)
To: intel-gfx
There is at least one APL based system using port A in DP mode
(connecting to an on-board DP->VGA adaptor). Atm we'll configure port A
unconditionally as eDP which is incorrect in this case. Fix this by
relying on the VBT DDI port 'internal port' flag instead on all ports
GEN9 onwards. For now chicken out from doing this on earlier DDI
platforms too.
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
drivers/gpu/drm/i915/i915_drv.h | 1 +
drivers/gpu/drm/i915/intel_bios.c | 1 +
drivers/gpu/drm/i915/intel_dp.c | 3 +++
3 files changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 7e94e506..42fb7e9 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1669,6 +1669,7 @@ struct ddi_vbt_port_info {
uint8_t supports_dvi:1;
uint8_t supports_hdmi:1;
uint8_t supports_dp:1;
+ uint8_t supports_edp:1;
uint8_t alternate_aux_channel;
uint8_t alternate_ddc_pin;
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 1cf2fa6..60fdd31 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -1161,6 +1161,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
info->supports_dvi = is_dvi;
info->supports_hdmi = is_hdmi;
info->supports_dp = is_dp;
+ info->supports_edp = is_edp;
DRM_DEBUG_KMS("Port %c VBT info: DP:%d HDMI:%d DVI:%d EDP:%d CRT:%d\n",
port_name(port), is_dp, is_hdmi, is_dvi, is_edp, is_crt);
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index d37cb00..7f3f4fa 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -4983,6 +4983,9 @@ bool intel_dp_is_edp(struct drm_i915_private *dev_priv, enum port port)
if (INTEL_GEN(dev_priv) < 5)
return false;
+ if (INTEL_GEN(dev_priv) >= 9)
+ return dev_priv->vbt.ddi_port_info[port].supports_edp;
+
if (port == PORT_A)
return true;
--
2.5.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/i915/gen9+: Rely on VBT DDI port info for eDP detection
2016-12-20 15:12 [PATCH] drm/i915/gen9+: Rely on VBT DDI port info for eDP detection Imre Deak
@ 2016-12-20 15:31 ` Ville Syrjälä
2016-12-20 16:02 ` David Weinehall
` (3 subsequent siblings)
4 siblings, 0 replies; 15+ messages in thread
From: Ville Syrjälä @ 2016-12-20 15:31 UTC (permalink / raw)
To: Imre Deak; +Cc: intel-gfx, Paulo Zanoni
On Tue, Dec 20, 2016 at 05:12:49PM +0200, Imre Deak wrote:
> There is at least one APL based system using port A in DP mode
> (connecting to an on-board DP->VGA adaptor). Atm we'll configure port A
> unconditionally as eDP which is incorrect in this case. Fix this by
> relying on the VBT DDI port 'internal port' flag instead on all ports
> GEN9 onwards. For now chicken out from doing this on earlier DDI
> platforms too.
>
> Signed-off-by: Imre Deak <imre.deak@intel.com>
Yeah, I think we should try to move towards using the VBT more
consistently here. Eventually we migth even want to unify everything to
using the pre-parsed port infromation, but going in babt steps is a
little less likely to regress old machines.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
At one point when I was monkeying around with this VBT stuff Paulo
suggested that we should just use the pre-parsed stuff more, so presumably
he should be happy with this direction as well. Although I think that
specific case might have been about the DP++ stuff.
> ---
> drivers/gpu/drm/i915/i915_drv.h | 1 +
> drivers/gpu/drm/i915/intel_bios.c | 1 +
> drivers/gpu/drm/i915/intel_dp.c | 3 +++
> 3 files changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 7e94e506..42fb7e9 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1669,6 +1669,7 @@ struct ddi_vbt_port_info {
> uint8_t supports_dvi:1;
> uint8_t supports_hdmi:1;
> uint8_t supports_dp:1;
> + uint8_t supports_edp:1;
>
> uint8_t alternate_aux_channel;
> uint8_t alternate_ddc_pin;
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index 1cf2fa6..60fdd31 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -1161,6 +1161,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
> info->supports_dvi = is_dvi;
> info->supports_hdmi = is_hdmi;
> info->supports_dp = is_dp;
> + info->supports_edp = is_edp;
>
> DRM_DEBUG_KMS("Port %c VBT info: DP:%d HDMI:%d DVI:%d EDP:%d CRT:%d\n",
> port_name(port), is_dp, is_hdmi, is_dvi, is_edp, is_crt);
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index d37cb00..7f3f4fa 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -4983,6 +4983,9 @@ bool intel_dp_is_edp(struct drm_i915_private *dev_priv, enum port port)
> if (INTEL_GEN(dev_priv) < 5)
> return false;
>
> + if (INTEL_GEN(dev_priv) >= 9)
> + return dev_priv->vbt.ddi_port_info[port].supports_edp;
> +
> if (port == PORT_A)
> return true;
>
> --
> 2.5.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/i915/gen9+: Rely on VBT DDI port info for eDP detection
2016-12-20 15:12 [PATCH] drm/i915/gen9+: Rely on VBT DDI port info for eDP detection Imre Deak
2016-12-20 15:31 ` Ville Syrjälä
@ 2016-12-20 16:02 ` David Weinehall
2016-12-20 16:34 ` Imre Deak
2016-12-20 17:45 ` ✗ Fi.CI.BAT: warning for " Patchwork
` (2 subsequent siblings)
4 siblings, 1 reply; 15+ messages in thread
From: David Weinehall @ 2016-12-20 16:02 UTC (permalink / raw)
To: Imre Deak; +Cc: intel-gfx
On Tue, Dec 20, 2016 at 05:12:49PM +0200, Imre Deak wrote:
> There is at least one APL based system using port A in DP mode
> (connecting to an on-board DP->VGA adaptor). Atm we'll configure port A
> unconditionally as eDP which is incorrect in this case. Fix this by
> relying on the VBT DDI port 'internal port' flag instead on all ports
> GEN9 onwards. For now chicken out from doing this on earlier DDI
> platforms too.
>
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.h | 1 +
> drivers/gpu/drm/i915/intel_bios.c | 1 +
> drivers/gpu/drm/i915/intel_dp.c | 3 +++
> 3 files changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 7e94e506..42fb7e9 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1669,6 +1669,7 @@ struct ddi_vbt_port_info {
> uint8_t supports_dvi:1;
> uint8_t supports_hdmi:1;
> uint8_t supports_dp:1;
> + uint8_t supports_edp:1;
>
> uint8_t alternate_aux_channel;
> uint8_t alternate_ddc_pin;
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index 1cf2fa6..60fdd31 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -1161,6 +1161,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
> info->supports_dvi = is_dvi;
> info->supports_hdmi = is_hdmi;
> info->supports_dp = is_dp;
> + info->supports_edp = is_edp;
>
> DRM_DEBUG_KMS("Port %c VBT info: DP:%d HDMI:%d DVI:%d EDP:%d CRT:%d\n",
> port_name(port), is_dp, is_hdmi, is_dvi, is_edp, is_crt);
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index d37cb00..7f3f4fa 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -4983,6 +4983,9 @@ bool intel_dp_is_edp(struct drm_i915_private *dev_priv, enum port port)
> if (INTEL_GEN(dev_priv) < 5)
> return false;
>
> + if (INTEL_GEN(dev_priv) >= 9)
> + return dev_priv->vbt.ddi_port_info[port].supports_edp;
> +
We already have intel_bios_is_port_edp() that tries to
discern whether the port is eDP or not.
Wouldn't that function be usable for this purpose?
If so, doing:
if (port == PORT_A && INTEL_GEN(dev_priv) < 9)
return true;
return intel_bios_is_port_edp(dev_priv, port);
should be enough. If not, maybe it should be fixed instead of
introducing a new way of doing things.
> if (port == PORT_A)
> return true;
Kind regards, David
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/i915/gen9+: Rely on VBT DDI port info for eDP detection
2016-12-20 16:02 ` David Weinehall
@ 2016-12-20 16:34 ` Imre Deak
2016-12-21 8:34 ` Jani Nikula
0 siblings, 1 reply; 15+ messages in thread
From: Imre Deak @ 2016-12-20 16:34 UTC (permalink / raw)
To: David Weinehall; +Cc: intel-gfx
On ti, 2016-12-20 at 18:02 +0200, David Weinehall wrote:
> On Tue, Dec 20, 2016 at 05:12:49PM +0200, Imre Deak wrote:
> > There is at least one APL based system using port A in DP mode
> > (connecting to an on-board DP->VGA adaptor). Atm we'll configure port A
> > unconditionally as eDP which is incorrect in this case. Fix this by
> > relying on the VBT DDI port 'internal port' flag instead on all ports
> > GEN9 onwards. For now chicken out from doing this on earlier DDI
> > platforms too.
> >
> > Signed-off-by: Imre Deak <imre.deak@intel.com>
> > ---
> > drivers/gpu/drm/i915/i915_drv.h | 1 +
> > drivers/gpu/drm/i915/intel_bios.c | 1 +
> > drivers/gpu/drm/i915/intel_dp.c | 3 +++
> > 3 files changed, 5 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> > index 7e94e506..42fb7e9 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.h
> > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > @@ -1669,6 +1669,7 @@ struct ddi_vbt_port_info {
> > uint8_t supports_dvi:1;
> > uint8_t supports_hdmi:1;
> > uint8_t supports_dp:1;
> > + uint8_t supports_edp:1;
> >
> > uint8_t alternate_aux_channel;
> > uint8_t alternate_ddc_pin;
> > diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> > index 1cf2fa6..60fdd31 100644
> > --- a/drivers/gpu/drm/i915/intel_bios.c
> > +++ b/drivers/gpu/drm/i915/intel_bios.c
> > @@ -1161,6 +1161,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
> > info->supports_dvi = is_dvi;
> > info->supports_hdmi = is_hdmi;
> > info->supports_dp = is_dp;
> > + info->supports_edp = is_edp;
> >
> > DRM_DEBUG_KMS("Port %c VBT info: DP:%d HDMI:%d DVI:%d EDP:%d CRT:%d\n",
> > port_name(port), is_dp, is_hdmi, is_dvi, is_edp, is_crt);
> > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> > index d37cb00..7f3f4fa 100644
> > --- a/drivers/gpu/drm/i915/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > @@ -4983,6 +4983,9 @@ bool intel_dp_is_edp(struct drm_i915_private *dev_priv, enum port port)
> > if (INTEL_GEN(dev_priv) < 5)
> > return false;
> >
> > + if (INTEL_GEN(dev_priv) >= 9)
> > + return dev_priv->vbt.ddi_port_info[port].supports_edp;
> > +
>
> We already have intel_bios_is_port_edp() that tries to
> discern whether the port is eDP or not.
>
> Wouldn't that function be usable for this purpose?
>
> If so, doing:
>
> if (port == PORT_A && INTEL_GEN(dev_priv) < 9)
> return true;
>
> return intel_bios_is_port_edp(dev_priv, port);
>
> should be enough. If not, maybe it should be fixed instead of
> introducing a new way of doing things.
intel_bios_is_port_edp() does on old platforms what parse_ddi_port()
for DDI platforms. I find it clearer to have all the platform checks in
one place in intel_dp_is_edp() to decide which info to use.
We could move the parsing in intel_bios_is_port_edp() to happen during
the early VBT parsing on old platforms and use the DDI port info for
those too not sure if it's feasible or if it's worth the effort.
--Imre
>
> > if (port == PORT_A)
> > return true;
>
>
> Kind regards, David
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* ✗ Fi.CI.BAT: warning for drm/i915/gen9+: Rely on VBT DDI port info for eDP detection
2016-12-20 15:12 [PATCH] drm/i915/gen9+: Rely on VBT DDI port info for eDP detection Imre Deak
2016-12-20 15:31 ` Ville Syrjälä
2016-12-20 16:02 ` David Weinehall
@ 2016-12-20 17:45 ` Patchwork
2016-12-21 10:17 ` [PATCH v2] drm/i915/ddi: " Imre Deak
2016-12-21 10:56 ` ✗ Fi.CI.BAT: failure for drm/i915/gen9+: Rely on VBT DDI port info for eDP detection (rev2) Patchwork
4 siblings, 0 replies; 15+ messages in thread
From: Patchwork @ 2016-12-20 17:45 UTC (permalink / raw)
To: Imre Deak; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/gen9+: Rely on VBT DDI port info for eDP detection
URL : https://patchwork.freedesktop.org/series/17063/
State : warning
== Summary ==
Series 17063v1 drm/i915/gen9+: Rely on VBT DDI port info for eDP detection
https://patchwork.freedesktop.org/api/1.0/series/17063/revisions/1/mbox/
Test kms_frontbuffer_tracking:
Subgroup basic:
dmesg-warn -> PASS (fi-bxt-j4205)
Test pm_backlight:
Subgroup basic-brightness:
pass -> SKIP (fi-bxt-j4205)
pass -> SKIP (fi-skl-6700k)
fi-bdw-5557u total:247 pass:233 dwarn:0 dfail:0 fail:0 skip:14
fi-bsw-n3050 total:247 pass:208 dwarn:0 dfail:0 fail:0 skip:39
fi-bxt-j4205 total:247 pass:225 dwarn:0 dfail:0 fail:0 skip:22
fi-bxt-t5700 total:247 pass:220 dwarn:0 dfail:0 fail:0 skip:27
fi-byt-j1900 total:247 pass:220 dwarn:0 dfail:0 fail:0 skip:27
fi-byt-n2820 total:247 pass:216 dwarn:0 dfail:0 fail:0 skip:31
fi-hsw-4770 total:247 pass:228 dwarn:0 dfail:0 fail:0 skip:19
fi-hsw-4770r total:247 pass:228 dwarn:0 dfail:0 fail:0 skip:19
fi-ilk-650 total:247 pass:195 dwarn:0 dfail:0 fail:0 skip:52
fi-ivb-3520m total:247 pass:226 dwarn:0 dfail:0 fail:0 skip:21
fi-ivb-3770 total:247 pass:226 dwarn:0 dfail:0 fail:0 skip:21
fi-kbl-7500u total:247 pass:226 dwarn:0 dfail:0 fail:0 skip:21
fi-skl-6260u total:247 pass:234 dwarn:0 dfail:0 fail:0 skip:13
fi-skl-6700hq total:247 pass:227 dwarn:0 dfail:0 fail:0 skip:20
fi-skl-6700k total:247 pass:223 dwarn:3 dfail:0 fail:0 skip:21
fi-skl-6770hq total:247 pass:234 dwarn:0 dfail:0 fail:0 skip:13
fi-snb-2520m total:247 pass:216 dwarn:0 dfail:0 fail:0 skip:31
fi-snb-2600 total:247 pass:215 dwarn:0 dfail:0 fail:0 skip:32
6096aee14ea52e3163729129ee7362e56ff3efb9 drm-tip: 2016y-12m-20d-16h-33m-17s UTC integration manifest
9cbd9f1 drm/i915/gen9+: Rely on VBT DDI port info for eDP detection
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3345/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/i915/gen9+: Rely on VBT DDI port info for eDP detection
2016-12-20 16:34 ` Imre Deak
@ 2016-12-21 8:34 ` Jani Nikula
2016-12-21 10:03 ` Imre Deak
0 siblings, 1 reply; 15+ messages in thread
From: Jani Nikula @ 2016-12-21 8:34 UTC (permalink / raw)
To: imre.deak, David Weinehall; +Cc: intel-gfx
On Tue, 20 Dec 2016, Imre Deak <imre.deak@intel.com> wrote:
> On ti, 2016-12-20 at 18:02 +0200, David Weinehall wrote:
>> On Tue, Dec 20, 2016 at 05:12:49PM +0200, Imre Deak wrote:
>> > There is at least one APL based system using port A in DP mode
>> > (connecting to an on-board DP->VGA adaptor). Atm we'll configure port A
>> > unconditionally as eDP which is incorrect in this case. Fix this by
>> > relying on the VBT DDI port 'internal port' flag instead on all ports
>> > GEN9 onwards. For now chicken out from doing this on earlier DDI
>> > platforms too.
>> >
>> > Signed-off-by: Imre Deak <imre.deak@intel.com>
>> > ---
>> > drivers/gpu/drm/i915/i915_drv.h | 1 +
>> > drivers/gpu/drm/i915/intel_bios.c | 1 +
>> > drivers/gpu/drm/i915/intel_dp.c | 3 +++
>> > 3 files changed, 5 insertions(+)
>> >
>> > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
>> > index 7e94e506..42fb7e9 100644
>> > --- a/drivers/gpu/drm/i915/i915_drv.h
>> > +++ b/drivers/gpu/drm/i915/i915_drv.h
>> > @@ -1669,6 +1669,7 @@ struct ddi_vbt_port_info {
>> > uint8_t supports_dvi:1;
>> > uint8_t supports_hdmi:1;
>> > uint8_t supports_dp:1;
>> > + uint8_t supports_edp:1;
>> >
>> > uint8_t alternate_aux_channel;
>> > uint8_t alternate_ddc_pin;
>> > diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
>> > index 1cf2fa6..60fdd31 100644
>> > --- a/drivers/gpu/drm/i915/intel_bios.c
>> > +++ b/drivers/gpu/drm/i915/intel_bios.c
>> > @@ -1161,6 +1161,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
>> > info->supports_dvi = is_dvi;
>> > info->supports_hdmi = is_hdmi;
>> > info->supports_dp = is_dp;
>> > + info->supports_edp = is_edp;
>> >
>> > DRM_DEBUG_KMS("Port %c VBT info: DP:%d HDMI:%d DVI:%d EDP:%d CRT:%d\n",
>> > port_name(port), is_dp, is_hdmi, is_dvi, is_edp, is_crt);
>> > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
>> > index d37cb00..7f3f4fa 100644
>> > --- a/drivers/gpu/drm/i915/intel_dp.c
>> > +++ b/drivers/gpu/drm/i915/intel_dp.c
>> > @@ -4983,6 +4983,9 @@ bool intel_dp_is_edp(struct drm_i915_private *dev_priv, enum port port)
>> > if (INTEL_GEN(dev_priv) < 5)
>> > return false;
>> >
>> > + if (INTEL_GEN(dev_priv) >= 9)
>> > + return dev_priv->vbt.ddi_port_info[port].supports_edp;
>> > +
>>
>> We already have intel_bios_is_port_edp() that tries to
>> discern whether the port is eDP or not.
>>
>> Wouldn't that function be usable for this purpose?
>>
>> If so, doing:
>>
>> if (port == PORT_A && INTEL_GEN(dev_priv) < 9)
>> return true;
>>
>> return intel_bios_is_port_edp(dev_priv, port);
>>
>> should be enough. If not, maybe it should be fixed instead of
>> introducing a new way of doing things.
>
> intel_bios_is_port_edp() does on old platforms what parse_ddi_port()
> for DDI platforms. I find it clearer to have all the platform checks in
> one place in intel_dp_is_edp() to decide which info to use.
>
> We could move the parsing in intel_bios_is_port_edp() to happen during
> the early VBT parsing on old platforms and use the DDI port info for
> those too not sure if it's feasible or if it's worth the effort.
IMO everything that looks at VBT for the info should be abstracted into
intel_bios_is_port_edp(). I don't like to spread out things like, if
this then look at VBT here, else look at VBT there, or something else.
BR,
Jani.
>
> --Imre
>
>>
>> > if (port == PORT_A)
>> > return true;
>>
>>
>> Kind regards, David
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
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] 15+ messages in thread
* Re: [PATCH] drm/i915/gen9+: Rely on VBT DDI port info for eDP detection
2016-12-21 8:34 ` Jani Nikula
@ 2016-12-21 10:03 ` Imre Deak
0 siblings, 0 replies; 15+ messages in thread
From: Imre Deak @ 2016-12-21 10:03 UTC (permalink / raw)
To: Jani Nikula, David Weinehall; +Cc: intel-gfx
On Wed, 2016-12-21 at 10:34 +0200, Jani Nikula wrote:
> On Tue, 20 Dec 2016, Imre Deak <imre.deak@intel.com> wrote:
> > On ti, 2016-12-20 at 18:02 +0200, David Weinehall wrote:
> > > On Tue, Dec 20, 2016 at 05:12:49PM +0200, Imre Deak wrote:
> > > > There is at least one APL based system using port A in DP mode
> > > > (connecting to an on-board DP->VGA adaptor). Atm we'll configure port A
> > > > unconditionally as eDP which is incorrect in this case. Fix this by
> > > > relying on the VBT DDI port 'internal port' flag instead on all ports
> > > > GEN9 onwards. For now chicken out from doing this on earlier DDI
> > > > platforms too.
> > > >
> > > > Signed-off-by: Imre Deak <imre.deak@intel.com>
> > > > ---
> > > > drivers/gpu/drm/i915/i915_drv.h | 1 +
> > > > drivers/gpu/drm/i915/intel_bios.c | 1 +
> > > > drivers/gpu/drm/i915/intel_dp.c | 3 +++
> > > > 3 files changed, 5 insertions(+)
> > > >
> > > > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> > > > index 7e94e506..42fb7e9 100644
> > > > --- a/drivers/gpu/drm/i915/i915_drv.h
> > > > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > > > @@ -1669,6 +1669,7 @@ struct ddi_vbt_port_info {
> > > > uint8_t supports_dvi:1;
> > > > uint8_t supports_hdmi:1;
> > > > uint8_t supports_dp:1;
> > > > + uint8_t supports_edp:1;
> > > >
> > > > uint8_t alternate_aux_channel;
> > > > uint8_t alternate_ddc_pin;
> > > > diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> > > > index 1cf2fa6..60fdd31 100644
> > > > --- a/drivers/gpu/drm/i915/intel_bios.c
> > > > +++ b/drivers/gpu/drm/i915/intel_bios.c
> > > > @@ -1161,6 +1161,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
> > > > info->supports_dvi = is_dvi;
> > > > info->supports_hdmi = is_hdmi;
> > > > info->supports_dp = is_dp;
> > > > + info->supports_edp = is_edp;
> > > >
> > > > DRM_DEBUG_KMS("Port %c VBT info: DP:%d HDMI:%d DVI:%d EDP:%d CRT:%d\n",
> > > > port_name(port), is_dp, is_hdmi, is_dvi, is_edp, is_crt);
> > > > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> > > > index d37cb00..7f3f4fa 100644
> > > > --- a/drivers/gpu/drm/i915/intel_dp.c
> > > > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > > > @@ -4983,6 +4983,9 @@ bool intel_dp_is_edp(struct drm_i915_private *dev_priv, enum port port)
> > > > if (INTEL_GEN(dev_priv) < 5)
> > > > return false;
> > > >
> > > > + if (INTEL_GEN(dev_priv) >= 9)
> > > > + return dev_priv->vbt.ddi_port_info[port].supports_edp;
> > > > +
> > >
> > > We already have intel_bios_is_port_edp() that tries to
> > > discern whether the port is eDP or not.
> > >
> > > Wouldn't that function be usable for this purpose?
> > >
> > > If so, doing:
> > >
> > > if (port == PORT_A && INTEL_GEN(dev_priv) < 9)
> > > return true;
> > >
> > > return intel_bios_is_port_edp(dev_priv, port);
> > >
> > > should be enough. If not, maybe it should be fixed instead of
> > > introducing a new way of doing things.
> >
> > intel_bios_is_port_edp() does on old platforms what parse_ddi_port()
> > for DDI platforms. I find it clearer to have all the platform checks in
> > one place in intel_dp_is_edp() to decide which info to use.
> >
> > We could move the parsing in intel_bios_is_port_edp() to happen during
> > the early VBT parsing on old platforms and use the DDI port info for
> > those too not sure if it's feasible or if it's worth the effort.
>
> IMO everything that looks at VBT for the info should be abstracted into
> intel_bios_is_port_edp(). I don't like to spread out things like, if
> this then look at VBT here, else look at VBT there, or something else.
Ok, I can move the DDI port lookup there. I'll also use that info for all
DDI platforms, keeping the fixed port A->eDP mapping on GEN<9 for now.
--Imre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2] drm/i915/ddi: Rely on VBT DDI port info for eDP detection
2016-12-20 15:12 [PATCH] drm/i915/gen9+: Rely on VBT DDI port info for eDP detection Imre Deak
` (2 preceding siblings ...)
2016-12-20 17:45 ` ✗ Fi.CI.BAT: warning for " Patchwork
@ 2016-12-21 10:17 ` Imre Deak
2016-12-21 11:21 ` Jani Nikula
2016-12-22 9:12 ` David Weinehall
2016-12-21 10:56 ` ✗ Fi.CI.BAT: failure for drm/i915/gen9+: Rely on VBT DDI port info for eDP detection (rev2) Patchwork
4 siblings, 2 replies; 15+ messages in thread
From: Imre Deak @ 2016-12-21 10:17 UTC (permalink / raw)
To: intel-gfx; +Cc: Jani Nikula
There is at least one APL based system using port A in DP mode
(connecting to an on-board DP->VGA adaptor). Atm we'll configure port A
unconditionally as eDP which is incorrect in this case. Fix this by
relying on the VBT DDI port 'internal port' flag instead on all ports on
DDI platforms. For now chicken out from using VBT for port A before
GEN9.
v2:
- Move the DDI port info lookup to intel_bios_is_port_edp() (David, Jani)
- Use the DDI port info on all DDI platforms starting for port B.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: David Weinehall <david.weinehall@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> (v1)
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
drivers/gpu/drm/i915/i915_drv.h | 1 +
drivers/gpu/drm/i915/intel_bios.c | 4 ++++
drivers/gpu/drm/i915/intel_dp.c | 2 +-
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 77d7a07..1a91409 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1669,6 +1669,7 @@ struct ddi_vbt_port_info {
uint8_t supports_dvi:1;
uint8_t supports_hdmi:1;
uint8_t supports_dp:1;
+ uint8_t supports_edp:1;
uint8_t alternate_aux_channel;
uint8_t alternate_ddc_pin;
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 1cf2fa6..a359def 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -1161,6 +1161,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
info->supports_dvi = is_dvi;
info->supports_hdmi = is_hdmi;
info->supports_dp = is_dp;
+ info->supports_edp = is_edp;
DRM_DEBUG_KMS("Port %c VBT info: DP:%d HDMI:%d DVI:%d EDP:%d CRT:%d\n",
port_name(port), is_dp, is_hdmi, is_dvi, is_edp, is_crt);
@@ -1664,6 +1665,9 @@ bool intel_bios_is_port_edp(struct drm_i915_private *dev_priv, enum port port)
};
int i;
+ if (HAS_DDI(dev_priv))
+ return dev_priv->vbt.ddi_port_info[port].supports_edp;
+
if (!dev_priv->vbt.child_dev_num)
return false;
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 66b5bc8..746c237 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -4975,7 +4975,7 @@ bool intel_dp_is_edp(struct drm_i915_private *dev_priv, enum port port)
if (INTEL_GEN(dev_priv) < 5)
return false;
- if (port == PORT_A)
+ if (INTEL_GEN(dev_priv) < 9 && port == PORT_A)
return true;
return intel_bios_is_port_edp(dev_priv, port);
--
2.5.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 15+ messages in thread
* ✗ Fi.CI.BAT: failure for drm/i915/gen9+: Rely on VBT DDI port info for eDP detection (rev2)
2016-12-20 15:12 [PATCH] drm/i915/gen9+: Rely on VBT DDI port info for eDP detection Imre Deak
` (3 preceding siblings ...)
2016-12-21 10:17 ` [PATCH v2] drm/i915/ddi: " Imre Deak
@ 2016-12-21 10:56 ` Patchwork
2016-12-21 12:15 ` Imre Deak
4 siblings, 1 reply; 15+ messages in thread
From: Patchwork @ 2016-12-21 10:56 UTC (permalink / raw)
To: Imre Deak; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/gen9+: Rely on VBT DDI port info for eDP detection (rev2)
URL : https://patchwork.freedesktop.org/series/17063/
State : failure
== Summary ==
Series 17063v2 drm/i915/gen9+: Rely on VBT DDI port info for eDP detection
https://patchwork.freedesktop.org/api/1.0/series/17063/revisions/2/mbox/
Test drv_module_reload:
Subgroup basic-reload-final:
pass -> FAIL (fi-ilk-650)
Subgroup basic-reload-inject:
pass -> DMESG-FAIL (fi-ilk-650)
Test gem_basic:
Subgroup bad-close:
pass -> SKIP (fi-ilk-650)
Subgroup create-close:
pass -> SKIP (fi-ilk-650)
Subgroup create-fd-close:
pass -> SKIP (fi-ilk-650)
Test gem_busy:
Subgroup basic-busy-default:
pass -> SKIP (fi-ilk-650)
Subgroup basic-hang-default:
pass -> SKIP (fi-ilk-650)
Test gem_close_race:
Subgroup basic-process:
pass -> SKIP (fi-ilk-650)
Subgroup basic-threads:
pass -> SKIP (fi-ilk-650)
Test gem_cpu_reloc:
Subgroup basic:
pass -> SKIP (fi-ilk-650)
Test gem_cs_tlb:
Subgroup basic-default:
pass -> SKIP (fi-ilk-650)
Test gem_exec_basic:
Subgroup basic-bsd:
pass -> SKIP (fi-ilk-650)
Subgroup basic-default:
pass -> SKIP (fi-ilk-650)
Subgroup basic-render:
pass -> SKIP (fi-ilk-650)
Subgroup gtt-bsd:
pass -> SKIP (fi-ilk-650)
Subgroup gtt-default:
pass -> SKIP (fi-ilk-650)
Subgroup gtt-render:
pass -> SKIP (fi-ilk-650)
Subgroup readonly-bsd:
pass -> SKIP (fi-ilk-650)
Subgroup readonly-default:
pass -> SKIP (fi-ilk-650)
Subgroup readonly-render:
pass -> SKIP (fi-ilk-650)
Test gem_exec_create:
Subgroup basic:
pass -> SKIP (fi-ilk-650)
Test gem_exec_flush:
Subgroup basic-batch-kernel-default-uc:
pass -> SKIP (fi-ilk-650)
Subgroup basic-batch-kernel-default-wb:
pass -> SKIP (fi-ilk-650)
Subgroup basic-uc-pro-default:
pass -> SKIP (fi-ilk-650)
Subgroup basic-uc-prw-default:
pass -> SKIP (fi-ilk-650)
Subgroup basic-uc-ro-default:
pass -> SKIP (fi-ilk-650)
Subgroup basic-uc-rw-default:
pass -> SKIP (fi-ilk-650)
Subgroup basic-uc-set-default:
pass -> SKIP (fi-ilk-650)
Subgroup basic-wb-pro-default:
pass -> SKIP (fi-ilk-650)
Subgroup basic-wb-prw-default:
pass -> SKIP (fi-ilk-650)
Subgroup basic-wb-ro-before-default:
pass -> SKIP (fi-ilk-650)
Subgroup basic-wb-ro-default:
pass -> SKIP (fi-ilk-650)
Subgroup basic-wb-rw-before-default:
pass -> SKIP (fi-ilk-650)
Subgroup basic-wb-rw-default:
pass -> SKIP (fi-ilk-650)
Subgroup basic-wb-set-default:
pass -> SKIP (fi-ilk-650)
Test gem_exec_gttfill:
Subgroup basic:
pass -> SKIP (fi-ilk-650)
Test gem_exec_nop:
Subgroup basic-parallel:
pass -> SKIP (fi-ilk-650)
Subgroup basic-series:
pass -> SKIP (fi-ilk-650)
Test gem_exec_parallel:
Subgroup basic:
pass -> SKIP (fi-ilk-650)
Test gem_exec_reloc:
Subgroup basic-cpu:
pass -> SKIP (fi-ilk-650)
Subgroup basic-gtt:
pass -> SKIP (fi-ilk-650)
Subgroup basic-noreloc:
pass -> SKIP (fi-ilk-650)
WARNING: Long output truncated
6096aee14ea52e3163729129ee7362e56ff3efb9 drm-tip: 2016y-12m-20d-16h-33m-17s UTC integration manifest
7c27ee0 drm/i915/ddi: Rely on VBT DDI port info for eDP detection
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3351/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2] drm/i915/ddi: Rely on VBT DDI port info for eDP detection
2016-12-21 10:17 ` [PATCH v2] drm/i915/ddi: " Imre Deak
@ 2016-12-21 11:21 ` Jani Nikula
2016-12-21 11:50 ` Imre Deak
2016-12-22 9:12 ` David Weinehall
1 sibling, 1 reply; 15+ messages in thread
From: Jani Nikula @ 2016-12-21 11:21 UTC (permalink / raw)
To: Imre Deak, intel-gfx
On Wed, 21 Dec 2016, Imre Deak <imre.deak@intel.com> wrote:
> There is at least one APL based system using port A in DP mode
> (connecting to an on-board DP->VGA adaptor). Atm we'll configure port A
> unconditionally as eDP which is incorrect in this case. Fix this by
> relying on the VBT DDI port 'internal port' flag instead on all ports on
> DDI platforms. For now chicken out from using VBT for port A before
> GEN9.
>
> v2:
> - Move the DDI port info lookup to intel_bios_is_port_edp() (David, Jani)
> - Use the DDI port info on all DDI platforms starting for port B.
>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: David Weinehall <david.weinehall@linux.intel.com>
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> (v1)
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.h | 1 +
> drivers/gpu/drm/i915/intel_bios.c | 4 ++++
> drivers/gpu/drm/i915/intel_dp.c | 2 +-
> 3 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 77d7a07..1a91409 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1669,6 +1669,7 @@ struct ddi_vbt_port_info {
> uint8_t supports_dvi:1;
> uint8_t supports_hdmi:1;
> uint8_t supports_dp:1;
> + uint8_t supports_edp:1;
>
> uint8_t alternate_aux_channel;
> uint8_t alternate_ddc_pin;
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index 1cf2fa6..a359def 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -1161,6 +1161,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
> info->supports_dvi = is_dvi;
> info->supports_hdmi = is_hdmi;
> info->supports_dp = is_dp;
> + info->supports_edp = is_edp;
>
> DRM_DEBUG_KMS("Port %c VBT info: DP:%d HDMI:%d DVI:%d EDP:%d CRT:%d\n",
> port_name(port), is_dp, is_hdmi, is_dvi, is_edp, is_crt);
> @@ -1664,6 +1665,9 @@ bool intel_bios_is_port_edp(struct drm_i915_private *dev_priv, enum port port)
> };
> int i;
>
> + if (HAS_DDI(dev_priv))
> + return dev_priv->vbt.ddi_port_info[port].supports_edp;
> +
> if (!dev_priv->vbt.child_dev_num)
> return false;
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 66b5bc8..746c237 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -4975,7 +4975,7 @@ bool intel_dp_is_edp(struct drm_i915_private *dev_priv, enum port port)
> if (INTEL_GEN(dev_priv) < 5)
> return false;
>
> - if (port == PORT_A)
> + if (INTEL_GEN(dev_priv) < 9 && port == PORT_A)
> return true;
I like the split between intel_bios.c and intel_dp.c like this.
If we wanted to be extra careful with this, we might even consider
splitting the patch in two, one changing intel_dp_is_edp and the other
intel_bios_is_port_edp... They *are* distinct changes, after all.
BR,
Jani.
>
> return intel_bios_is_port_edp(dev_priv, port);
--
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] 15+ messages in thread
* Re: [PATCH v2] drm/i915/ddi: Rely on VBT DDI port info for eDP detection
2016-12-21 11:21 ` Jani Nikula
@ 2016-12-21 11:50 ` Imre Deak
2016-12-21 11:56 ` Jani Nikula
0 siblings, 1 reply; 15+ messages in thread
From: Imre Deak @ 2016-12-21 11:50 UTC (permalink / raw)
To: Jani Nikula, intel-gfx
On Wed, 2016-12-21 at 13:21 +0200, Jani Nikula wrote:
> On Wed, 21 Dec 2016, Imre Deak <imre.deak@intel.com> wrote:
> > There is at least one APL based system using port A in DP mode
> > (connecting to an on-board DP->VGA adaptor). Atm we'll configure port A
> > unconditionally as eDP which is incorrect in this case. Fix this by
> > relying on the VBT DDI port 'internal port' flag instead on all ports on
> > DDI platforms. For now chicken out from using VBT for port A before
> > GEN9.
> >
> > v2:
> > - Move the DDI port info lookup to intel_bios_is_port_edp() (David, Jani)
> > - Use the DDI port info on all DDI platforms starting for port B.
> >
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Cc: Jani Nikula <jani.nikula@intel.com>
> > Cc: David Weinehall <david.weinehall@linux.intel.com>
> > Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> (v1)
> > Signed-off-by: Imre Deak <imre.deak@intel.com>
> > ---
> > drivers/gpu/drm/i915/i915_drv.h | 1 +
> > drivers/gpu/drm/i915/intel_bios.c | 4 ++++
> > drivers/gpu/drm/i915/intel_dp.c | 2 +-
> > 3 files changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> > index 77d7a07..1a91409 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.h
> > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > @@ -1669,6 +1669,7 @@ struct ddi_vbt_port_info {
> > uint8_t supports_dvi:1;
> > uint8_t supports_hdmi:1;
> > uint8_t supports_dp:1;
> > + uint8_t supports_edp:1;
> >
> > uint8_t alternate_aux_channel;
> > uint8_t alternate_ddc_pin;
> > diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> > index 1cf2fa6..a359def 100644
> > --- a/drivers/gpu/drm/i915/intel_bios.c
> > +++ b/drivers/gpu/drm/i915/intel_bios.c
> > @@ -1161,6 +1161,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
> > info->supports_dvi = is_dvi;
> > info->supports_hdmi = is_hdmi;
> > info->supports_dp = is_dp;
> > + info->supports_edp = is_edp;
> >
> > DRM_DEBUG_KMS("Port %c VBT info: DP:%d HDMI:%d DVI:%d EDP:%d CRT:%d\n",
> > port_name(port), is_dp, is_hdmi, is_dvi, is_edp, is_crt);
> > @@ -1664,6 +1665,9 @@ bool intel_bios_is_port_edp(struct drm_i915_private *dev_priv, enum port port)
> > };
> > int i;
> >
> > + if (HAS_DDI(dev_priv))
> > + return dev_priv->vbt.ddi_port_info[port].supports_edp;
> > +
> > if (!dev_priv->vbt.child_dev_num)
> > return false;
> >
> > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> > index 66b5bc8..746c237 100644
> > --- a/drivers/gpu/drm/i915/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > @@ -4975,7 +4975,7 @@ bool intel_dp_is_edp(struct drm_i915_private *dev_priv, enum port port)
> > if (INTEL_GEN(dev_priv) < 5)
> > return false;
> >
> > - if (port == PORT_A)
> > + if (INTEL_GEN(dev_priv) < 9 && port == PORT_A)
> > return true;
>
> I like the split between intel_bios.c and intel_dp.c like this.
>
> If we wanted to be extra careful with this, we might even consider
> splitting the patch in two, one changing intel_dp_is_edp and the other
> intel_bios_is_port_edp... They *are* distinct changes, after all.
The change is to use the DDI port info table on DDI platforms, so
the split wouldn't help when looking at a bisect result. But if you
insist I can respin.
>
> BR,
> Jani.
>
>
> >
> > return intel_bios_is_port_edp(dev_priv, port);
>
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2] drm/i915/ddi: Rely on VBT DDI port info for eDP detection
2016-12-21 11:50 ` Imre Deak
@ 2016-12-21 11:56 ` Jani Nikula
0 siblings, 0 replies; 15+ messages in thread
From: Jani Nikula @ 2016-12-21 11:56 UTC (permalink / raw)
To: imre.deak, intel-gfx
On Wed, 21 Dec 2016, Imre Deak <imre.deak@intel.com> wrote:
> On Wed, 2016-12-21 at 13:21 +0200, Jani Nikula wrote:
>> On Wed, 21 Dec 2016, Imre Deak <imre.deak@intel.com> wrote:
>> > There is at least one APL based system using port A in DP mode
>> > (connecting to an on-board DP->VGA adaptor). Atm we'll configure port A
>> > unconditionally as eDP which is incorrect in this case. Fix this by
>> > relying on the VBT DDI port 'internal port' flag instead on all ports on
>> > DDI platforms. For now chicken out from using VBT for port A before
>> > GEN9.
>> >
>> > v2:
>> > - Move the DDI port info lookup to intel_bios_is_port_edp() (David, Jani)
>> > - Use the DDI port info on all DDI platforms starting for port B.
>> >
>> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
>> > Cc: Jani Nikula <jani.nikula@intel.com>
>> > Cc: David Weinehall <david.weinehall@linux.intel.com>
>> > Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> (v1)
>> > Signed-off-by: Imre Deak <imre.deak@intel.com>
>> > ---
>> > drivers/gpu/drm/i915/i915_drv.h | 1 +
>> > drivers/gpu/drm/i915/intel_bios.c | 4 ++++
>> > drivers/gpu/drm/i915/intel_dp.c | 2 +-
>> > 3 files changed, 6 insertions(+), 1 deletion(-)
>> >
>> > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
>> > index 77d7a07..1a91409 100644
>> > --- a/drivers/gpu/drm/i915/i915_drv.h
>> > +++ b/drivers/gpu/drm/i915/i915_drv.h
>> > @@ -1669,6 +1669,7 @@ struct ddi_vbt_port_info {
>> > uint8_t supports_dvi:1;
>> > uint8_t supports_hdmi:1;
>> > uint8_t supports_dp:1;
>> > + uint8_t supports_edp:1;
>> >
>> > uint8_t alternate_aux_channel;
>> > uint8_t alternate_ddc_pin;
>> > diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
>> > index 1cf2fa6..a359def 100644
>> > --- a/drivers/gpu/drm/i915/intel_bios.c
>> > +++ b/drivers/gpu/drm/i915/intel_bios.c
>> > @@ -1161,6 +1161,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
>> > info->supports_dvi = is_dvi;
>> > info->supports_hdmi = is_hdmi;
>> > info->supports_dp = is_dp;
>> > + info->supports_edp = is_edp;
>> >
>> > DRM_DEBUG_KMS("Port %c VBT info: DP:%d HDMI:%d DVI:%d EDP:%d CRT:%d\n",
>> > port_name(port), is_dp, is_hdmi, is_dvi, is_edp, is_crt);
>> > @@ -1664,6 +1665,9 @@ bool intel_bios_is_port_edp(struct drm_i915_private *dev_priv, enum port port)
>> > };
>> > int i;
>> >
>> > + if (HAS_DDI(dev_priv))
>> > + return dev_priv->vbt.ddi_port_info[port].supports_edp;
>> > +
>> > if (!dev_priv->vbt.child_dev_num)
>> > return false;
>> >
>> > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
>> > index 66b5bc8..746c237 100644
>> > --- a/drivers/gpu/drm/i915/intel_dp.c
>> > +++ b/drivers/gpu/drm/i915/intel_dp.c
>> > @@ -4975,7 +4975,7 @@ bool intel_dp_is_edp(struct drm_i915_private *dev_priv, enum port port)
>> > if (INTEL_GEN(dev_priv) < 5)
>> > return false;
>> >
>> > - if (port == PORT_A)
>> > + if (INTEL_GEN(dev_priv) < 9 && port == PORT_A)
>> > return true;
>>
>> I like the split between intel_bios.c and intel_dp.c like this.
>>
>> If we wanted to be extra careful with this, we might even consider
>> splitting the patch in two, one changing intel_dp_is_edp and the other
>> intel_bios_is_port_edp... They *are* distinct changes, after all.
>
> The change is to use the DDI port info table on DDI platforms, so
> the split wouldn't help when looking at a bisect result. But if you
> insist I can respin.
Right, never mind.
J.
>
>>
>> BR,
>> Jani.
>>
>>
>> >
>> > return intel_bios_is_port_edp(dev_priv, port);
>>
>>
--
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] 15+ messages in thread
* Re: ✗ Fi.CI.BAT: failure for drm/i915/gen9+: Rely on VBT DDI port info for eDP detection (rev2)
2016-12-21 10:56 ` ✗ Fi.CI.BAT: failure for drm/i915/gen9+: Rely on VBT DDI port info for eDP detection (rev2) Patchwork
@ 2016-12-21 12:15 ` Imre Deak
0 siblings, 0 replies; 15+ messages in thread
From: Imre Deak @ 2016-12-21 12:15 UTC (permalink / raw)
To: intel-gfx
On Wed, 2016-12-21 at 10:56 +0000, Patchwork wrote:
> == Series Details ==
>
> Series: drm/i915/gen9+: Rely on VBT DDI port info for eDP detection (rev2)
> URL : https://patchwork.freedesktop.org/series/17063/
> State : failure
>
> == Summary ==
>
> Series 17063v2 drm/i915/gen9+: Rely on VBT DDI port info for eDP detection
> https://patchwork.freedesktop.org/api/1.0/series/17063/revisions/2/mbox/
>
> Test drv_module_reload:
> Subgroup basic-reload-final:
> pass -> FAIL (fi-ilk-650)
> Subgroup basic-reload-inject:
> pass -> DMESG-FAIL (fi-ilk-650)
> Test gem_basic:
> Subgroup bad-close:
> pass -> SKIP (fi-ilk-650)
> Subgroup create-close:
> pass -> SKIP (fi-ilk-650)
> Subgroup create-fd-close:
> pass -> SKIP (fi-ilk-650)
> Test gem_busy:
> Subgroup basic-busy-default:
> pass -> SKIP (fi-ilk-650)
> Subgroup basic-hang-default:
> pass -> SKIP (fi-ilk-650)
> Test gem_close_race:
> Subgroup basic-process:
> pass -> SKIP (fi-ilk-650)
> Subgroup basic-threads:
> pass -> SKIP (fi-ilk-650)
> Test gem_cpu_reloc:
> Subgroup basic:
> pass -> SKIP (fi-ilk-650)
> Test gem_cs_tlb:
> Subgroup basic-default:
> pass -> SKIP (fi-ilk-650)
> Test gem_exec_basic:
> Subgroup basic-bsd:
> pass -> SKIP (fi-ilk-650)
> Subgroup basic-default:
> pass -> SKIP (fi-ilk-650)
> Subgroup basic-render:
> pass -> SKIP (fi-ilk-650)
> Subgroup gtt-bsd:
> pass -> SKIP (fi-ilk-650)
> Subgroup gtt-default:
> pass -> SKIP (fi-ilk-650)
> Subgroup gtt-render:
> pass -> SKIP (fi-ilk-650)
> Subgroup readonly-bsd:
> pass -> SKIP (fi-ilk-650)
> Subgroup readonly-default:
> pass -> SKIP (fi-ilk-650)
> Subgroup readonly-render:
> pass -> SKIP (fi-ilk-650)
> Test gem_exec_create:
> Subgroup basic:
> pass -> SKIP (fi-ilk-650)
> Test gem_exec_flush:
> Subgroup basic-batch-kernel-default-uc:
> pass -> SKIP (fi-ilk-650)
> Subgroup basic-batch-kernel-default-wb:
> pass -> SKIP (fi-ilk-650)
> Subgroup basic-uc-pro-default:
> pass -> SKIP (fi-ilk-650)
> Subgroup basic-uc-prw-default:
> pass -> SKIP (fi-ilk-650)
> Subgroup basic-uc-ro-default:
> pass -> SKIP (fi-ilk-650)
> Subgroup basic-uc-rw-default:
> pass -> SKIP (fi-ilk-650)
> Subgroup basic-uc-set-default:
> pass -> SKIP (fi-ilk-650)
> Subgroup basic-wb-pro-default:
> pass -> SKIP (fi-ilk-650)
> Subgroup basic-wb-prw-default:
> pass -> SKIP (fi-ilk-650)
> Subgroup basic-wb-ro-before-default:
> pass -> SKIP (fi-ilk-650)
> Subgroup basic-wb-ro-default:
> pass -> SKIP (fi-ilk-650)
> Subgroup basic-wb-rw-before-default:
> pass -> SKIP (fi-ilk-650)
> Subgroup basic-wb-rw-default:
> pass -> SKIP (fi-ilk-650)
> Subgroup basic-wb-set-default:
> pass -> SKIP (fi-ilk-650)
> Test gem_exec_gttfill:
> Subgroup basic:
> pass -> SKIP (fi-ilk-650)
> Test gem_exec_nop:
> Subgroup basic-parallel:
> pass -> SKIP (fi-ilk-650)
> Subgroup basic-series:
> pass -> SKIP (fi-ilk-650)
> Test gem_exec_parallel:
> Subgroup basic:
> pass -> SKIP (fi-ilk-650)
> Test gem_exec_reloc:
> Subgroup basic-cpu:
> pass -> SKIP (fi-ilk-650)
> Subgroup basic-gtt:
> pass -> SKIP (fi-ilk-650)
> Subgroup basic-noreloc:
> pass -> SKIP (fi-ilk-650)
Looks like a new issue during i915 module unloading, but the patch doesn't
change anything on ILK:
[ 28.618031] BUG: unable to handle kernel paging request at ffffffff0000019a
[ 28.618043] IP: [<ffffffff810d71d9>] __lock_acquire+0x99/0x1930
[ 28.618054] PGD 1e0b067
[ 28.618057] PUD 0
[ 28.618064] Oops: 0002 [#1] PREEMPT SMP
[ 28.618068] Modules linked in: i915(-) intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_codec_hdmi
lpc_ich snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec snd_hwdep snd_hda_core mei_me snd_pcm mei e1000e ptp pps_core [last
unloaded: snd_hda_intel]
[ 28.618101] CPU: 3 PID: 6019 Comm: drv_module_relo Tainted: G U 4.9.0-CI-Patchwork_3351+ #1
[ 28.618109] Hardware name: Hewlett-Packard HP Compaq 8100 Elite SFF PC/304Ah, BIOS 786H1 v01.05 06/09/2010
[ 28.618117] task: ffff88020ada8040 task.stack: ffffc9000022c000
[ 28.618122] RIP: 0010:[<ffffffff810d71d9>] [<ffffffff810d71d9>] __lock_acquire+0x99/0x1930
[ 28.618131] RSP: 0018:ffffc9000022fb90 EFLAGS: 00010082
[ 28.618136] RAX: ffffffff00000002 RBX: 0000000000000000 RCX: 0000000000000000
[ 28.618142] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001
[ 28.618148] RBP: ffffc9000022fc38 R08: 0000000000000001 R09: 0000000000000001
[ 28.618153] R10: 0000000000000000 R11: ffff88020ada8040 R12: ffff88020d4490b8
[ 28.618162] R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000000
[ 28.618171] FS: 00007fe077d188c0(0000) GS:ffff88021bcc0000(0000) knlGS:0000000000000000
[ 28.618186] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 28.618195] CR2: ffffffff0000019a CR3: 0000000206105000 CR4: 00000000000006e0
[ 28.618204] Stack:
[ 28.618210] 0000000000000053 ffff88020ada8930 ffffc9000022fc58 0000000000000046
[ 28.618225] ffffc9000022fc70 ffff88020ada8040 ffff88020ada8868 0000000000000005
[ 28.618241] 0000000000000123 ffff88020ada8040 ffff88020ada8868 ffff88020ada8040
[ 28.618257] Call Trace:
[ 28.618267] [<ffffffff810d8e92>] lock_acquire+0xb2/0x200
[ 28.618277] [<ffffffff812140cc>] ? clear_inode+0x2c/0xa0
[ 28.618288] [<ffffffff8182731c>] _raw_spin_lock_irq+0x3c/0x50
[ 28.618298] [<ffffffff812140cc>] ? clear_inode+0x2c/0xa0
[ 28.618307] [<ffffffff812140cc>] clear_inode+0x2c/0xa0
[ 28.618316] [<ffffffff81214c7d>] evict+0x16d/0x180
[ 28.618325] [<ffffffff8121503e>] iput+0x23e/0x320
[ 28.618335] [<ffffffff8120dafe>] dentry_unlink_inode+0xbe/0x160
[ 28.618345] [<ffffffff8120e59c>] d_delete+0x9c/0xb0
[ 28.618355] [<ffffffff813070a2>] __tracefs_remove.isra.5+0x72/0x80
[ 28.618366] [<ffffffff81307451>] tracefs_remove_recursive+0xb1/0x180
[ 28.618375] [<ffffffff8114bef8>] remove_event_file_dir+0x78/0xd0
[ 28.618386] [<ffffffff8114c003>] event_remove+0xb3/0xe0
[ 28.618395] [<ffffffff8114c6da>] trace_module_notify+0x9a/0x1a0
[ 28.618407] [<ffffffff810a44a4>] notifier_call_chain+0x34/0xa0
[ 28.618416] [<ffffffff810a4848>] __blocking_notifier_call_chain+0x48/0x70
[ 28.618426] [<ffffffff810a4881>] blocking_notifier_call_chain+0x11/0x20
[ 28.618436] [<ffffffff8111a827>] SyS_delete_module+0x1a7/0x1e0
[ 28.618445] [<ffffffff81827c6e>] entry_SYSCALL_64_fastpath+0x1c/0xb1
[ 28.618453] Code: 20 44 89 44 24 28 89 4c 24 30 e8 33 cf ff ff 48 85 c0 8b 4c 24 30 44 8b 44 24 28 44 8b 4c 24 20 4c 8b 5c 24 18 0f 84 f6
01 00 00 <f0> ff 80 98 01 00 00 44 8b 35 71 fe c1 01 45 8b ab 20 08 00 00
[ 28.618517] RIP [<ffffffff810d71d9>] __lock_acquire+0x99/0x1930
[ 28.618526] RSP <ffffc9000022fb90>
[ 28.618533] CR2: ffffffff0000019a
[ 28.618539] ---[ end trace 9f6539ddca885602 ]---
[ 28.618547] BUG: sleeping function called from invalid context at ./include/linux/sched.h:3111
[ 28.618559] in_atomic(): 1, irqs_disabled(): 1, pid: 6019, name: drv_module_relo
[ 28.618570] INFO: lockdep is turned off.
[ 28.618576] irq event stamp: 629508
[ 28.618585] hardirqs last enabled at (629507): [<ffffffff811070cf>] current_kernel_time64+0x8f/0xb0
[ 28.618598] hardirqs last disabled at (629508): [<ffffffff818272f2>] _raw_spin_lock_irq+0x12/0x50
[ 28.618614] softirqs last enabled at (628362): [<ffffffff810856d9>] __do_softirq+0x1d9/0x4a0
[ 28.618627] softirqs last disabled at (628127): [<ffffffff81085b29>] irq_exit+0xa9/0xc0
[ 28.618637] Preemption disabled at:
[ 28.618641] [<ffffffff812140cc>] clear_inode+0x2c/0xa0
[ 28.618653] CPU: 3 PID: 6019 Comm: drv_module_relo Tainted: G UD 4.9.0-CI-Patchwork_3351+ #1
[ 28.618665] Hardware name: Hewlett-Packard HP Compaq 8100 Elite SFF PC/304Ah, BIOS 786H1 v01.05 06/09/2010
[ 28.618677] ffffc9000022fe58 ffffffff81435b05 0000000000000000 ffff88020ada8040
[ 28.618691] ffffc9000022fe90 ffffffff810aab52 ffffffff81c359ee 0000000000000c27
[ 28.618705] 0000000000000000 ffff88020ada8040 0000000000000000 ffffc9000022feb8
[ 28.618717] Call Trace:
[ 28.618726] [<ffffffff81435b05>] dump_stack+0x67/0x92
[ 28.618734] [<ffffffff810aab52>] ___might_sleep+0x162/0x250
[ 28.618742] [<ffffffff810aac85>] __might_sleep+0x45/0x80
[ 28.618750] [<ffffffff8109152f>] exit_signals+0x1f/0x2c0
[ 28.618759] [<ffffffff81083b2f>] do_exit+0x9f/0xc20
[ 28.618768] [<ffffffff810a4881>] ? blocking_notifier_call_chain+0x11/0x20
[ 28.618777] [<ffffffff8111a827>] ? SyS_delete_module+0x1a7/0x1e0
[ 28.618788] [<ffffffff81829c37>] rewind_stack_do_exit+0x17/0x20
[ 28.618798] note: drv_module_relo[6019] exited with preempt_count 1
> WARNING: Long output truncated
>
> 6096aee14ea52e3163729129ee7362e56ff3efb9 drm-tip: 2016y-12m-20d-16h-33m-17s UTC integration manifest
> 7c27ee0 drm/i915/ddi: Rely on VBT DDI port info for eDP detection
>
> == Logs ==
>
> For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3351/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2] drm/i915/ddi: Rely on VBT DDI port info for eDP detection
2016-12-21 10:17 ` [PATCH v2] drm/i915/ddi: " Imre Deak
2016-12-21 11:21 ` Jani Nikula
@ 2016-12-22 9:12 ` David Weinehall
2016-12-22 12:28 ` Imre Deak
1 sibling, 1 reply; 15+ messages in thread
From: David Weinehall @ 2016-12-22 9:12 UTC (permalink / raw)
To: Imre Deak; +Cc: Jani Nikula, intel-gfx
On Wed, Dec 21, 2016 at 12:17:24PM +0200, Imre Deak wrote:
> There is at least one APL based system using port A in DP mode
> (connecting to an on-board DP->VGA adaptor). Atm we'll configure port A
> unconditionally as eDP which is incorrect in this case. Fix this by
> relying on the VBT DDI port 'internal port' flag instead on all ports on
> DDI platforms. For now chicken out from using VBT for port A before
> GEN9.
>
> v2:
> - Move the DDI port info lookup to intel_bios_is_port_edp() (David, Jani)
> - Use the DDI port info on all DDI platforms starting for port B.
>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: David Weinehall <david.weinehall@linux.intel.com>
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> (v1)
> Signed-off-by: Imre Deak <imre.deak@intel.com>
Much happier with this one.
Reviewed-by: David Weinehall <david.weinehall@linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.h | 1 +
> drivers/gpu/drm/i915/intel_bios.c | 4 ++++
> drivers/gpu/drm/i915/intel_dp.c | 2 +-
> 3 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 77d7a07..1a91409 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1669,6 +1669,7 @@ struct ddi_vbt_port_info {
> uint8_t supports_dvi:1;
> uint8_t supports_hdmi:1;
> uint8_t supports_dp:1;
> + uint8_t supports_edp:1;
>
> uint8_t alternate_aux_channel;
> uint8_t alternate_ddc_pin;
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index 1cf2fa6..a359def 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -1161,6 +1161,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
> info->supports_dvi = is_dvi;
> info->supports_hdmi = is_hdmi;
> info->supports_dp = is_dp;
> + info->supports_edp = is_edp;
>
> DRM_DEBUG_KMS("Port %c VBT info: DP:%d HDMI:%d DVI:%d EDP:%d CRT:%d\n",
> port_name(port), is_dp, is_hdmi, is_dvi, is_edp, is_crt);
> @@ -1664,6 +1665,9 @@ bool intel_bios_is_port_edp(struct drm_i915_private *dev_priv, enum port port)
> };
> int i;
>
> + if (HAS_DDI(dev_priv))
> + return dev_priv->vbt.ddi_port_info[port].supports_edp;
> +
> if (!dev_priv->vbt.child_dev_num)
> return false;
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 66b5bc8..746c237 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -4975,7 +4975,7 @@ bool intel_dp_is_edp(struct drm_i915_private *dev_priv, enum port port)
> if (INTEL_GEN(dev_priv) < 5)
> return false;
>
> - if (port == PORT_A)
> + if (INTEL_GEN(dev_priv) < 9 && port == PORT_A)
> return true;
>
> return intel_bios_is_port_edp(dev_priv, port);
> --
> 2.5.0
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2] drm/i915/ddi: Rely on VBT DDI port info for eDP detection
2016-12-22 9:12 ` David Weinehall
@ 2016-12-22 12:28 ` Imre Deak
0 siblings, 0 replies; 15+ messages in thread
From: Imre Deak @ 2016-12-22 12:28 UTC (permalink / raw)
To: David Weinehall; +Cc: Jani Nikula, intel-gfx
On Thu, 2016-12-22 at 11:12 +0200, David Weinehall wrote:
> On Wed, Dec 21, 2016 at 12:17:24PM +0200, Imre Deak wrote:
> > There is at least one APL based system using port A in DP mode
> > (connecting to an on-board DP->VGA adaptor). Atm we'll configure port A
> > unconditionally as eDP which is incorrect in this case. Fix this by
> > relying on the VBT DDI port 'internal port' flag instead on all ports on
> > DDI platforms. For now chicken out from using VBT for port A before
> > GEN9.
> >
> > v2:
> > - Move the DDI port info lookup to intel_bios_is_port_edp() (David, Jani)
> > - Use the DDI port info on all DDI platforms starting for port B.
> >
> > > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > Cc: Jani Nikula <jani.nikula@intel.com>
> > > > Cc: David Weinehall <david.weinehall@linux.intel.com>
> > > > Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> (v1)
> > Signed-off-by: Imre Deak <imre.deak@intel.com>
>
> Much happier with this one.
>
> Reviewed-by: David Weinehall <david.weinehall@linux.intel.com>
Pushed to -dinq, thanks for the reviews.
> > ---
> > drivers/gpu/drm/i915/i915_drv.h | 1 +
> > drivers/gpu/drm/i915/intel_bios.c | 4 ++++
> > drivers/gpu/drm/i915/intel_dp.c | 2 +-
> > 3 files changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> > index 77d7a07..1a91409 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.h
> > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > @@ -1669,6 +1669,7 @@ struct ddi_vbt_port_info {
> > > > uint8_t supports_dvi:1;
> > > > uint8_t supports_hdmi:1;
> > > > uint8_t supports_dp:1;
> > > > + uint8_t supports_edp:1;
> >
> > > > uint8_t alternate_aux_channel;
> > > > uint8_t alternate_ddc_pin;
> > diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> > index 1cf2fa6..a359def 100644
> > --- a/drivers/gpu/drm/i915/intel_bios.c
> > +++ b/drivers/gpu/drm/i915/intel_bios.c
> > @@ -1161,6 +1161,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
> > > > info->supports_dvi = is_dvi;
> > > > info->supports_hdmi = is_hdmi;
> > > > info->supports_dp = is_dp;
> > > > + info->supports_edp = is_edp;
> >
> > > > DRM_DEBUG_KMS("Port %c VBT info: DP:%d HDMI:%d DVI:%d EDP:%d CRT:%d\n",
> > > > port_name(port), is_dp, is_hdmi, is_dvi, is_edp, is_crt);
> > @@ -1664,6 +1665,9 @@ bool intel_bios_is_port_edp(struct drm_i915_private *dev_priv, enum port port)
> > > > };
> > > > int i;
> >
> > > > + if (HAS_DDI(dev_priv))
> > > > + return dev_priv->vbt.ddi_port_info[port].supports_edp;
> > +
> > > > if (!dev_priv->vbt.child_dev_num)
> > > > return false;
> >
> > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> > index 66b5bc8..746c237 100644
> > --- a/drivers/gpu/drm/i915/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > @@ -4975,7 +4975,7 @@ bool intel_dp_is_edp(struct drm_i915_private *dev_priv, enum port port)
> > > > if (INTEL_GEN(dev_priv) < 5)
> > > > return false;
> >
> > > > - if (port == PORT_A)
> > > > + if (INTEL_GEN(dev_priv) < 9 && port == PORT_A)
> > > > return true;
> >
> > > > return intel_bios_is_port_edp(dev_priv, port);
> > --
> > 2.5.0
> >
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2016-12-22 12:28 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-20 15:12 [PATCH] drm/i915/gen9+: Rely on VBT DDI port info for eDP detection Imre Deak
2016-12-20 15:31 ` Ville Syrjälä
2016-12-20 16:02 ` David Weinehall
2016-12-20 16:34 ` Imre Deak
2016-12-21 8:34 ` Jani Nikula
2016-12-21 10:03 ` Imre Deak
2016-12-20 17:45 ` ✗ Fi.CI.BAT: warning for " Patchwork
2016-12-21 10:17 ` [PATCH v2] drm/i915/ddi: " Imre Deak
2016-12-21 11:21 ` Jani Nikula
2016-12-21 11:50 ` Imre Deak
2016-12-21 11:56 ` Jani Nikula
2016-12-22 9:12 ` David Weinehall
2016-12-22 12:28 ` Imre Deak
2016-12-21 10:56 ` ✗ Fi.CI.BAT: failure for drm/i915/gen9+: Rely on VBT DDI port info for eDP detection (rev2) Patchwork
2016-12-21 12:15 ` Imre Deak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).