Commit 2e8b8073 authored by Ville Syrjälä's avatar Ville Syrjälä
Browse files

drm/i915/bios: Define VBT block 5 (Generic Mode Table)



Define the contents of VBT block 5 (Generic Mode Table).

Details were mostly gleaned from some VBIOS sources.

There are apparently two variants of the block: ALM only
vs. MGM, defined here as bdb_generic_mode_table_alm
and bdb_generic_mode_table_mgm. And those are the only two
platforms where I've seen this block.

Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-12-ville.syrjala@linux.intel.com


Acked-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 22794e6c
Loading
Loading
Loading
Loading
+54 −0
Original line number Diff line number Diff line
@@ -580,6 +580,60 @@ struct bdb_mode_support_list {
	u16 mode_list_length;
} __packed;

/*
 * Block 5 - Generic Mode Table
 */

struct generic_mode_table {
	u16 x_res;
	u16 y_res;
	u8 color_depths;
	u8 refresh_rate[3];
	u8 reserved;
	u8 text_cols;
	u8 text_rows;
	u8 font_height;
	u16 page_size;
	u8 misc;
} __packed;

struct generic_mode_timings {
	u32 dotclock_khz;
	u16 hdisplay;
	u16 htotal;
	u16 hblank_start;
	u16 hblank_end;
	u16 hsync_start;
	u16 hsync_end;
	u16 vdisplay;
	u16 vtotal;
	u16 vblank_start;
	u16 vblank_end;
	u16 vsync_start;
	u16 vsync_end;
} __packed;

struct generic_mode_timings_alm {
	struct generic_mode_timings timings;
	u8 wm_8bpp;
	u8 burst_8bpp;
	u8 wm_16bpp;
	u8 burst_16bpp;
	u8 wm_32bpp;
	u8 burst_32bpp;
} __packed;

struct bdb_generic_mode_table_alm {
	struct generic_mode_table table;
	struct generic_mode_timings_alm timings[3];
} __packed;

struct bdb_generic_mode_table_mgm {
	u16 mode_flag;
	struct generic_mode_table table;
	struct generic_mode_timings timings[3];
} __packed;

/*
 * Block 9 - SRD Feature Block
 */