summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/display/intel_vbt_defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_vbt_defs.h')
-rw-r--r--drivers/gpu/drm/i915/display/intel_vbt_defs.h819
1 files changed, 702 insertions, 117 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
index a9f44abfc9fc..e9b809568cd4 100644
--- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
+++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
@@ -39,6 +39,50 @@
#include "intel_bios.h"
+/* EDID derived structures */
+struct bdb_edid_pnp_id {
+ u16 mfg_name;
+ u16 product_code;
+ u32 serial;
+ u8 mfg_week;
+ u8 mfg_year;
+} __packed;
+
+struct bdb_edid_product_name {
+ char name[13];
+} __packed;
+
+struct bdb_edid_dtd {
+ u16 clock; /**< In 10khz */
+ u8 hactive_lo;
+ u8 hblank_lo;
+ u8 hblank_hi:4;
+ u8 hactive_hi:4;
+ u8 vactive_lo;
+ u8 vblank_lo;
+ u8 vblank_hi:4;
+ u8 vactive_hi:4;
+ u8 hsync_off_lo;
+ u8 hsync_pulse_width_lo;
+ u8 vsync_pulse_width_lo:4;
+ u8 vsync_off_lo:4;
+ u8 vsync_pulse_width_hi:2;
+ u8 vsync_off_hi:2;
+ u8 hsync_pulse_width_hi:2;
+ u8 hsync_off_hi:2;
+ u8 himage_lo;
+ u8 vimage_lo;
+ u8 vimage_hi:4;
+ u8 himage_hi:4;
+ u8 h_border;
+ u8 v_border;
+ u8 rsvd1:3;
+ u8 digital:2;
+ u8 vsync_positive:1;
+ u8 hsync_positive:1;
+ u8 non_interlaced:1;
+} __packed;
+
/**
* struct vbt_header - VBT Header structure
* @signature: VBT signature, always starts with "$VBT"
@@ -97,40 +141,56 @@ struct bdb_header {
enum bdb_block_id {
BDB_GENERAL_FEATURES = 1,
BDB_GENERAL_DEFINITIONS = 2,
- BDB_OLD_TOGGLE_LIST = 3,
+ BDB_DISPLAY_TOGGLE = 3,
BDB_MODE_SUPPORT_LIST = 4,
BDB_GENERIC_MODE_TABLE = 5,
- BDB_EXT_MMIO_REGS = 6,
- BDB_SWF_IO = 7,
- BDB_SWF_MMIO = 8,
- BDB_PSR = 9,
+ 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,
BDB_DRIVER_FEATURES = 12,
BDB_DRIVER_PERSISTENCE = 13,
- BDB_EXT_TABLE_PTRS = 14,
+ BDB_EXT_TABLE_PTRS = 14, /* VBIOS only */
BDB_DOT_CLOCK_OVERRIDE = 15,
- BDB_DISPLAY_SELECT = 16,
+ BDB_DISPLAY_SELECT_OLD = 16,
+ BDB_SV_TEST_FUNCTIONS = 17,
BDB_DRIVER_ROTATION = 18,
- BDB_DISPLAY_REMOVE = 19,
+ BDB_DISPLAY_REMOVE_OLD = 19,
BDB_OEM_CUSTOM = 20,
BDB_EFP_LIST = 21, /* workarounds for VGA hsync/vsync */
BDB_SDVO_LVDS_OPTIONS = 22,
- BDB_SDVO_PANEL_DTDS = 23,
- BDB_SDVO_LVDS_PNP_IDS = 24,
- BDB_SDVO_LVDS_POWER_SEQ = 25,
+ BDB_SDVO_LVDS_DTD = 23,
+ BDB_SDVO_LVDS_PNP_ID = 24,
+ BDB_SDVO_LVDS_PPS = 25,
BDB_TV_OPTIONS = 26,
BDB_EDP = 27,
- BDB_LVDS_OPTIONS = 40,
- BDB_LVDS_LFP_DATA_PTRS = 41,
- BDB_LVDS_LFP_DATA = 42,
- BDB_LVDS_BACKLIGHT = 43,
+ BDB_EFP_DTD = 28, /* 161+ */
+ BDB_DISPLAY_SELECT_IVB = 29, /* 164+ */
+ BDB_DISPLAY_REMOVE_IVB = 30, /* 164+ */
+ BDB_DISPLAY_SELECT_HSW = 31, /* 166+ */
+ BDB_DISPLAY_REMOVE_HSW = 32, /* 166+ */
+ BDB_LFP_OPTIONS = 40,
+ BDB_LFP_DATA_PTRS = 41,
+ BDB_LFP_DATA = 42,
+ BDB_LFP_BACKLIGHT = 43,
BDB_LFP_POWER = 44,
- BDB_MIPI_CONFIG = 52,
- BDB_MIPI_SEQUENCE = 53,
- BDB_COMPRESSION_PARAMETERS = 56,
- BDB_GENERIC_DTD = 58,
- BDB_SKIP = 254, /* VBIOS private block, ignore */
+ BDB_EDP_BFI = 45, /* 160+ */
+ BDB_CHROMATICITY = 46, /* 169+ */
+ BDB_MIPI = 50, /* 170-172 */
+ BDB_FIXED_SET_MODE = 51, /* 172+ */
+ BDB_MIPI_CONFIG = 52, /* 175+ */
+ BDB_MIPI_SEQUENCE = 53, /* 177+ */
+ BDB_RGB_PALETTE = 54, /* 180+ */
+ BDB_COMPRESSION_PARAMETERS_OLD = 55, /* 198-212 */
+ BDB_COMPRESSION_PARAMETERS = 56, /* 213+ */
+ BDB_VSWING_PREEMPH = 57, /* 218+ */
+ BDB_GENERIC_DTD = 58, /* 229+ */
+ BDB_INT15_HOOK = 252, /* VBIOS only */
+ BDB_PRD_TABLE = 253,
+ BDB_SKIP = 254, /* VBIOS only */
};
/*
@@ -198,10 +258,11 @@ struct bdb_general_features {
/* Device handle */
#define DEVICE_HANDLE_CRT 0x0001
+#define DEVICE_HANDLE_TV 0x0002 /* ???-214 */
#define DEVICE_HANDLE_EFP1 0x0004
#define DEVICE_HANDLE_EFP2 0x0040
#define DEVICE_HANDLE_EFP3 0x0020
-#define DEVICE_HANDLE_EFP4 0x0010 /* 194+ */
+#define DEVICE_HANDLE_EFP4 0x0010
#define DEVICE_HANDLE_EFP5 0x0002 /* 215+ */
#define DEVICE_HANDLE_EFP6 0x0001 /* 217+ */
#define DEVICE_HANDLE_EFP7 0x0100 /* 217+ */
@@ -432,7 +493,7 @@ struct child_device_config {
u16 addin_offset;
u8 dvo_port; /* See DEVICE_PORT_* and DVO_PORT_* above */
u8 i2c_pin;
- u8 slave_addr;
+ u8 target_addr;
u8 ddc_pin;
u16 edid_ptr;
u8 dvo_cfg; /* See DEVICE_CFG_* above */
@@ -441,7 +502,7 @@ struct child_device_config {
struct {
u8 dvo2_port;
u8 i2c2_pin;
- u8 slave2_addr;
+ u8 target2_addr;
u8 ddc2_pin;
} __packed;
struct {
@@ -485,6 +546,7 @@ struct child_device_config {
u8 hdmi_iboost_level:4; /* 196+ */
u8 dp_max_link_rate:3; /* 216+ */
u8 dp_max_link_rate_reserved:5; /* 216+ */
+ u8 efp_index; /* 256+ */
} __packed;
struct bdb_general_definitions {
@@ -516,6 +578,114 @@ struct bdb_general_definitions {
} __packed;
/*
+ * Block 3 - Display Toggle Option Block
+ */
+
+struct bdb_display_toggle {
+ u8 feature_bits;
+ u16 num_entries; /* ALM only */
+ u16 list[]; /* ALM only */
+} __packed;
+
+/*
+ * Block 4 - Mode Support List
+ */
+
+struct bdb_mode_support_list {
+ u8 intel_mode_number[0];
+ 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 6 - Extended MMIO Register Table, VBIOS only
+ * Block 7 - IO Software Flag Table, VBIOS only
+ * Block 8 - MMIO SWF Register Table, VBIOS only
+ */
+struct bdb_reg_table {
+ u16 table_id;
+ u8 data_access_size;
+ /*
+ * offset,value tuples:
+ * data_access_size==0xce -> u8,u8
+ * data_access_size==0x02 -> u32,u32
+ */
+ /* 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
*/
@@ -543,6 +713,29 @@ struct bdb_psr {
} __packed;
/*
+ * Block 10 - Mode Removal Table
+ */
+
+struct mode_removal_table {
+ u16 x_res;
+ u16 y_res;
+ u8 bpp;
+ u16 refresh_rate;
+ u8 removal_flags;
+ u16 panel_flags;
+} __packed;
+
+struct bdb_mode_removal {
+ u8 row_size; /* 8 or 10 bytes */
+ /*
+ * VBT spec says this is always 20 entries,
+ * but ALM seems to have only 15 entries.
+ */
+ struct mode_removal_table modes[];
+ /* u16 terminator; 0x0000 */
+} __packed;
+
+/*
* Block 12 - Driver Features Data Block
*/
@@ -602,22 +795,155 @@ struct bdb_driver_features {
u8 custom_vbt_version; /* 155+ */
/* Driver Feature Flags */
- u16 rmpm_enabled:1; /* 165+ */
- u16 s2ddt_enabled:1; /* 165+ */
- u16 dpst_enabled:1; /* 165-227 */
- u16 bltclt_enabled:1; /* 165+ */
- u16 adb_enabled:1; /* 165-227 */
- u16 drrs_enabled:1; /* 165-227 */
- u16 grs_enabled:1; /* 165+ */
- u16 gpmt_enabled:1; /* 165+ */
- u16 tbt_enabled:1; /* 165+ */
+ u16 rmpm_enabled:1; /* 159+ */
+ u16 s2ddt_enabled:1; /* 159+ */
+ u16 dpst_enabled:1; /* 159-227 */
+ u16 bltclt_enabled:1; /* 159+ */
+ u16 adb_enabled:1; /* 159-227 */
+ u16 drrs_enabled:1; /* 159-227 */
+ u16 grs_enabled:1; /* 159+ */
+ u16 gpmt_enabled:1; /* 159+ */
+ u16 tbt_enabled:1; /* 159+ */
u16 psr_enabled:1; /* 165-227 */
u16 ips_enabled:1; /* 165+ */
- u16 dpfs_enabled:1; /* 165+ */
+ u16 dfps_enabled:1; /* 165+ */
u16 dmrrs_enabled:1; /* 174-227 */
u16 adt_enabled:1; /* ???-228 */
u16 hpd_wake:1; /* 201-240 */
- u16 pc_feature_valid:1;
+ u16 pc_feature_valid:1; /* 159+ */
+} __packed;
+
+/*
+ * Block 13 - Driver Persistent Algorithm
+ */
+
+struct bdb_driver_persistence {
+ u16 hotkey_persistent_algorithm:1;
+ u16 lid_switch_persistent_algorithm:1;
+ u16 power_management_persistent_algorithm:1;
+ u16 hotkey_persistent_on_mds_twin:1;
+ u16 hotkey_persistent_on_refresh_rate:1;
+ u16 hotkey_persistent_on_restore_pipe:1;
+ u16 hotkey_persistent_on_mode:1;
+ u16 edid_persistent_on_mode:1;
+ u16 dvo_hotplug_persistent_on_mode:1;
+ u16 docking_persistent_algorithm:1;
+ u16 rsvd:6;
+ u8 persistent_max_config;
+} __packed;
+
+/*
+ * Block 15 - Dot Clock Override Table
+ */
+
+struct dot_clock_override_entry_gen3 {
+ u32 dotclock;
+ u8 n;
+ u8 m1;
+ u8 m2;
+ u8 p1;
+ u8 p2;
+} __packed;
+
+struct bdb_dot_clock_override {
+ u8 row_size; /* 8 == gen2, 9 == gen3+ */
+ u8 num_rows;
+ struct dot_clock_override_entry_gen3 table[]; /* or _gen2 */
+} __packed;
+
+/*
+ * Block 16 - Toggle List Block (pre-HSW)
+ */
+
+struct toggle_list_entry_old {
+ u8 display_select_pipe_a;
+ u8 display_select_pipe_b;
+ u8 caps;
+} __packed;
+
+struct toggle_list_table_old {
+ u16 num_entries;
+ u8 entry_size;
+ struct toggle_list_entry_old list[];
+} __packed;
+
+struct bdb_display_select_old {
+ /* each table has variable size! */
+ struct toggle_list_table_old tables[4];
+} __packed;
+
+/*
+ * Block 17 - SV Test Functions
+ */
+
+struct bdb_sv_test_functions {
+ u8 sv_bits[8];
+} __packed;
+
+/*
+ * Block 18 - Driver Rotation
+ */
+
+struct bdb_driver_rotation {
+ u8 rotation_enable;
+ u8 rotation_flags_1;
+ u16 rotation_flags_2;
+ u32 rotation_flags_3;
+ u32 rotation_flags_4;
+} __packed;
+
+/*
+ * Block 19 - Display Configuration Removal Table (pre-IVB)
+ */
+
+struct display_remove_entry_old {
+ u8 display_select_pipe_a;
+ u8 display_select_pipe_b;
+} __packed;
+
+struct bdb_display_remove_old {
+ u8 num_entries;
+ u8 entry_size;
+ struct display_remove_entry_old table[];
+} __packed;
+
+/*
+ * Block 20 - OEM Customizable Modes
+ */
+
+struct oem_mode {
+ u8 enable_in_vbios:1;
+ u8 enable_in_os:1;
+ u8 enable_in_gop:1; /* 207+ */
+ u8 reserved:5;
+ u8 display_flags; /* ???-216 */
+ u16 x_res;
+ u16 y_res;
+ u8 color_depth;
+ u8 refresh_rate;
+ struct bdb_edid_dtd dtd;
+ u16 display_flags_2; /* 217+ */
+} __packed;
+
+struct bdb_oem_custom {
+ u8 num_entries;
+ u8 entry_size;
+ struct oem_mode modes[];
+} __packed;
+
+/*
+ * Block 21 - EFP List
+ */
+
+struct efp_entry {
+ u16 mfg_name;
+ u16 product_code;
+} __packed;
+
+struct bdb_efp_list {
+ u8 num_entries;
+ u8 entry_size;
+ struct efp_entry efp[];
} __packed;
/*
@@ -641,48 +967,61 @@ struct bdb_sdvo_lvds_options {
} __packed;
/*
- * Block 23 - SDVO LVDS Panel DTDs
+ * Block 23 - SDVO LVDS DTD
*/
-struct lvds_dvo_timing {
- u16 clock; /**< In 10khz */
- u8 hactive_lo;
- u8 hblank_lo;
- u8 hblank_hi:4;
- u8 hactive_hi:4;
- u8 vactive_lo;
- u8 vblank_lo;
- u8 vblank_hi:4;
- u8 vactive_hi:4;
- u8 hsync_off_lo;
- u8 hsync_pulse_width_lo;
- u8 vsync_pulse_width_lo:4;
- u8 vsync_off_lo:4;
- u8 vsync_pulse_width_hi:2;
- u8 vsync_off_hi:2;
- u8 hsync_pulse_width_hi:2;
- u8 hsync_off_hi:2;
- u8 himage_lo;
- u8 vimage_lo;
- u8 vimage_hi:4;
- u8 himage_hi:4;
- u8 h_border;
- u8 v_border;
- u8 rsvd1:3;
- u8 digital:2;
- u8 vsync_positive:1;
- u8 hsync_positive:1;
- u8 non_interlaced:1;
+struct bdb_sdvo_lvds_dtd {
+ struct bdb_edid_dtd dtd[4];
} __packed;
-struct bdb_sdvo_panel_dtds {
- struct lvds_dvo_timing dtds[4];
+/*
+ * Block 24 - SDVO LVDS PnP ID
+ */
+
+struct bdb_sdvo_lvds_pnp_id {
+ struct bdb_edid_pnp_id pnp_id[4];
+} __packed;
+
+/*
+ * Block 25 - SDVO LVDS PPS
+ */
+
+struct sdvo_lvds_pps {
+ u16 t0; /* power on */
+ u16 t1; /* backlight on */
+ u16 t2; /* backlight off */
+ u16 t3; /* power off */
+ u16 t4; /* power cycle */
+} __packed;
+
+struct bdb_sdvo_lvds_pps {
+ struct sdvo_lvds_pps pps[4];
+} __packed;
+
+/*
+ * Block 26 - TV Options Block
+ */
+
+struct bdb_tv_options {
+ u16 underscan_overscan_hdtv_component:2;
+ u16 rsvd1:10;
+ u16 underscan_overscan_hdtv_dvi:2;
+ u16 add_modes_to_avoid_overscan_issue:1;
+ u16 d_connector_support:1;
} __packed;
/*
* Block 27 - eDP VBT Block
*/
+struct edp_power_seq {
+ u16 t1_t3;
+ u16 t8;
+ u16 t9;
+ u16 t10;
+ u16 t11_t12;
+} __packed;
+
#define EDP_18BPP 0
#define EDP_24BPP 1
#define EDP_30BPP 2
@@ -748,13 +1087,90 @@ struct bdb_edp {
struct edp_apical_params apical_params[16]; /* 203+ */
u16 edp_fast_link_training_rate[16]; /* 224+ */
u16 edp_max_port_link_rate[16]; /* 244+ */
+ u16 edp_dsc_disable; /* 251+ */
+ u16 t6_delay_support; /* 260+ */
+ u16 link_idle_time[16]; /* 260+ */
+} __packed;
+
+/*
+ * Block 28 - EFP DTD Block
+ */
+
+struct bdb_efp_dtd {
+ struct bdb_edid_dtd dtd[3];
+} __packed;
+
+/*
+ * Block 29 - Toggle List Block (IVB)
+ */
+
+struct toggle_list_entry_ivb {
+ u8 display_select;
+} __packed;
+
+struct toggle_list_table_ivb {
+ u16 num_entries;
+ u8 entry_size;
+ struct toggle_list_entry_ivb list[];
+} __packed;
+
+struct bdb_display_select_ivb {
+ /* each table has variable size! */
+ struct toggle_list_table_ivb tables[4];
+} __packed;
+
+/*
+ * Block 30 - Display Configuration Removal Table (IVB)
+ */
+
+struct display_remove_entry_ivb {
+ u8 display_select;
+} __packed;
+
+struct bdb_display_remove_ivb {
+ u8 num_entries;
+ u8 entry_size;
+ struct display_remove_entry_ivb table[];
+} __packed;
+
+/*
+ * Block 31 - Toggle List Block (HSW+)
+ */
+
+struct toggle_list_entry_hsw {
+ u16 display_select;
+} __packed;
+
+struct toggle_list_table_hsw {
+ u16 num_entries;
+ u8 entry_size;
+ struct toggle_list_entry_hsw list[];
+} __packed;
+
+struct bdb_display_select_hsw {
+ /* each table has variable size! */
+ struct toggle_list_table_hsw tables[4];
+} __packed;
+
+/*
+ * Block 32 - Display Configuration Removal Table (HSW+)
+ */
+
+struct display_remove_entry_hsw {
+ u16 display_select;
+} __packed;
+
+struct bdb_display_remove_hsw {
+ u8 num_entries;
+ u8 entry_size;
+ struct display_remove_entry_hsw table[];
} __packed;
/*
* Block 40 - LFP Data Block
*/
-struct bdb_lvds_options {
+struct bdb_lfp_options {
u8 panel_type;
u8 panel_type2; /* 212+ */
/* LVDS capabilities, stored in a dword */
@@ -787,22 +1203,22 @@ struct bdb_lvds_options {
/*
* Block 41 - LFP Data Table Pointers
*/
-struct lvds_lfp_data_ptr_table {
+struct lfp_data_ptr_table {
u16 offset; /* offsets are from start of bdb */
u8 table_size;
} __packed;
/* LFP pointer table contains entries to the struct below */
-struct lvds_lfp_data_ptr {
- struct lvds_lfp_data_ptr_table fp_timing;
- struct lvds_lfp_data_ptr_table dvo_timing;
- struct lvds_lfp_data_ptr_table panel_pnp_id;
+struct lfp_data_ptr {
+ struct lfp_data_ptr_table fp_timing;
+ struct lfp_data_ptr_table dvo_timing;
+ struct lfp_data_ptr_table panel_pnp_id;
} __packed;
-struct bdb_lvds_lfp_data_ptrs {
- u8 lvds_entries;
- struct lvds_lfp_data_ptr ptr[16];
- struct lvds_lfp_data_ptr_table panel_name; /* (156-163?)+ */
+struct bdb_lfp_data_ptrs {
+ u8 num_entries;
+ struct lfp_data_ptr ptr[16];
+ struct lfp_data_ptr_table panel_name; /* (156-163?)+ */
} __packed;
/*
@@ -810,7 +1226,7 @@ struct bdb_lvds_lfp_data_ptrs {
*/
/* LFP data has 3 blocks per entry */
-struct lvds_fp_timing {
+struct fp_timing {
u16 x_res;
u16 y_res;
u32 lvds_reg;
@@ -826,46 +1242,34 @@ struct lvds_fp_timing {
u16 terminator;
} __packed;
-struct lvds_pnp_id {
- u16 mfg_name;
- u16 product_code;
- u32 serial;
- u8 mfg_week;
- u8 mfg_year;
-} __packed;
-
/*
* For reference only. fp_timing has variable size so
* the data must be accessed using the data table pointers.
* Do not use this directly!
*/
-struct lvds_lfp_data_entry {
- struct lvds_fp_timing fp_timing;
- struct lvds_dvo_timing dvo_timing;
- struct lvds_pnp_id pnp_id;
-} __packed;
-
-struct bdb_lvds_lfp_data {
- struct lvds_lfp_data_entry data[16];
+struct lfp_data_entry {
+ struct fp_timing fp_timing;
+ struct bdb_edid_dtd dvo_timing;
+ struct bdb_edid_pnp_id pnp_id;
} __packed;
-struct lvds_lfp_panel_name {
- u8 name[13];
+struct bdb_lfp_data {
+ struct lfp_data_entry data[16];
} __packed;
-struct lvds_lfp_black_border {
+struct lfp_black_border {
u8 top; /* 227+ */
u8 bottom; /* 227+ */
u8 left; /* 238+ */
u8 right; /* 238+ */
} __packed;
-struct bdb_lvds_lfp_data_tail {
- struct lvds_lfp_panel_name panel_name[16]; /* (156-163?)+ */
+struct bdb_lfp_data_tail {
+ struct bdb_edid_product_name panel_name[16]; /* (156-163?)+ */
u16 scaling_enable; /* 187+ */
u8 seamless_drrs_min_refresh_rate[16]; /* 188+ */
u8 pixel_overlap_count[16]; /* 208+ */
- struct lvds_lfp_black_border black_border[16]; /* 227+ */
+ struct lfp_black_border black_border[16]; /* 227+ */
u16 dual_lfp_port_sync_enable; /* 231+ */
u16 gpu_dithering_for_banding_artifacts; /* 245+ */
} __packed;
@@ -880,11 +1284,12 @@ struct bdb_lvds_lfp_data_tail {
struct lfp_backlight_data_entry {
u8 type:2;
u8 active_low_pwm:1;
- u8 obsolete1:5;
+ u8 i2c_pin:3; /* obsolete since ? */
+ u8 i2c_speed:2; /* obsolete since ? */
u16 pwm_freq_hz;
u8 min_brightness; /* ???-233 */
- u8 obsolete2;
- u8 obsolete3;
+ u8 i2c_address; /* obsolete since ? */
+ u8 i2c_command; /* obsolete since ? */
} __packed;
struct lfp_backlight_control_method {
@@ -897,16 +1302,11 @@ struct lfp_brightness_level {
u16 reserved;
} __packed;
-#define EXP_BDB_LFP_BL_DATA_SIZE_REV_191 \
- offsetof(struct bdb_lfp_backlight_data, brightness_level)
-#define EXP_BDB_LFP_BL_DATA_SIZE_REV_234 \
- offsetof(struct bdb_lfp_backlight_data, brightness_precision_bits)
-
-struct bdb_lfp_backlight_data {
+struct bdb_lfp_backlight {
u8 entry_size;
struct lfp_backlight_data_entry data[16];
- u8 level[16]; /* ???-233 */
- struct lfp_backlight_control_method backlight_control[16];
+ u8 level[16]; /* 162-233 */
+ struct lfp_backlight_control_method backlight_control[16]; /* 191+ */
struct lfp_brightness_level brightness_level[16]; /* 234+ */
struct lfp_brightness_level brightness_min_level[16]; /* 234+ */
u8 brightness_precision_bits[16]; /* 236+ */
@@ -917,7 +1317,7 @@ struct bdb_lfp_backlight_data {
* Block 44 - LFP Power Conservation Features Block
*/
struct lfp_power_features {
- u8 reserved1:1;
+ u8 dpst_support:1; /* ???-159 */
u8 power_conservation_pref:3;
u8 reserved2:1;
u8 lace_enabled_status:1; /* 210+ */
@@ -931,7 +1331,7 @@ struct als_data_entry {
} __packed;
struct aggressiveness_profile_entry {
- u8 dpst_aggressiveness : 4;
+ u8 dpst_aggressiveness : 4; /* (228/252)-256 */
u8 lace_aggressiveness : 4;
} __packed;
@@ -940,12 +1340,27 @@ struct aggressiveness_profile2_entry {
u8 elp_aggressiveness : 4;
} __packed;
+struct aggressiveness_profile3_entry {
+ u8 apd_aggressiveness:4;
+ u8 pixoptix_aggressiveness:4;
+} __packed;
+
+struct aggressiveness_profile4_entry {
+ u8 xpst_aggressiveness:4;
+ u8 tcon_aggressiveness:4;
+} __packed;
+
+struct panel_identification {
+ u8 panel_technology:4;
+ u8 reserved:4;
+} __packed;
+
struct bdb_lfp_power {
struct lfp_power_features features; /* ???-227 */
struct als_data_entry als[5];
u8 lace_aggressiveness_profile:3; /* 210-227 */
u8 reserved1:5;
- u16 dpst; /* 228+ */
+ u16 dpst; /* 228-256 */
u16 psr; /* 228+ */
u16 drrs; /* 228+ */
u16 lace_support; /* 228+ */
@@ -953,12 +1368,136 @@ struct bdb_lfp_power {
u16 dmrrs; /* 228+ */
u16 adb; /* 228+ */
u16 lace_enabled_status; /* 228+ */
- struct aggressiveness_profile_entry aggressiveness[16]; /* 228+ */
+ struct aggressiveness_profile_entry aggressiveness[16];
u16 hobl; /* 232+ */
u16 vrr_feature_enabled; /* 233+ */
- u16 elp; /* 247+ */
- u16 opst; /* 247+ */
- struct aggressiveness_profile2_entry aggressiveness2[16]; /* 247+ */
+ u16 elp; /* 247-256 */
+ u16 opst; /* 247-256 */
+ struct aggressiveness_profile2_entry aggressiveness2[16]; /* 247-256 */
+ u16 apd; /* 253-256 */
+ u16 pixoptix; /* 253-256 */
+ struct aggressiveness_profile3_entry aggressiveness3[16]; /* 253-256 */
+ struct panel_identification panel_identification[16]; /* 257+ */
+ u16 xpst_support; /* 257+ */
+ u16 tcon_based_backlight_optimization; /* 257+ */
+ struct aggressiveness_profile4_entry aggressiveness4[16]; /* 257+ */
+ u16 tcon_backlight_xpst_coexistence; /* 257+ */
+} __packed;
+
+/*
+ * Block 45 - eDP BFI Block
+ */
+
+struct edp_bfi {
+ u8 enable_bfi_in_driver:1;
+ u8 enable_brightness_control_in_cui:1;
+ u8 reserved:6;
+ u8 brightness_percentage_when_bfi_disabled;
+} __packed;
+
+struct bdb_edp_bfi {
+ u8 bfi_structure_size;
+ struct edp_bfi bfi[16];
+} __packed;
+
+/*
+ * Block 46 - Chromaticity For Narrow Gamut Panel Configuration Block
+ */
+
+struct chromaticity {
+ u8 chromaticity_enable:1;
+ u8 chromaticity_from_edid_base_block:1;
+ u8 rsvd:6;
+
+ 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 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;
+
+/*
+ * Block 50 - MIPI Block
+ */
+
+struct mipi_data {
+ u16 panel_identifier;
+ u16 bridge_revision;
+
+ u32 dithering:1;
+ u32 pixel_format_18bpp:1;
+ u32 reserved1:1;
+ u32 dphy_params_valid:1;
+ u32 reserved2:28;
+
+ u16 port_info;
+
+ u16 reserved3:2;
+ u16 num_lanes:2;
+ u16 reserved4:12;
+
+ u16 virtual_channel_num:2;
+ u16 video_transfer_mode:2;
+ u16 reserved5:12;
+
+ u32 dsi_ddr_clock;
+ u32 renesas_bridge_ref_clock;
+ u16 power_conservation;
+
+ u32 prepare_count:5;
+ u32 reserved6:3;
+ u32 clk_zero_count:8;
+ u32 trail_count:5;
+ u32 reserved7:3;
+ u32 exit_zero_count:6;
+ u32 reserved8:2;
+
+ u32 high_low_switch_count;
+ u32 lp_byte_clock;
+ u32 clock_lane_switch_time_counter;
+ u32 panel_color_depth;
+} __packed;
+
+struct bdb_mipi {
+ struct mipi_data mipi[16];
+} __packed;
+
+/*
+ * Block 51 - Fixed Set Mode Table
+ */
+
+struct bdb_fixed_set_mode {
+ u8 enable;
+ u32 x_res;
+ u32 y_res;
} __packed;
/*
@@ -984,6 +1523,17 @@ struct bdb_mipi_sequence {
} __packed;
/*
+ * Block 55 - RGB Palette Table
+ */
+
+struct bdb_rgb_palette {
+ u8 is_enabled;
+ u8 red[256];
+ u8 blue[256];
+ u8 green[256];
+} __packed;
+
+/*
* Block 56 - Compression Parameters
*/
@@ -1035,6 +1585,16 @@ struct bdb_compression_parameters {
} __packed;
/*
+ * Block 57 - Vswing PreEmphasis Table
+ */
+
+struct bdb_vswing_preemph {
+ u8 num_tables;
+ u8 num_columns;
+ u32 tables[];
+} __packed;
+
+/*
* Block 58 - Generic DTD Block
*/
@@ -1064,4 +1624,29 @@ struct bdb_generic_dtd {
struct generic_dtd_entry dtd[]; /* up to 24 DTD's */
} __packed;
+/*
+ * Block 253 - PRD Table
+ */
+
+struct prd_entry_old {
+ u8 displays_attached;
+ u8 display_in_pipe_a;
+ u8 display_in_pipe_b;
+} __packed;
+
+struct bdb_prd_table_old {
+ struct prd_entry_old list[0]; /* ???-216 */
+ u16 num_entries; /* ???-216 */
+} __packed;
+
+struct prd_entry_new {
+ u16 primary_display;
+ u16 secondary_display;
+} __packed;
+
+struct bdb_prd_table_new {
+ u16 num_entries; /* 217+ */
+ struct prd_entry_new list[]; /* 217+ */
+} __packed;
+
#endif /* _INTEL_VBT_DEFS_H_ */