[Intel-gfx] [PATCH] drm/i915: Update HDMI max TMDS data rate definition for VBT
Chiou, Cooper
cooper.chiou at intel.com
Wed Apr 10 11:32:47 UTC 2019
Hi Ville,
From BSpec define, HDMI max data rate is “Bits 5-7” not Bits 4-7. And the following image is what I captured by latest VBT BMP v2.67 tool to load GLK VBT bin file and changed HDMI_MAX_TMDS_Bit_Rate field in 5.94/2.97/1.65Gbps different bit-rate.
A. 5.94Gbps(HDMI_MAX_DATA_RATE_PLATFORM) = 0 is correct, the “HDMI max data rate and level shift” value is 0x08 in following highlight block.
B. 2.97Gbps (HDMI_MAX_DATA_RATE_297) was 1 is wrong, it should be 001x xxxx. In this case, “HDMI max data rate and level shift value” is “0x28” in vbt.bin, so intel_vbt_defs.h HDMI_MAX_DATA_RATE_297=1 is wrong, so it should be 2
C. 1.65Gbps (HDMI_MAX_DATA_RATE_165) was 2 is wrong, it should be 010x xxxx. In this case, “HDMI max data rate and level shift value” is “0x48” in vbt.bin, so intel_vbt_defs.h HDMI_MAX_DATA_RATE_297=2 is wrong, so it should be 4
BSpec:
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
intel_vbt_defs.h
#define HDMI_MAX_DATA_RATE_PLATFORM 0 /* 204 */
#define HDMI_MAX_DATA_RATE_297 1 /* 204 */
#define HDMI_MAX_DATA_RATE_165 2 /* 204 */
Should change to
#define HDMI_MAX_DATA_RATE_PLATFORM 0 /* 204 */
#define HDMI_MAX_DATA_RATE_297 2 /* 204 */
#define HDMI_MAX_DATA_RATE_165 4 /* 204 */
[cid:image002.jpg at 01D4EFD4.2BA8E060]
Best Regards,
Cooper
+886-2-6622-1166
-----Original Message-----
From: Ville Syrjälä [mailto:ville.syrjala at linux.intel.com]
Sent: Wednesday, April 10, 2019 18:50 PM
To: Chiou, Cooper <cooper.chiou at intel.com>
Cc: intel-gfx at lists.freedesktop.org; Nikula, Jani <jani.nikula at intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Update HDMI max TMDS data rate definition for VBT
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 at 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 at linux.intel.com]
> Sent: Tuesday, April 9, 2019 23:57 PM
> To: Chiou, Cooper <cooper.chiou at intel.com<mailto:cooper.chiou at intel.com>>
> Cc: intel-gfx at lists.freedesktop.org<mailto:intel-gfx at lists.freedesktop.org>; Nikula, Jani
> <jani.nikula at intel.com<mailto:jani.nikula at intel.com>>; Chiou at freedesktop.org<mailto:Chiou at 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 at linux.intel.com<mailto:ville.syrjala at linux.intel.com<mailto:ville.syrjala at linux.intel.com%3cmailto:ville.syrjala at linux.intel.com<mailto:ville.syrjala at linux.intel.com%3cmailto:ville.syrjala at linux.intel.com%3cmailto:ville.syrjala at linux.intel.com%3cmailto:ville.syrjala at 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 at intel.com<mailto:jani.nikula at intel.com<mailto:jani.niku
> > la at intel.com%3cmailto:jani.nikula at intel.com<mailto:la at intel.com%3cmailto:jani.nikula at intel.com>>>>
>
> > Signed-off-by: Chiou, Cooper
>
> > <cooper.chiou at intel.com<mailto:cooper.chiou at intel.com<mailto:cooper.
> > chiou at intel.com%3cmailto:cooper.chiou at intel.com<mailto:chiou at intel.com%3cmailto:cooper.chiou at 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 at lists.freedesktop.org<mailto:Intel-gfx at lists.freedesktop.o<mailto:Intel-gfx at lists.freedesktop.org%3cmailto:Intel-gfx at lists.freedesktop.o>
> > rg<mailto:Intel-gfx at lists.freedesktop.org%3cmailto:Intel-gfx at lists.f
> > reedesktop.org>
>
> > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
> >
>
> > --
>
> > Ville Syrjälä
>
> > Intel
>
>
>
> --
>
> Ville Syrjälä
>
> Intel
--
Ville Syrjälä
Intel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20190410/3c178989/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 118537 bytes
Desc: image002.jpg
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20190410/3c178989/attachment-0001.jpg>
More information about the Intel-gfx
mailing list