All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Chiou, Cooper" <cooper.chiou@intel.com>
Cc: "Nikula, Jani" <jani.nikula@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915: Update HDMI max TMDS data rate definition for VBT
Date: Wed, 10 Apr 2019 13:50:13 +0300	[thread overview]
Message-ID: <20190410105013.GH3888@intel.com> (raw)
In-Reply-To: <69CFE73827009D4C9A62632B1763143E4F55D6A5@PGSMSX109.gar.corp.intel.com>

On Wed, Apr 10, 2019 at 10:08:43AM +0000, Chiou, Cooper wrote:
> Hi Ville,
> 
> 
> 
> From Intel BSpec, this is HDMI max data rate bits field definition as the following, and please find my experiment/log below. And as I knew, all platforms are using Default 000 for max data rate. (No any platform used 2.97/1.65 definition in VBT so far). That’s why I correct HDMI max. data rate definition to be right value in 2.97 & 1.65Gbps. Thanks,
> 
> 
> 
> “HDMI max data rate and level shifter value” defined in BSpec:
> 
> Bits 7 – 5 = HDMI Maximum Data Rate
> 
>             000 = Default (Software should choose the maximum data rate as supported by platform BSpec)
> 
>             001 = 2.97 GT/s
> 
>             010 = 1.65 GT/s
> 
> 
> 
> Bit 4 - 0 = HDMI Level shifter value selection
> 
>             Values differ from platform to platform
> 
> 
> 
> 1. When I set HDMI TMDS = 2.97Gbps in GLK VBT, then i915 intel_bios.c parse_ddi_port() function got “hdmi_max_data_rate=2”.

That would suggest that the tool you use to generate the VBT doesn't
follow the spec. So either the tool is broken or the spec is wrong,
or both. Or we have a weird compiler bug on our hands (this can be
confirmed/ruled out by checking the hexdump of the VBT).

