Skip to contentSkip to conversation

drm/i915/bios: Define block 46 chromaticity coordinates properly

PATCH In review Ville Syrjala 3 participants 6 messages Jun 5, 2024 – Jun 6, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/i915/bios: Define block 46 chromaticity coordinates properly

From: Ville Syrjälä <[email protected]>

The VBT spec does a very poor job of defining how the chromaticity coordinates in block 46 are laid out. After double checking the Windows implementation it turns out these more or less match the EDID definition, where the 10bit values are split into 2bit + 8bit chunks. Adjust our struct definition to reflect that.

---
 drivers/gpu/drm/i915/display/intel_vbt_defs.h | 27 ++++++++++++-------
 1 file changed, 17 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/display/intel_vbt_defs.h +17 -10
index 862c5923b83d..da8694771f69 100644
@@ -1376,16 +1376,23 @@ struct chromaticity {
 	u8 chromaticity_from_edid_base_block:1;
 	u8 rsvd:6;
 
-	u8 red_green;
-	u8 blue_white;
-	u8 red_x;
-	u8 red_y;
-	u8 green_x;
-	u8 green_y;
-	u8 blue_x;
-	u8 blue_y;
-	u8 white_x;
-	u8 white_y;
+	u8 green_y_lo:2;
+	u8 green_x_lo:2;
+	u8 red_y_lo:2;
+	u8 red_x_lo:2;
+	u8 white_y_lo:2;
+	u8 white_x_lo:2;
+	u8 blue_y_lo:2;
+	u8 blue_x_lo:2;
+
+	u8 red_x_hi;
+	u8 red_y_hi;
+	u8 green_x_hi;
+	u8 green_y_hi;
+	u8 blue_x_hi;
+	u8 blue_y_hi;
+	u8 white_x_hi;
+	u8 white_y_hi;
 } __packed;
 
 struct bdb_chromaticity {
Signature · 1 line
2.44.1
#1 lore raw

PATCH 2/2 drm/i915/bios: Define the "luminance and gamma" sub-struct of block 46

From: Ville Syrjälä <[email protected]>

Since BDB version 211 block 46 has included more luminance and gamma related information. Define it fully. The data is semi-based on DisplayID v2.0 apparently.

---
 drivers/gpu/drm/i915/display/intel_vbt_defs.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)
drivers/gpu/drm/i915/display/intel_vbt_defs.h +12 -0
index da8694771f69..1af8407e2081 100644
@@ -1395,8 +1395,20 @@ struct chromaticity {
 	u8 white_y_hi;
 } __packed;
 
