* [PATCH v2] drm/i915: Fix eDP low vswing for Broadwell
@ 2016-03-17 10:23 Mika Kahola
2016-03-17 13:47 ` Ville Syrjälä
2016-04-11 13:30 ` Ville Syrjälä
0 siblings, 2 replies; 4+ messages in thread
From: Mika Kahola @ 2016-03-17 10:23 UTC (permalink / raw)
To: intel-gfx
It was noticed on bug #94087 that module parameter
i915.edp_vswing=2 that should override the VBT setting
to use default voltage swing (400 mV) was not applied
for Broadwell.
This patch provides a fix for this by checking if default
i.e. higher voltage swing is requested to be used and
applies the DDI translations table for DP instead of eDP
(low vswing) table.
v2: Combine two if statements into one (Jani)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94087
Signed-off-by: Mika Kahola <mika.kahola@intel.com>
---
drivers/gpu/drm/i915/intel_ddi.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index ab025a5..100a532 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -443,9 +443,17 @@ void intel_prepare_ddi_buffer(struct intel_encoder *encoder)
} else if (IS_BROADWELL(dev_priv)) {
ddi_translations_fdi = bdw_ddi_translations_fdi;
ddi_translations_dp = bdw_ddi_translations_dp;
- ddi_translations_edp = bdw_ddi_translations_edp;
+
+ if (dev_priv->edp_low_vswing) {
+ ddi_translations_edp = bdw_ddi_translations_edp;
+ n_edp_entries = ARRAY_SIZE(bdw_ddi_translations_edp);
+ } else {
+ ddi_translations_edp = bdw_ddi_translations_dp;
+ n_edp_entries = ARRAY_SIZE(bdw_ddi_translations_dp);
+ }
+
ddi_translations_hdmi = bdw_ddi_translations_hdmi;
- n_edp_entries = ARRAY_SIZE(bdw_ddi_translations_edp);
+
n_dp_entries = ARRAY_SIZE(bdw_ddi_translations_dp);
n_hdmi_entries = ARRAY_SIZE(bdw_ddi_translations_hdmi);
hdmi_default_entry = 7;
--
1.9.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] drm/i915: Fix eDP low vswing for Broadwell
2016-03-17 10:23 [PATCH v2] drm/i915: Fix eDP low vswing for Broadwell Mika Kahola
@ 2016-03-17 13:47 ` Ville Syrjälä
2016-04-11 13:30 ` Ville Syrjälä
1 sibling, 0 replies; 4+ messages in thread
From: Ville Syrjälä @ 2016-03-17 13:47 UTC (permalink / raw)
To: Mika Kahola; +Cc: intel-gfx
On Thu, Mar 17, 2016 at 12:23:10PM +0200, Mika Kahola wrote:
> It was noticed on bug #94087 that module parameter
> i915.edp_vswing=2 that should override the VBT setting
> to use default voltage swing (400 mV) was not applied
> for Broadwell.
>
> This patch provides a fix for this by checking if default
> i.e. higher voltage swing is requested to be used and
> applies the DDI translations table for DP instead of eDP
> (low vswing) table.
The spec is rather vague on the matter. For BDW it just lists the tables
as "for DisplayPort" and "for embedded DisplayPort rev 1.4", whereas SKL
has them as "for DisplayPort" and "for embedded DisplayPorts that support
low voltage swings". But looking at the details, it's clear that the BDW
eDP table is really a low vswing table.
The VBT spec has nothing to say beyond the fact that the low vswing
option was added in version 173 (which we already handle correctly).
So the patch is
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> v2: Combine two if statements into one (Jani)
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94087
> Signed-off-by: Mika Kahola <mika.kahola@intel.com>
> ---
> drivers/gpu/drm/i915/intel_ddi.c | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index ab025a5..100a532 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -443,9 +443,17 @@ void intel_prepare_ddi_buffer(struct intel_encoder *encoder)
> } else if (IS_BROADWELL(dev_priv)) {
> ddi_translations_fdi = bdw_ddi_translations_fdi;
> ddi_translations_dp = bdw_ddi_translations_dp;
> - ddi_translations_edp = bdw_ddi_translations_edp;
> +
> + if (dev_priv->edp_low_vswing) {
> + ddi_translations_edp = bdw_ddi_translations_edp;
> + n_edp_entries = ARRAY_SIZE(bdw_ddi_translations_edp);
> + } else {
> + ddi_translations_edp = bdw_ddi_translations_dp;
> + n_edp_entries = ARRAY_SIZE(bdw_ddi_translations_dp);
> + }
> +
> ddi_translations_hdmi = bdw_ddi_translations_hdmi;
> - n_edp_entries = ARRAY_SIZE(bdw_ddi_translations_edp);
> +
> n_dp_entries = ARRAY_SIZE(bdw_ddi_translations_dp);
> n_hdmi_entries = ARRAY_SIZE(bdw_ddi_translations_hdmi);
> hdmi_default_entry = 7;
> --
> 1.9.1
>
> _______________________________________________
> 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] 4+ messages in thread
* Re: [PATCH v2] drm/i915: Fix eDP low vswing for Broadwell
2016-03-17 10:23 [PATCH v2] drm/i915: Fix eDP low vswing for Broadwell Mika Kahola
2016-03-17 13:47 ` Ville Syrjälä
@ 2016-04-11 13:30 ` Ville Syrjälä
2016-04-12 10:22 ` Mika Kahola
1 sibling, 1 reply; 4+ messages in thread
From: Ville Syrjälä @ 2016-04-11 13:30 UTC (permalink / raw)
To: Mika Kahola; +Cc: intel-gfx
On Thu, Mar 17, 2016 at 12:23:10PM +0200, Mika Kahola wrote:
> It was noticed on bug #94087 that module parameter
> i915.edp_vswing=2 that should override the VBT setting
> to use default voltage swing (400 mV) was not applied
> for Broadwell.
>
> This patch provides a fix for this by checking if default
> i.e. higher voltage swing is requested to be used and
> applies the DDI translations table for DP instead of eDP
> (low vswing) table.
>
> v2: Combine two if statements into one (Jani)
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94087
> Signed-off-by: Mika Kahola <mika.kahola@intel.com>
We didn't get a CI run for this?
> ---
> drivers/gpu/drm/i915/intel_ddi.c | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index ab025a5..100a532 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -443,9 +443,17 @@ void intel_prepare_ddi_buffer(struct intel_encoder *encoder)
> } else if (IS_BROADWELL(dev_priv)) {
> ddi_translations_fdi = bdw_ddi_translations_fdi;
> ddi_translations_dp = bdw_ddi_translations_dp;
> - ddi_translations_edp = bdw_ddi_translations_edp;
> +
> + if (dev_priv->edp_low_vswing) {
> + ddi_translations_edp = bdw_ddi_translations_edp;
> + n_edp_entries = ARRAY_SIZE(bdw_ddi_translations_edp);
> + } else {
> + ddi_translations_edp = bdw_ddi_translations_dp;
> + n_edp_entries = ARRAY_SIZE(bdw_ddi_translations_dp);
> + }
> +
> ddi_translations_hdmi = bdw_ddi_translations_hdmi;
> - n_edp_entries = ARRAY_SIZE(bdw_ddi_translations_edp);
> +
> n_dp_entries = ARRAY_SIZE(bdw_ddi_translations_dp);
> n_hdmi_entries = ARRAY_SIZE(bdw_ddi_translations_hdmi);
> hdmi_default_entry = 7;
> --
> 1.9.1
>
> _______________________________________________
> 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] 4+ messages in thread
* Re: [PATCH v2] drm/i915: Fix eDP low vswing for Broadwell
2016-04-11 13:30 ` Ville Syrjälä
@ 2016-04-12 10:22 ` Mika Kahola
0 siblings, 0 replies; 4+ messages in thread
From: Mika Kahola @ 2016-04-12 10:22 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: intel-gfx
On Mon, 2016-04-11 at 16:30 +0300, Ville Syrjälä wrote:
> On Thu, Mar 17, 2016 at 12:23:10PM +0200, Mika Kahola wrote:
> > It was noticed on bug #94087 that module parameter
> > i915.edp_vswing=2 that should override the VBT setting
> > to use default voltage swing (400 mV) was not applied
> > for Broadwell.
> >
> > This patch provides a fix for this by checking if default
> > i.e. higher voltage swing is requested to be used and
> > applies the DDI translations table for DP instead of eDP
> > (low vswing) table.
> >
> > v2: Combine two if statements into one (Jani)
> >
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94087
> > Signed-off-by: Mika Kahola <mika.kahola@intel.com>
>
> We didn't get a CI run for this?
No, we didn't. Should I resend this patch for a CI run?
>
> > ---
> > drivers/gpu/drm/i915/intel_ddi.c | 12 ++++++++++--
> > 1 file changed, 10 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> > index ab025a5..100a532 100644
> > --- a/drivers/gpu/drm/i915/intel_ddi.c
> > +++ b/drivers/gpu/drm/i915/intel_ddi.c
> > @@ -443,9 +443,17 @@ void intel_prepare_ddi_buffer(struct intel_encoder *encoder)
> > } else if (IS_BROADWELL(dev_priv)) {
> > ddi_translations_fdi = bdw_ddi_translations_fdi;
> > ddi_translations_dp = bdw_ddi_translations_dp;
> > - ddi_translations_edp = bdw_ddi_translations_edp;
> > +
> > + if (dev_priv->edp_low_vswing) {
> > + ddi_translations_edp = bdw_ddi_translations_edp;
> > + n_edp_entries = ARRAY_SIZE(bdw_ddi_translations_edp);
> > + } else {
> > + ddi_translations_edp = bdw_ddi_translations_dp;
> > + n_edp_entries = ARRAY_SIZE(bdw_ddi_translations_dp);
> > + }
> > +
> > ddi_translations_hdmi = bdw_ddi_translations_hdmi;
> > - n_edp_entries = ARRAY_SIZE(bdw_ddi_translations_edp);
> > +
> > n_dp_entries = ARRAY_SIZE(bdw_ddi_translations_dp);
> > n_hdmi_entries = ARRAY_SIZE(bdw_ddi_translations_hdmi);
> > hdmi_default_entry = 7;
> > --
> > 1.9.1
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-04-12 10:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-17 10:23 [PATCH v2] drm/i915: Fix eDP low vswing for Broadwell Mika Kahola
2016-03-17 13:47 ` Ville Syrjälä
2016-04-11 13:30 ` Ville Syrjälä
2016-04-12 10:22 ` Mika Kahola
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox