On Tue, 19 May 2026, Kandpal, Suraj wrote:
-----Original Message-----
From: Grzelak, Michal <[email protected]>
Sent: Thursday, May 7, 2026 7:01 AM
To: [email protected]; [email protected]
Cc: Nikula, Jani <[email protected]>; Kandpal, Suraj
<[email protected]>; Grzelak, Michal <[email protected]>
Subject: [PATCH v3 04/31] drm/i915/bios: store VBT #57's metadata in
intel_vbt_data
Store number of rows and number of tables in intel_vbt_data when search for
the VBT #57 succeeded.
Display version determines number of rows present in each table. pre-MTL
platforms should have 10 rows while MTL+ should have 16 rows.
Signed-off-by: Michał Grzelak <[email protected]>
---
drivers/gpu/drm/i915/display/intel_bios.c | 7 +++++++
drivers/gpu/drm/i915/display/intel_display_core.h | 3 +++
2 files changed, 10 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_bios.c
b/drivers/gpu/drm/i915/display/intel_bios.c
index 3f9e4d31c7375..d64668c1022a7 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -2200,6 +2200,9 @@ parse_vswing_preemph_override(struct
intel_display *display)
return;
drm_dbg_kms(display->drm, "VS/PE-O parsing not yet supported\n");
+
+ display->vbt.num_tables = block->num_tables;
+ display->vbt.num_rows = DISPLAY_VER(display) >= 14 ? 16 : 10;
Where did you get these numbers from. Bspec reference maybe.
Bspec here is out of sync, eg. 32063. But 74227 implicitly assumes
16 entries. So I got this from the other driver.
BR,
Michał
I also see you harcoding this in the next patches maybe you need a helper that
can be used.
Also DG2 also uses 16 rows from what I can see
}
static u8 translate_iboost(struct intel_display *display, u8 val) @@ -2997,6
+3000,10 @@ init_vbt_defaults(struct intel_display *display)
!HAS_PCH_SPLIT(display));
drm_dbg_kms(display->drm, "Set default to SSC at %d kHz\n",
display->vbt.lvds_ssc_freq);
+
+ /* Vswing / Preemphasis Override */
+ display->vbt.num_tables = 0;
+ display->vbt.num_rows = 0;
Why expilicitly make the 0 now vbt gets initialized with everything 0'd out. As
intel_display is kazalloc'd
}
/* Common defaults which may be overridden by VBT. */ diff --git
a/drivers/gpu/drm/i915/display/intel_display_core.h
b/drivers/gpu/drm/i915/display/intel_display_core.h
index 76745ce6a716e..36ea4873deeb0 100644
--- a/drivers/gpu/drm/i915/display/intel_display_core.h
+++ b/drivers/gpu/drm/i915/display/intel_display_core.h
@@ -242,6 +242,9 @@ struct intel_vbt_data {
struct list_head display_devices;
struct list_head bdb_blocks;
+ int num_tables;
+ int num_rows;
Lets keep this u8 here too for consistency
Also maybe num_vswing_tables,
num_vswing_rows_per_table.
Regards,
Suraj Kandpal
+
struct sdvo_device_mapping {
u8 initialized;
u8 dvo_port;
--
2.45.2