> 
> [cid:image003.jpg@01D4EFC8.6DB4F360]
> 
> DEBUG kernel: [    0.172359] [drm:intel_bios_init] Port B VBT info: DP:0 HDMI:1 DVI:1 EDP:0 CRT:0
> 
> DEBUG kernel: [    0.172360] [drm:intel_bios_init] VBT HDMI level shift for port B: 8
> 
> DEBUG kernel: [    0.172362] [drm:intel_bios_init] [Cooper] bdb_version=212
> 
> DEBUG kernel: [    0.172363] [drm:intel_bios_init] [Cooper] hdmi_max_data_rate=2
> 
> DEBUG kernel: [    0.172364] [drm:intel_bios_init] [Cooper] max_tmds_clock=165000
> 
> DEBUG kernel: [    0.172365] [drm:intel_bios_init] VBT HDMI max TMDS clock for port B: 165000 kHz
> 
> 
> 
> 2. When I set HDMI TMDS = 1,65Gbps in GLK VBT, then i915 intel_bios.c parse_ddi_port() function got “hdmi_max_data_rate=4”.
> 
> 
> 
> DEBUG kernel: [    0.172363] [drm:intel_bios_init] Port B VBT info: DP:0 HDMI:1 DVI:1 EDP:0 CRT:0
> 
> DEBUG kernel: [    0.172364] [drm:intel_bios_init] VBT HDMI level shift for port B: 8
> 
> DEBUG kernel: [    0.172365] [drm:intel_bios_init] [Cooper] bdb_version=212
> 
> DEBUG kernel: [    0.172366] [drm:intel_bios_init] [Cooper] hdmi_max_data_rate=4
> 
> WARNING kernel: [    0.172367] ------------[ cut here ]------------
> 
> WARNING kernel: [    0.172369] Missing switch case (4) in parse_ddi_port
> 
> 
> 
> Best Regards,
> 
> Cooper
> 
> +886-2-6622-1166
> 
> 
> 
> 
> 
> -----Original Message-----
> From: Ville Syrjälä [mailto:ville.syrjala@linux.intel.com]
> Sent: Tuesday, April 9, 2019 23:57 PM
> To: Chiou, Cooper <cooper.chiou@intel.com>
> Cc: intel-gfx@lists.freedesktop.org; Nikula, Jani <jani.nikula@intel.com>; Chiou@freedesktop.org
> Subject: Re: [Intel-gfx] [PATCH] drm/i915: Update HDMI max TMDS data rate definition for VBT
> 
> 
> 
> On Tue, Apr 09, 2019 at 03:46:20PM +0000, Chiou, Cooper wrote:
> 
> > Hi Ville,
> 
> >
> 
> > The bits is 5-7 means it’s 001x xxxx for 2.97Gbps, and 010x xxxx for 1.65Gbps.
> 
> > So correct value should be 2 not 1 for HDMI_MAX_DATA_RATE_297.
> 
> 
> 
> No. The bitfield is defined as something:3.
> 
> 
> 
> > And HDMI_MAX_DATA_RATE_165 is 4 not 2.
> 
> >
> 
> > I checked kernel i915 log and modified VBT to limit HDMI 1.4 from HDMI
> 
> > 2.0 then found this error. And I run CrOS on GLK with changed VBT to
> 
> > validate it. Thanks,
> 
> >
> 
> > Best Regards,
> 
> > Cooper
> 
> >
> 
> > On Apr 9, 2019, at 8:45 PM, Ville Syrjälä <ville.syrjala@linux.intel.com<mailto:ville.syrjala@linux.intel.com<mailto:ville.syrjala@linux.intel.com%3cmailto:ville.syrjala@linux.intel.com>>> wrote:
> 
> >
> 
> > On Tue, Apr 09, 2019 at 06:07:08PM +0800, Chiou, Cooper wrote:
> 
> > VBT version 212 defined HDMI max. bit-rate 2.97Gbps is 0x02 and
> 
> > 1.65Gbps is 0x04, so changed
> 
> > HDMI_MAX_DATA_RATE_297/HDMI_MAX_DATA_RATE_165 to map correct values
> 
> >
> 
> > Eh what? Did someone just change the interpretation of these bits?
> 
> >
> 
> > Per VBT BSpec definition in HDMI max. data rate, Bits7-5 is HDMI max.
> 
> > data rate 000=Default, 001=2.97Gbps, 010=1.65Gbps,
> 
> >
> 
> > Here you're quoting the values we already use...
> 
> >
> 
> > so HDMI_MAX_DATA_RATE_297
> 
> > should be 2 and HDMI_MAX_DATA_RATE_165 should be 4
> 
> >
> 
> > ...but here you're using different values again? Which way is it?
> 
> >
> 
> >
> 
> > TEST: Validated PASS on GLK RVP platform
> 
> >
> 
> > Cc: Jani Nikula <jani.nikula@intel.com<mailto:jani.nikula@intel.com<mailto:jani.nikula@intel.com%3cmailto:jani.nikula@intel.com>>>
> 
> > Signed-off-by: Chiou, Cooper
> 
> > <cooper.chiou@intel.com<mailto:cooper.chiou@intel.com<mailto:cooper.chiou@intel.com%3cmailto:cooper.chiou@intel.com>>>
> 
> > ---
> 
> > drivers/gpu/drm/i915/intel_vbt_defs.h | 4 ++--
> 
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> >
> 
> > diff --git a/drivers/gpu/drm/i915/intel_vbt_defs.h
> 
> > b/drivers/gpu/drm/i915/intel_vbt_defs.h
> 
> > index bf3662ad5fed..e2b8d042912b 100644
> 
> > --- a/drivers/gpu/drm/i915/intel_vbt_defs.h
> 
> > +++ b/drivers/gpu/drm/i915/intel_vbt_defs.h
> 
> > @@ -307,8 +307,8 @@ struct bdb_general_features {
> 
> > #define DVO_PORT_MIPID        24                /* 171 */
> 
> >
> 
> > #define HDMI_MAX_DATA_RATE_PLATFORM    0            /* 204 */
> 
> > -#define HDMI_MAX_DATA_RATE_297        1            /* 204 */
> 
> > -#define HDMI_MAX_DATA_RATE_165        2            /* 204 */
> 
> > +#define HDMI_MAX_DATA_RATE_297        2            /* 212 */
> 
> > +#define HDMI_MAX_DATA_RATE_165        4            /* 212 */
> 
> >
> 
> > #define LEGACY_CHILD_DEVICE_CONFIG_SIZE        33
> 
> >
> 
> > --
> 
> > 2.7.4
> 
> >
> 
> > _______________________________________________
> 
> > Intel-gfx mailing list
> 
> > Intel-gfx@lists.freedesktop.org<mailto:Intel-gfx@lists.freedesktop.org<mailto:Intel-gfx@lists.freedesktop.org%3cmailto:Intel-gfx@lists.freedesktop.org>
> 
> > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> >
> 
> > --
> 
> > Ville Syrjälä
> 
> > Intel
> 
> 
> 
> --
> 
> Ville Syrjälä
> 
> Intel



-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-04-10 10:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-09 10:07 [PATCH] drm/i915: Update HDMI max TMDS data rate definition for VBT Chiou, Cooper
2019-04-09 11:19 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-04-09 12:44 ` [PATCH] " Ville Syrjälä
2019-04-09 15:46   ` Chiou, Cooper
2019-04-09 15:57     ` Ville Syrjälä
2019-04-10 10:08       ` Chiou, Cooper
2019-04-10 10:50         ` Ville Syrjälä [this message]
2019-04-10 11:32           ` Chiou, Cooper
2019-04-10 12:23             ` Ville Syrjälä
2019-04-11  3:08               ` Chiou, Cooper
2019-04-09 15:34 ` ✓ Fi.CI.IGT: success for " Patchwork
2019-04-09 17:10 ` ✗ Fi.CI.BAT: failure for drm/i915: Update HDMI max TMDS data rate definition for VBT (rev2) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190410105013.GH3888@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=cooper.chiou@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.