From 55c6b98676ed667f8900d46257b96eff47abef55 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ville=20Syrj=C3=A4l=C3=A4?= Date: Fri, 3 May 2024 15:24:30 +0300 Subject: [PATCH] drm/i915/bios: Define ALM only VBT block 9 contents MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit For some reason ALM VBT has two dot clock override tables. One as the normal block 15 and a second one as block 9. The table in block 9 has no row_size/num_rows information. On my Fujitsu Lifebook S6010 only the block 9 table has actual data in it. Block 15 is present but all zeroes. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-17-ville.syrjala@linux.intel.com Acked-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 31 ++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index 75c702c9890b..0a3a7e3d1d99 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -147,6 +147,7 @@ enum bdb_block_id { BDB_EXT_MMIO_REGS = 6, /* VBIOS only */ BDB_SWF_IO = 7, /* VBIOS only */ BDB_SWF_MMIO = 8, /* VBIOS only */ + BDB_DOT_CLOCK_OVERRIDE_ALM = 9, BDB_PSR = 9, /* 165+ */ BDB_MODE_REMOVAL_TABLE = 10, BDB_CHILD_DEVICE_TABLE = 11, @@ -650,6 +651,25 @@ struct bdb_reg_table { /* u16 table_end_marker; */ } __packed; +/* + * Block 9 - Undocumented table (ALM only) + */ + +struct dot_clock_override_entry_gen2 { + u32 dotclock; + u8 n; + u8 m1; + u8 m2; + u8 p1:5; + u8 p1_div_by_2:1; + u8 reserved:1; + u8 p2_div_by_4:1; +} __packed; + +struct bdb_dot_clock_override_alm { + struct dot_clock_override_entry_gen2 t[0]; +} __packed; + /* * Block 9 - SRD Feature Block */ @@ -801,17 +821,6 @@ struct bdb_driver_persistence { * Block 15 - Dot Clock Override Table */ -struct dot_clock_override_entry_gen2 { - u32 dotclock; - u8 n; - u8 m1; - u8 m2; - u8 p1:5; - u8 p1_div_by_2:1; - u8 reserved:1; - u8 p2_div_by_4:1; -} __packed; - struct dot_clock_override_entry_gen3 { u32 dotclock; u8 n; -- 2.50.1