+struct luminance_and_gamma {
+	u8 luminance_enable:1;						/* 211+ */
+	u8 gamma_enable:1;						/* 211+ */
+	u8 rsvd:6;
+
+	u16 min_luminance;						/* 211+ */
+	u16 max_luminance;						/* 211+ */
+	u16 one_percent_max_luminance;					/* 211+ */
+	u8 gamma;							/* 211+ */
+} __packed;
+
 struct bdb_chromaticity {
 	struct chromaticity chromaticity[16];
+	struct luminance_and_gamma luminance_and_gamma[16];		/* 211+ */
 } __packed;
 
 /*
Signature · 1 line
2.44.1
maintainer Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] drm/i915/bios: Define the "luminance and gamma" sub-struct of block 46

Quoted 7 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

Since BDB version 211 block 46 has included more luminance and gamma related information. Define it fully. The data is semi-based on DisplayID v2.0 apparently.

Quoted 29 lines
---
 drivers/gpu/drm/i915/display/intel_vbt_defs.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)
drivers/gpu/drm/i915/display/intel_vbt_defs.h +12 -0
index da8694771f69..1af8407e2081 100644
@@ -1395,8 +1395,20 @@ struct chromaticity {
 	u8 white_y_hi;
 } __packed;
 
+struct luminance_and_gamma {
+	u8 luminance_enable:1;						/* 211+ */
+	u8 gamma_enable:1;						/* 211+ */
+	u8 rsvd:6;
+
+	u16 min_luminance;						/* 211+ */
+	u16 max_luminance;						/* 211+ */
+	u16 one_percent_max_luminance;					/* 211+ */
+	u8 gamma;							/* 211+ */
+} __packed;
+
 struct bdb_chromaticity {
 	struct chromaticity chromaticity[16];
+	struct luminance_and_gamma luminance_and_gamma[16];		/* 211+ */
 } __packed;
 
 /*
Signature · 1 line
Jani Nikula, Intel
#3 lore raw

✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915/bios: Define block 46 chromaticity coordinates properly

In reply to Ville Syrjala
== Series Details ==

== Series Details ==

Series: series starting with [1/2] drm/i915/bios: Define block 46 chromaticity coordinates properly
URL : https://patchwork.freedesktop.org/series/134505/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14881 -> Patchwork_134505v1
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_134505v1 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes
introduced in Patchwork_134505v1, please notify your bug team ([email protected]) to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134505v1/index.html

Participating hosts (38 -> 34)
------------------------------

Additional (2): fi-kbl-8809g fi-bsw-n3050
Missing (6): bat-mtlp-9 bat-arls-3 fi-snb-2520m bat-dg2-11 bat-jsl-1 bat-mtlp-6

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_134505v1:

### IGT changes ###

#### Possible regressions ####

* igt@i915_selftest@live@active:
- fi-glk-j4005: [PASS][1] -> [DMESG-FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14881/fi-glk-j4005/igt@i915_selftest@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134505v1/fi-glk-j4005/igt@i915_selftest@[email protected]

Known issues
------------

Here are the changes found in Patchwork_134505v1 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_huc_copy@huc-copy:
- fi-kbl-8809g: NOTRUN -> [SKIP][3] ([i915#2190])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134505v1/fi-kbl-8809g/igt@[email protected]

* igt@gem_lmem_swapping@basic:
- fi-kbl-8809g: NOTRUN -> [SKIP][4] ([i915#4613]) +3 other tests skip
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134505v1/fi-kbl-8809g/igt@[email protected]

* igt@gem_lmem_swapping@random-engines:
- fi-bsw-n3050: NOTRUN -> [SKIP][5] +19 other tests skip
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134505v1/fi-bsw-n3050/igt@[email protected]

* igt@kms_force_connector_basic@force-load-detect:
- fi-kbl-8809g: NOTRUN -> [SKIP][6] +30 other tests skip
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134505v1/fi-kbl-8809g/igt@[email protected]

[i915#2190]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/2190
[i915#4613]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4613

Build changes
-------------

* Linux: CI_DRM_14881 -> Patchwork_134505v1

CI-20190529: 20190529
CI_DRM_14881: a494545483635d3d93d19e8f483f61e7d4198383 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7878: eecd5683bd98cee3fc6bd3f26a1f053c897f6bdf @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_134505v1: a494545483635d3d93d19e8f483f61e7d4198383 @ git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134505v1/index.html

#4 lore raw

Re: ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915/bios: Define block 46 chromaticity coordinates properly

Quoted 36 lines · Patchwork

== Series Details ==

Series: series starting with [1/2] drm/i915/bios: Define block 46 chromaticity coordinates properly
URL : https://patchwork.freedesktop.org/series/134505/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14881 -> Patchwork_134505v1
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_134505v1 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes
introduced in Patchwork_134505v1, please notify your bug team ([email protected]) to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134505v1/index.html

Participating hosts (38 -> 34)
------------------------------

Additional (2): fi-kbl-8809g fi-bsw-n3050
Missing (6): bat-mtlp-9 bat-arls-3 fi-snb-2520m bat-dg2-11 bat-jsl-1 bat-mtlp-6

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_134505v1:

Quoted 8 lines

### IGT changes ###

#### Possible regressions ####

* igt@i915_selftest@live@active:
- fi-glk-j4005: [PASS][1] -> [DMESG-FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14881/fi-glk-j4005/igt@i915_selftest@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134505v1/fi-glk-j4005/igt@i915_selftest@[email protected]

(i915_selftest:5675) igt_kmod-WARNING: i915: Running i915_active_live_selftests/live_active_wait (i915_selftest:5675) igt_kmod-WARNING: i915 0000:00:02.0: [drm] *ERROR* live_active_wait i915_active not retired after waiting! (i915_selftest:5675) igt_kmod-WARNING: i915 0000:00:02.0: [drm] *ERROR* live_active_wait active __live_active [i915]:__live_retire [i915] (i915_selftest:5675) igt_kmod-WARNING: i915 0000:00:02.0: [drm] *ERROR* live_active_wait \x09count: 0 (i915_selftest:5675) igt_kmod-WARNING: i915 0000:00:02.0: [drm] *ERROR* live_active_wait \x09preallocated barriers? no (i915_selftest:5675) igt_kmod-WARNING: i915/i915_active_live_selftests: live_active_wait failed with error -22

Looks like:
https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11170

Signature · 2 lines
Ville Syrjälä
Intel
maintainer Reviewed-by on v1 1/2
#5 lore raw
In reply to Ville Syrjala
Quoted 9 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

The VBT spec does a very poor job of defining how the chromaticity coordinates in block 46 are laid out. After double checking the Windows implementation it turns out these more or less match the EDID definition, where the 10bit values are split into 2bit + 8bit chunks. Adjust our struct definition to reflect that.

Quoted 42 lines
---
 drivers/gpu/drm/i915/display/intel_vbt_defs.h | 27 ++++++++++++-------
 1 file changed, 17 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/display/intel_vbt_defs.h +17 -10
index 862c5923b83d..da8694771f69 100644
@@ -1376,16 +1376,23 @@ struct chromaticity {
 	u8 chromaticity_from_edid_base_block:1;
 	u8 rsvd:6;
 
-	u8 red_green;
-	u8 blue_white;
-	u8 red_x;
-	u8 red_y;
-	u8 green_x;
-	u8 green_y;
-	u8 blue_x;
-	u8 blue_y;
-	u8 white_x;
-	u8 white_y;
+	u8 green_y_lo:2;
+	u8 green_x_lo:2;
+	u8 red_y_lo:2;
+	u8 red_x_lo:2;
+	u8 white_y_lo:2;
+	u8 white_x_lo:2;
+	u8 blue_y_lo:2;
+	u8 blue_x_lo:2;
+
+	u8 red_x_hi;
+	u8 red_y_hi;
+	u8 green_x_hi;
+	u8 green_y_hi;
+	u8 blue_x_hi;
+	u8 blue_y_hi;
+	u8 white_x_hi;
+	u8 white_y_hi;
 } __packed;
 
 struct bdb_chromaticity {
Signature · 1 line
Jani Nikula, Intel