diff mbox series

[11/12] drm/i915: WARN if a port should use VBT provided vswing tables

Message ID 20220715202044.11153-12-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: More VBT stuff | expand

Commit Message

Ville Syrjala July 15, 2022, 8:20 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

We don't parse the VBT vswing/preemphassis tables at all currently.
Let's WARN if a port wants to use them so we get a heads up that
whether we really need to implement this stuff or not. My
current stash contains no VBTs with this bit set.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_bios.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Rodrigo Vivi July 19, 2022, 10:31 a.m. UTC | #1
On Fri, Jul 15, 2022 at 11:20:43PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> We don't parse the VBT vswing/preemphassis tables at all currently.
> Let's WARN if a port wants to use them so we get a heads up that
> whether we really need to implement this stuff or not. My
> current stash contains no VBTs with this bit set.

let's unlock a new can of worms?! :)

I believe this deserves a /* XXX: comment with the code in case
someone else finds this warns first and doesn't use the git blame

anyways
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_bios.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> index 51dde5bfd956..cd86b65055ef 100644
> --- a/drivers/gpu/drm/i915/display/intel_bios.c
> +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> @@ -2661,6 +2661,10 @@ static void parse_ddi_port(struct intel_bios_encoder_data *devdata)
>  		return;
>  	}
>  
> +	drm_WARN(&i915->drm, child->use_vbt_vswing,
> +		 "Port %c asks to use VBT vswing/preemph tables\n",
> +		 port_name(port));
> +
>  	if (i915->vbt.ports[port]) {
>  		drm_dbg_kms(&i915->drm,
>  			    "More than one child device for port %c in VBT, using the first.\n",
> -- 
> 2.35.1
>
Ville Syrjala Sept. 1, 2022, 9:24 a.m. UTC | #2
On Tue, Jul 19, 2022 at 06:31:11AM -0400, Rodrigo Vivi wrote:
> On Fri, Jul 15, 2022 at 11:20:43PM +0300, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > We don't parse the VBT vswing/preemphassis tables at all currently.
> > Let's WARN if a port wants to use them so we get a heads up that
> > whether we really need to implement this stuff or not. My
> > current stash contains no VBTs with this bit set.
> 
> let's unlock a new can of worms?! :)
> 
> I believe this deserves a /* XXX: comment with the code in case
> someone else finds this warns first and doesn't use the git blame

Sure I'll stick some kind of comment there.

> 
> anyways
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> 
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_bios.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> > index 51dde5bfd956..cd86b65055ef 100644
> > --- a/drivers/gpu/drm/i915/display/intel_bios.c
> > +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> > @@ -2661,6 +2661,10 @@ static void parse_ddi_port(struct intel_bios_encoder_data *devdata)
> >  		return;
> >  	}
> >  
> > +	drm_WARN(&i915->drm, child->use_vbt_vswing,
> > +		 "Port %c asks to use VBT vswing/preemph tables\n",
> > +		 port_name(port));
> > +
> >  	if (i915->vbt.ports[port]) {
> >  		drm_dbg_kms(&i915->drm,
> >  			    "More than one child device for port %c in VBT, using the first.\n",
> > -- 
> > 2.35.1
> >
Jani Nikula Sept. 2, 2022, 2:01 p.m. UTC | #3
On Fri, 15 Jul 2022, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> We don't parse the VBT vswing/preemphassis tables at all currently.
> Let's WARN if a port wants to use them so we get a heads up that
> whether we really need to implement this stuff or not. My
> current stash contains no VBTs with this bit set.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_bios.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> index 51dde5bfd956..cd86b65055ef 100644
> --- a/drivers/gpu/drm/i915/display/intel_bios.c
> +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> @@ -2661,6 +2661,10 @@ static void parse_ddi_port(struct intel_bios_encoder_data *devdata)
>  		return;
>  	}
>  
> +	drm_WARN(&i915->drm, child->use_vbt_vswing,
> +		 "Port %c asks to use VBT vswing/preemph tables\n",
> +		 port_name(port));
> +

I was hoping to clean parse_ddi_port() of all this kind of informative
stuff and shove it to print_ddi_port().

BR,
Jani.

>  	if (i915->vbt.ports[port]) {
>  		drm_dbg_kms(&i915->drm,
>  			    "More than one child device for port %c in VBT, using the first.\n",
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index 51dde5bfd956..cd86b65055ef 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -2661,6 +2661,10 @@  static void parse_ddi_port(struct intel_bios_encoder_data *devdata)
 		return;
 	}
 
+	drm_WARN(&i915->drm, child->use_vbt_vswing,
+		 "Port %c asks to use VBT vswing/preemph tables\n",
+		 port_name(port));
+
 	if (i915->vbt.ports[port]) {
 		drm_dbg_kms(&i915->drm,
 			    "More than one child device for port %c in VBT, using the first.\n",