All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915/bios: Define block 46 chromaticity coordinates properly
@ 2024-06-05 13:47 Ville Syrjala
  2024-06-05 13:47 ` [PATCH 2/2] drm/i915/bios: Define the "luminance and gamma" sub-struct of block 46 Ville Syrjala
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ville Syrjala @ 2024-06-05 13:47 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

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.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_vbt_defs.h | 27 ++++++++++++-------
 1 file changed, 17 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
index 862c5923b83d..da8694771f69 100644
--- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
+++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
@@ -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 {
-- 
2.44.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-06-06 12:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-05 13:47 [PATCH 1/2] drm/i915/bios: Define block 46 chromaticity coordinates properly Ville Syrjala
2024-06-05 13:47 ` [PATCH 2/2] drm/i915/bios: Define the "luminance and gamma" sub-struct of block 46 Ville Syrjala
2024-06-06 10:56   ` Jani Nikula
2024-06-05 15:13 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915/bios: Define block 46 chromaticity coordinates properly Patchwork
2024-06-06 12:38   ` Ville Syrjälä
2024-06-06 10:55 ` [PATCH 1/2] " Jani Nikula

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.