tools/intel_vbt_decode: more updates to VBT definitions
cover tools/intel_vbt_decode: more updates to VBT definitions
Bring in the kernel intel_dsi_vbt_defs.h instead of having a locally maintained duplicate with almost but not quite the same contents.
Jani Nikula (5):
tools/intel_vbt_decode: Split up DSI VBT defs to a separate file tools/intel_vbt_decode: Remove intel_bios.h tools/intel_vbt_decode: Add anonymous structs to group DSI VBT defs tools/intel_vbt_decode: Flip bta_enabled to bta_disable tools/intel_vbt_decode: Add missing DSI VBT defs
tools/intel_bios.h | 200 ------------------------------------- tools/intel_dsi_vbt_defs.h | 197 ++++++++++++++++++++++++++++++++++++ tools/intel_vbt_decode.c | 40 +++++--- tools/intel_vbt_defs.h | 2 +- 4 files changed, 223 insertions(+), 216 deletions(-) delete mode 100644 tools/intel_bios.h create mode 100644 tools/intel_dsi_vbt_defs.h
Signature · 1 line
2.47.2
PATCH 1/5 tools/intel_vbt_decode: Split up DSI VBT defs to a separate file
Synchronize intel_vbt_defs.h with kernel commit:
f3c65a8e9b09 ("drm/i915/vbt: split up DSI VBT defs to a separate file")
and copy over the new intel_dsi_vbt_defs.h, replacing similar definitions in intel_bios.h. A handful of struct members have changed, update accordingly.
--- tools/intel_bios.h | 153 ------------------------------- tools/intel_dsi_vbt_defs.h | 183 +++++++++++++++++++++++++++++++++++++ tools/intel_vbt_decode.c | 23 ++--- tools/intel_vbt_defs.h | 2 +- 4 files changed, 196 insertions(+), 165 deletions(-) create mode 100644 tools/intel_dsi_vbt_defs.h
tools/intel_bios.h +0 -153
@@ -44,157 +44,4 @@ struct bdb_legacy_child_devices {#define BDB_DRIVER_SDVO_LVDS 2#define BDB_DRIVER_EDP 3 -/* Block 52 contains MiPi Panel info -* 6 such enteries will there. Index into correct -* entery is based on the panel_index in #40 LFP -*/ -#define MAX_MIPI_CONFIGURATIONS 6 -struct mipi_config { -uint16_t panel_id; - -/* General Params */ -uint32_t dithering:1 ; -uint32_t rsvd1:1 ; -uint32_t panel_type:1 ; -uint32_t panel_arch_type:2 ; -uint32_t cmd_mode:1 ; -uint32_t vtm:2 ; -uint32_t cabc:1 ; -uint32_t pwm_blc:1 ; - -/* Bit 13:10 -* 000 - Reserved, 001 - RGB565, 002 - RGB666, -* 011 - RGB666Loosely packed, 100 - RGB888, -* others - rsvd -*/ -uint32_t videomode_color_format:4 ; - -/* Bit 15:14 -* 0 - No rotation, 1 - 90 degree -* 2 - 180 degree, 3 - 270 degree -*/ -uint32_t rotation:2 ; -uint32_t bta:1 ; -uint32_t rsvd2:15 ; - -/* 2 byte Port Description */ -uint16_t dual_link:2 ; -uint16_t lane_cnt:2 ; -uint16_t pixel_overlap:3 ; -uint16_t rsvd3:9 ; - -/* 2 byte DSI COntroller params */ -/* 0 - Using DSI PHY, 1 - TE usage */ -uint16_t dsi_usage:1 ; -uint16_t rsvd4:15 ; - -uint8_t rsvd5[5 ]; -uint32_t dsi_ddr_clk; -uint32_t bridge_ref_clk; - -uint8_t byte_clk_sel:2 ; -uint8_t rsvd6:6 ; - -/* DPHY Flags */ -uint16_t dphy_param_valid:1 ; -uint16_t eot_disabled:1 ; -uint16_t clk_stop:1 ; -uint16_t rsvd7:13 ; - -uint32_t hs_tx_timeout; -uint32_t lp_rx_timeout; -uint32_t turn_around_timeout; -uint32_t device_reset_timer; -uint32_t master_init_timer; -uint32_t dbi_bw_timer; -uint32_t lp_byte_clk_val; - -/* 4 byte Dphy Params */ -uint32_t prepare_cnt:6 ; -uint32_t rsvd8:2 ; -uint32_t clk_zero_cnt:8 ; -uint32_t trail_cnt:5 ; -uint32_t rsvd9:3 ; -uint32_t exit_zero_cnt:6 ; -uint32_t rsvd10:2 ; - -uint32_t clk_lane_switch_cnt; -uint32_t hl_switch_cnt; - -uint32_t rsvd11[6 ]; - -/* timings based on dphy spec */ -uint8_t tclk_miss; -uint8_t tclk_post; -uint8_t rsvd12; -uint8_t tclk_pre; -uint8_t tclk_prepare; -uint8_t tclk_settle; -uint8_t tclk_term_enable; -uint8_t tclk_trail; -uint16_t tclk_prepare_clkzero; -uint8_t rsvd13; -uint8_t td_term_enable; -uint8_t teot; -uint8_t ths_exit; -uint8_t ths_prepare; -uint16_t ths_prepare_hszero; -uint8_t rsvd14; -uint8_t ths_settle; -uint8_t ths_skip; -uint8_t ths_trail; -uint8_t tinit; -uint8_t tlpx; -uint8_t rsvd15[3 ]; - -/* GPIOs */ -uint8_t panel_enable; -uint8_t bl_enable; -uint8_t pwm_enable; -uint8_t reset_r_n; -uint8_t pwr_down_r; -uint8_t stdby_r_n; - -} __attribute__ ((packed)); - -/* Block 52 contains MiPi configuration block -* 6 * bdb_mipi_config, followed by 6 pps data -* block below -*/ -struct mipi_pps_data { -uint16_t panel_on_delay; -uint16_t bl_enable_delay; -uint16_t bl_disable_delay; -uint16_t panel_off_delay; -uint16_t panel_power_cycle_delay; -} __attribute__ ((packed)); - -/* MIPI Sequence Block definitions */ -enum mipi_seq { -MIPI_SEQ_END =0 , -MIPI_SEQ_ASSERT_RESET , -MIPI_SEQ_INIT_OTP , -MIPI_SEQ_DISPLAY_ON , -MIPI_SEQ_DISPLAY_OFF , -MIPI_SEQ_DEASSERT_RESET , -MIPI_SEQ_BACKLIGHT_ON ,/* sequence block v2+ */ -MIPI_SEQ_BACKLIGHT_OFF ,/* sequence block v2+ */ -MIPI_SEQ_TEAR_ON ,/* sequence block v2+ */ -MIPI_SEQ_TEAR_OFF ,/* sequence block v3+ */ -MIPI_SEQ_POWER_ON ,/* sequence block v3+ */ -MIPI_SEQ_POWER_OFF ,/* sequence block v3+ */ -MIPI_SEQ_MAX -}; - -enum mipi_seq_element { -MIPI_SEQ_ELEM_END =0 , -MIPI_SEQ_ELEM_SEND_PKT , -MIPI_SEQ_ELEM_DELAY , -MIPI_SEQ_ELEM_GPIO , -MIPI_SEQ_ELEM_I2C ,/* sequence block v2+ */ -MIPI_SEQ_ELEM_SPI ,/* sequence block v3+ */ -MIPI_SEQ_ELEM_PMIC ,/* sequence block v3+ */ -MIPI_SEQ_ELEM_MAX -}; -#endif /* _INTEL_BIOS_H_ */
tools/intel_dsi_vbt_defs.h new file +183 -0
183 lines not on this page · raw message
tools/intel_vbt_decode.c +12 -11
@@ -40,8 +40,9 @@#include "igt_aux.h" #include "igt_halffloat.h" -#include "intel_io.h" +#include "intel_bios.h" #include "intel_chipset.h" +#include "intel_io.h" #include "drmtest.h" /* kernel types for intel_vbt_defs.h */
@@ -2842,7 +2843,7 @@ static void dump_mipi_config(struct context *context,printf ("\tPanel %d%s\n" , i,panel_str (context, i));printf ("\t\tGeneral Param\n" ); -printf ("\t\t\t BTA disable: %s\n" , config->bta ?"Disabled" :"Enabled" ); +printf ("\t\t\t BTA disable: %s\n" , config->bta_enabled ?"Disabled" :"Enabled" );printf ("\t\t\t Panel Rotation: %d degrees\n" , config->rotation *90 );printf ("\t\t\t Video Mode Color Format: " );
@@ -2859,16 +2860,16 @@ static void dump_mipi_config(struct context *context,printf ("\t\t\t PPS GPIO Pins: %s \n" , config->pwm_blc ?"Using SOC" :"Using PMIC" );printf ("\t\t\t CABC Support: %s\n" , - config->cabc ?"supported" :"not supported" ); + config->cabc_supported ?"supported" :"not supported" );printf ("\t\t\t Mode: %s\n" , - config->cmd_mode ?"COMMAND" :"VIDEO" ); + config->is_cmd_mode ?"COMMAND" :"VIDEO" );printf ("\t\t\t Video transfer mode: %s (0x%x)\n" , - config->vtm ==1 ?"non-burst with sync pulse" : - config->vtm ==2 ?"non-burst with sync events" : - config->vtm ==3 ?"burst" :"<unknown>" , - config->vtm); + config->video_transfer_mode ==1 ?"non-burst with sync pulse" : + config->video_transfer_mode ==2 ?"non-burst with sync events" : + config->video_transfer_mode ==3 ?"burst" :"<unknown>" , + config->video_transfer_mode);printf ("\t\t\t Dithering: %s\n" , - config->dithering ?"done in Display Controller" :"done in Panel Controller" ); + config->enable_dithering ?"done in Display Controller" :"done in Panel Controller" );printf ("\t\tPort Desc\n" );printf ("\t\t\t Pixel overlap: %d\n" , config->pixel_overlap);
@@ -2883,9 +2884,9 @@ static void dump_mipi_config(struct context *context,printf ("\t\tDphy Flags\n" );printf ("\t\t\t Clock Stop: %s\n" , - config->clk_stop ?"ENABLED" :"DISABLED" ); + config->enable_clk_stop ?"ENABLED" :"DISABLED" );printf ("\t\t\t EOT disabled: %s\n\n" , - config->eot_disabled ?"EOT not to be sent" :"EOT to be sent" ); + config->eot_pkt_disabled ?"EOT not to be sent" :"EOT to be sent" );printf ("\t\tHSTxTimeOut: 0x%x\n" , config->hs_tx_timeout);printf ("\t\tLPRXTimeOut: 0x%x\n" , config->lp_rx_timeout);
tools/intel_vbt_defs.h +1 -1
@@ -37,7 +37,7 @@#ifndef _INTEL_VBT_DEFS_H_#define _INTEL_VBT_DEFS_H_ -#include "intel_bios.h" +#include "intel_dsi_vbt_defs.h" /* EDID derived structures */ struct bdb_edid_pnp_id {
Signature · 1 line
2.47.2
Re: [PATCH i-g-t 1/5] tools/intel_vbt_decode: Split up DSI VBT defs to a separate file
Hi Jani,
Quoted 185 lines · Jani Nikula
Synchronize
intel_vbt_defs.hwith kernel commit:
f3c65a8e9b09("drm/i915/vbt: split up DSI VBT defs to a separate file")and copy over the new
intel_dsi_vbt_defs.h, replacing similar definitions inintel_bios.h. A handful of struct members have changed, update accordingly.Signed-off-by Jani Nikula <[email protected]>--- tools/intel_bios.h | 153 ------------------------------- tools/intel_dsi_vbt_defs.h | 183 +++++++++++++++++++++++++++++++++++++ tools/intel_vbt_decode.c | 23 ++--- tools/intel_vbt_defs.h | 2 +- 4 files changed, 196 insertions(+), 165 deletions(-) create mode 100644 tools/intel_dsi_vbt_defs.htools/intel_bios.h +0
-153@@ -44,157 +44,4 @@ struct bdb_legacy_child_devices {#define BDB_DRIVER_SDVO_LVDS 2#define BDB_DRIVER_EDP 3 -/* Block 52 contains MiPi Panel info -* 6 such enteries will there. Index into correct -* entery is based on the panel_index in #40 LFP -*/ -#define MAX_MIPI_CONFIGURATIONS 6 -struct mipi_config { -uint16_t panel_id; - -/* General Params */ -uint32_t dithering:1 ; -uint32_t rsvd1:1 ; -uint32_t panel_type:1 ; -uint32_t panel_arch_type:2 ; -uint32_t cmd_mode:1 ; -uint32_t vtm:2 ; -uint32_t cabc:1 ; -uint32_t pwm_blc:1 ; - -/* Bit 13:10 -* 000 - Reserved, 001 - RGB565, 002 - RGB666, -* 011 - RGB666Loosely packed, 100 - RGB888, -* others - rsvd -*/ -uint32_t videomode_color_format:4 ; - -/* Bit 15:14 -* 0 - No rotation, 1 - 90 degree -* 2 - 180 degree, 3 - 270 degree -*/ -uint32_t rotation:2 ; -uint32_t bta:1 ; -uint32_t rsvd2:15 ; - -/* 2 byte Port Description */ -uint16_t dual_link:2 ; -uint16_t lane_cnt:2 ; -uint16_t pixel_overlap:3 ; -uint16_t rsvd3:9 ; - -/* 2 byte DSI COntroller params */ -/* 0 - Using DSI PHY, 1 - TE usage */ -uint16_t dsi_usage:1 ; -uint16_t rsvd4:15 ; - -uint8_t rsvd5[5 ]; -uint32_t dsi_ddr_clk; -uint32_t bridge_ref_clk; - -uint8_t byte_clk_sel:2 ; -uint8_t rsvd6:6 ; - -/* DPHY Flags */ -uint16_t dphy_param_valid:1 ; -uint16_t eot_disabled:1 ; -uint16_t clk_stop:1 ; -uint16_t rsvd7:13 ; - -uint32_t hs_tx_timeout; -uint32_t lp_rx_timeout; -uint32_t turn_around_timeout; -uint32_t device_reset_timer; -uint32_t master_init_timer; -uint32_t dbi_bw_timer; -uint32_t lp_byte_clk_val; - -/* 4 byte Dphy Params */ -uint32_t prepare_cnt:6 ; -uint32_t rsvd8:2 ; -uint32_t clk_zero_cnt:8 ; -uint32_t trail_cnt:5 ; -uint32_t rsvd9:3 ; -uint32_t exit_zero_cnt:6 ; -uint32_t rsvd10:2 ; - -uint32_t clk_lane_switch_cnt; -uint32_t hl_switch_cnt; - -uint32_t rsvd11[6 ]; - -/* timings based on dphy spec */ -uint8_t tclk_miss; -uint8_t tclk_post; -uint8_t rsvd12; -uint8_t tclk_pre; -uint8_t tclk_prepare; -uint8_t tclk_settle; -uint8_t tclk_term_enable; -uint8_t tclk_trail; -uint16_t tclk_prepare_clkzero; -uint8_t rsvd13; -uint8_t td_term_enable; -uint8_t teot; -uint8_t ths_exit; -uint8_t ths_prepare; -uint16_t ths_prepare_hszero; -uint8_t rsvd14; -uint8_t ths_settle; -uint8_t ths_skip; -uint8_t ths_trail; -uint8_t tinit; -uint8_t tlpx; -uint8_t rsvd15[3 ]; - -/* GPIOs */ -uint8_t panel_enable; -uint8_t bl_enable; -uint8_t pwm_enable; -uint8_t reset_r_n; -uint8_t pwr_down_r; -uint8_t stdby_r_n; - -} __attribute__ ((packed)); - -/* Block 52 contains MiPi configuration block -* 6 * bdb_mipi_config, followed by 6 pps data -* block below -*/ -struct mipi_pps_data { -uint16_t panel_on_delay; -uint16_t bl_enable_delay; -uint16_t bl_disable_delay; -uint16_t panel_off_delay; -uint16_t panel_power_cycle_delay; -} __attribute__ ((packed)); - -/* MIPI Sequence Block definitions */ -enum mipi_seq { -MIPI_SEQ_END =0 , -MIPI_SEQ_ASSERT_RESET , -MIPI_SEQ_INIT_OTP , -MIPI_SEQ_DISPLAY_ON , -MIPI_SEQ_DISPLAY_OFF , -MIPI_SEQ_DEASSERT_RESET , -MIPI_SEQ_BACKLIGHT_ON ,/* sequence block v2+ */ -MIPI_SEQ_BACKLIGHT_OFF ,/* sequence block v2+ */ -MIPI_SEQ_TEAR_ON ,/* sequence block v2+ */ -MIPI_SEQ_TEAR_OFF ,/* sequence block v3+ */ -MIPI_SEQ_POWER_ON ,/* sequence block v3+ */ -MIPI_SEQ_POWER_OFF ,/* sequence block v3+ */ -MIPI_SEQ_MAX -}; - -enum mipi_seq_element { -MIPI_SEQ_ELEM_END =0 , -MIPI_SEQ_ELEM_SEND_PKT , -MIPI_SEQ_ELEM_DELAY , -MIPI_SEQ_ELEM_GPIO , -MIPI_SEQ_ELEM_I2C ,/* sequence block v2+ */ -MIPI_SEQ_ELEM_SPI ,/* sequence block v3+ */ -MIPI_SEQ_ELEM_PMIC ,/* sequence block v3+ */ -MIPI_SEQ_ELEM_MAX -}; -#endif /* _INTEL_BIOS_H_ */ tools/intel_dsi_vbt_defs.h new file +0
-0
tools/intel_dsi_vbt_defs.h line 7
Quoted 7 lines
tools/intel_dsi_vbt_defs.h new file +7
-0@@ -0,0 +1,183 @@ +/* SPDX-License-Identifier: MIT */ +/* Copyright © 2025 Intel Corporation */ + +#ifndef __INTEL_DSI_VBT_DEFS_H__ +#define __INTEL_DSI_VBT_DEFS_H__ + +#include <linux/types.h>
This could be igt header linux_scaffold.h so it will be:
#include "linux_scaffold.h"
Up to you if you want to change it now or later.
Quoted 192 lines
tools/intel_dsi_vbt_defs.h new file +176
-0+ +/* +* MIPI Sequence Block definitions +* +* Note the VBT spec has AssertReset / DeassertReset swapped from their +* usual naming, we use the proper names here to avoid confusion when +* reading the code. +*/ +enum mipi_seq { +MIPI_SEQ_END =0 , +MIPI_SEQ_DEASSERT_RESET ,/* Spec says MipiAssertResetPin */ +MIPI_SEQ_INIT_OTP , +MIPI_SEQ_DISPLAY_ON , +MIPI_SEQ_DISPLAY_OFF , +MIPI_SEQ_ASSERT_RESET ,/* Spec says MipiDeassertResetPin */ +MIPI_SEQ_BACKLIGHT_ON ,/* sequence block v2+ */ +MIPI_SEQ_BACKLIGHT_OFF ,/* sequence block v2+ */ +MIPI_SEQ_TEAR_ON ,/* sequence block v2+ */ +MIPI_SEQ_TEAR_OFF ,/* sequence block v3+ */ +MIPI_SEQ_POWER_ON ,/* sequence block v3+ */ +MIPI_SEQ_POWER_OFF ,/* sequence block v3+ */ +MIPI_SEQ_MAX +}; + +enum mipi_seq_element { +MIPI_SEQ_ELEM_END =0 , +MIPI_SEQ_ELEM_SEND_PKT , +MIPI_SEQ_ELEM_DELAY , +MIPI_SEQ_ELEM_GPIO , +MIPI_SEQ_ELEM_I2C ,/* sequence block v2+ */ +MIPI_SEQ_ELEM_SPI ,/* sequence block v3+ */ +MIPI_SEQ_ELEM_PMIC ,/* sequence block v3+ */ +MIPI_SEQ_ELEM_MAX +}; + +#define MIPI_DSI_UNDEFINED_PANEL_ID 0 +#define MIPI_DSI_GENERIC_PANEL_ID 1 + +struct mipi_config { +u16 panel_id; + +/* General Params */ +u32 enable_dithering:1 ; +u32 rsvd1:1 ; +u32 is_bridge:1 ; + +u32 panel_arch_type:2 ; +u32 is_cmd_mode:1 ; + +#define NON_BURST_SYNC_PULSE 0x1 +#define NON_BURST_SYNC_EVENTS 0x2 +#define BURST_MODE 0x3 +u32 video_transfer_mode:2 ; + +u32 cabc_supported:1 ; +#define PPS_BLC_PMIC 0 +#define PPS_BLC_SOC 1 +u32 pwm_blc:1 ; + +/* Bit 13:10 */ +#define PIXEL_FORMAT_RGB565 0x1 +#define PIXEL_FORMAT_RGB666 0x2 +#define PIXEL_FORMAT_RGB666_LOOSELY_PACKED 0x3 +#define PIXEL_FORMAT_RGB888 0x4 +u32 videomode_color_format:4 ; + +/* Bit 15:14 */ +#define ENABLE_ROTATION_0 0x0 +#define ENABLE_ROTATION_90 0x1 +#define ENABLE_ROTATION_180 0x2 +#define ENABLE_ROTATION_270 0x3 +u32 rotation:2 ; +u32 bta_enabled:1 ; +u32 rsvd2:15 ; + +/* 2 byte Port Description */ +#define DUAL_LINK_NOT_SUPPORTED 0 +#define DUAL_LINK_FRONT_BACK 1 +#define DUAL_LINK_PIXEL_ALT 2 +u16 dual_link:2 ; +u16 lane_cnt:2 ; +u16 pixel_overlap:3 ; +u16 rgb_flip:1 ; +#define DL_DCS_PORT_A 0x00 +#define DL_DCS_PORT_C 0x01 +#define DL_DCS_PORT_A_AND_C 0x02 +u16 dl_dcs_cabc_ports:2 ; +u16 dl_dcs_backlight_ports:2 ; +u16 rsvd3:4 ; + +u16 rsvd4; + +u8 rsvd5; +u32 target_burst_mode_freq; +u32 dsi_ddr_clk; +u32 bridge_ref_clk; + +#define BYTE_CLK_SEL_20MHZ 0 +#define BYTE_CLK_SEL_10MHZ 1 +#define BYTE_CLK_SEL_5MHZ 2 +u8 byte_clk_sel:2 ; + +u8 rsvd6:6 ; + +/* DPHY Flags */ +u16 dphy_param_valid:1 ; +u16 eot_pkt_disabled:1 ; +u16 enable_clk_stop:1 ; +u16 rsvd7:13 ; + +u32 hs_tx_timeout; +u32 lp_rx_timeout; +u32 turn_around_timeout; +u32 device_reset_timer; +u32 master_init_timer; +u32 dbi_bw_timer; +u32 lp_byte_clk_val; + +/* 4 byte Dphy Params */ +u32 prepare_cnt:6 ; +u32 rsvd8:2 ; +u32 clk_zero_cnt:8 ; +u32 trail_cnt:5 ; +u32 rsvd9:3 ; +u32 exit_zero_cnt:6 ; +u32 rsvd10:2 ; + +u32 clk_lane_switch_cnt; +u32 hl_switch_cnt; + +u32 rsvd11[6 ]; + +/* timings based on dphy spec */ +u8 tclk_miss; +u8 tclk_post; +u8 rsvd12; +u8 tclk_pre; +u8 tclk_prepare; +u8 tclk_settle; +u8 tclk_term_enable; +u8 tclk_trail; +u16 tclk_prepare_clkzero; +u8 rsvd13; +u8 td_term_enable; +u8 teot; +u8 ths_exit; +u8 ths_prepare; +u16 ths_prepare_hszero; +u8 rsvd14; +u8 ths_settle; +u8 ths_skip; +u8 ths_trail; +u8 tinit; +u8 tlpx; +u8 rsvd15[3 ]; + +/* GPIOs */ +u8 panel_enable; +u8 bl_enable; +u8 pwm_enable; +u8 reset_r_n; +u8 pwr_down_r; +u8 stdby_r_n; + +} __packed; + +/* all delays have a unit of 100us */ +struct mipi_pps_data { +u16 panel_on_delay; +u16 bl_enable_delay; +u16 bl_disable_delay; +u16 panel_off_delay; +u16 panel_power_cycle_delay; +} __packed; + +#endif /* __INTEL_DSI_VBT_DEFS_H__ */ tools/intel_vbt_decode.c +2
-1@@ -40,8 +40,9 @@#include "igt_aux.h" #include "igt_halffloat.h" -#include "intel_io.h" +#include "intel_bios.h" #include "intel_chipset.h" +#include "intel_io.h" #include "drmtest.h" /* kernel types for intel_vbt_defs.h */
tools/intel_vbt_decode.c static void dump_mipi_config(struct context *context, · line 2846
Quoted 5 lines
tools/intel_vbt_decode.c +1
-1@@ -2842,7 +2843,7 @@ static void dump_mipi_config(struct context *context,printf ("\tPanel %d%s\n" , i,panel_str (context, i));printf ("\t\tGeneral Param\n" ); -printf ("\t\t\t BTA disable: %s\n" , config->bta ?"Disabled" :"Enabled" ); +printf ("\t\t\t BTA disable: %s\n" , config->bta_enabled ?"Disabled" :"Enabled" );
Is it error code so 0 means enabled?
Regards,
Kamil
Quoted 55 lines
tools/intel_vbt_decode.c +9
-9printf ("\t\t\t Panel Rotation: %d degrees\n" , config->rotation *90 );printf ("\t\t\t Video Mode Color Format: " );@@ -2859,16 +2860,16 @@ static void dump_mipi_config(struct context *context,printf ("\t\t\t PPS GPIO Pins: %s \n" , config->pwm_blc ?"Using SOC" :"Using PMIC" );printf ("\t\t\t CABC Support: %s\n" , - config->cabc ?"supported" :"not supported" ); + config->cabc_supported ?"supported" :"not supported" );printf ("\t\t\t Mode: %s\n" , - config->cmd_mode ?"COMMAND" :"VIDEO" ); + config->is_cmd_mode ?"COMMAND" :"VIDEO" );printf ("\t\t\t Video transfer mode: %s (0x%x)\n" , - config->vtm ==1 ?"non-burst with sync pulse" : - config->vtm ==2 ?"non-burst with sync events" : - config->vtm ==3 ?"burst" :"<unknown>" , - config->vtm); + config->video_transfer_mode ==1 ?"non-burst with sync pulse" : + config->video_transfer_mode ==2 ?"non-burst with sync events" : + config->video_transfer_mode ==3 ?"burst" :"<unknown>" , + config->video_transfer_mode);printf ("\t\t\t Dithering: %s\n" , - config->dithering ?"done in Display Controller" :"done in Panel Controller" ); + config->enable_dithering ?"done in Display Controller" :"done in Panel Controller" );printf ("\t\tPort Desc\n" );printf ("\t\t\t Pixel overlap: %d\n" , config->pixel_overlap);@@ -2883,9 +2884,9 @@ static void dump_mipi_config(struct context *context,printf ("\t\tDphy Flags\n" );printf ("\t\t\t Clock Stop: %s\n" , - config->clk_stop ?"ENABLED" :"DISABLED" ); + config->enable_clk_stop ?"ENABLED" :"DISABLED" );printf ("\t\t\t EOT disabled: %s\n\n" , - config->eot_disabled ?"EOT not to be sent" :"EOT to be sent" ); + config->eot_pkt_disabled ?"EOT not to be sent" :"EOT to be sent" );printf ("\t\tHSTxTimeOut: 0x%x\n" , config->hs_tx_timeout);printf ("\t\tLPRXTimeOut: 0x%x\n" , config->lp_rx_timeout);tools/intel_vbt_defs.h +1
-1@@ -37,7 +37,7 @@#ifndef _INTEL_VBT_DEFS_H_#define _INTEL_VBT_DEFS_H_ -#include "intel_bios.h" +#include "intel_dsi_vbt_defs.h" /* EDID derived structures */ struct bdb_edid_pnp_id {Signature · 1 line
2.47.2
Re: [PATCH i-g-t 1/5] tools/intel_vbt_decode: Split up DSI VBT defs to a separate file
Quoted 19 lines · Kamil Konieczny
Hi Jani,
tools/intel_dsi_vbt_defs.h line 7
Quoted 13 lines · Jani Nikula
tools/intel_dsi_vbt_defs.h new file +7
-0@@ -0,0 +1,183 @@ +/* SPDX-License-Identifier: MIT */ +/* Copyright © 2025 Intel Corporation */ + +#ifndef __INTEL_DSI_VBT_DEFS_H__ +#define __INTEL_DSI_VBT_DEFS_H__ + +#include <linux/types.h> This could be igt header
linux_scaffold.hso it will be:
#include "linux_scaffold.h"
Quoted 1 line
Up to you if you want to change it now or later.
The file's now verbatim copy from kernel, similar to intel_vbt_defs.h and pciids.h, so it'll have to remain as it is.
BR,
Jani.
Signature · 1 line
Jani Nikula, Intel
Re: [PATCH i-g-t 1/5] tools/intel_vbt_decode: Split up DSI VBT defs to a separate file
Hi Jani,
Quoted 20 lines · Jani Nikula
Quoted 19 lines · Kamil Konieczny
Hi Jani,
tools/intel_dsi_vbt_defs.h line 7
Quoted 13 lines · Jani Nikula
tools/intel_dsi_vbt_defs.h new file +7
-0@@ -0,0 +1,183 @@ +/* SPDX-License-Identifier: MIT */ +/* Copyright © 2025 Intel Corporation */ + +#ifndef __INTEL_DSI_VBT_DEFS_H__ +#define __INTEL_DSI_VBT_DEFS_H__ + +#include <linux/types.h> This could be igt header
linux_scaffold.hso it will be:
#include "linux_scaffold.h"
Quoted 8 lines
Quoted 1 line
Up to you if you want to change it now or later.
The file's now verbatim copy from kernel, similar to
intel_vbt_defs.handpciids.h, so it'll have to remain as it is.BR,
Jani.
It could stay for now unless there will be another FreeBSD porting effort.
Regards,
Kamil
Quoted 3 lines
Signature · 2 lines
-- Jani Nikula, Intel
PATCH 2/5 tools/intel_vbt_decode: Remove intel_bios.h
In reply to Jani NikulaWith the DSI VBT defs having been split to a separate file, intel_bios.h has become rather small. Incorporate the remaining contents to intel_vbt_decode.c. Use existing macros for LVDS config.
--- tools/intel_bios.h | 47 ---------------------------------------- tools/intel_vbt_decode.c | 19 +++++++++++----- 2 files changed, 14 insertions(+), 52 deletions(-) delete mode 100644 tools/intel_bios.h
tools/intel_bios.h deleted +0 -47
@@ -1,47 +0,0 @@ -/* -* Copyright � 2006 Intel Corporation -* -* Permission is hereby granted, free of charge, to any person obtaining a -* copy of this software and associated documentation files (the "Software"), -* to deal in the Software without restriction, including without limitation -* the rights to use, copy, modify, merge, publish, distribute, sublicense, -* and/or sell copies of the Software, and to permit persons to whom the -* Software is furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice (including the next -* paragraph) shall be included in all copies or substantial portions of the -* Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Authors: -* Eric Anholt <[email protected]> -* -*/ - -#ifndef _INTEL_BIOS_H_ -#define _INTEL_BIOS_H_ - -#include <stdint.h> - -#define DEVICE_TYPE_DP_DVI 0x68d6 -#define DEVICE_TYPE_DVI 0x68d2 -#define DEVICE_TYPE_MIPI 0x7cc2 - -struct bdb_legacy_child_devices { -uint8_t child_dev_size; -uint8_t devices[0 ];/* presumably 7 * 33 */ -} __attribute__ ((packed)); - -#define BDB_DRIVER_NO_LVDS 0 -#define BDB_DRIVER_INT_LVDS 1 -#define BDB_DRIVER_SDVO_LVDS 2 -#define BDB_DRIVER_EDP 3 - -#endif /* _INTEL_BIOS_H_ */
tools/intel_vbt_decode.c +14 -5
@@ -40,7 +40,6 @@#include "igt_aux.h" #include "igt_halffloat.h" -#include "intel_bios.h" #include "intel_chipset.h" #include "intel_io.h" #include "drmtest.h"
@@ -55,6 +54,16 @@ typedef uint64_t u64;#define _INTEL_BIOS_PRIVATE#include "intel_vbt_defs.h" +/* additional macros for parsing */ +#define DEVICE_TYPE_DP_DVI 0x68d6 +#define DEVICE_TYPE_DVI 0x68d2 +#define DEVICE_TYPE_MIPI 0x7cc2 + +struct bdb_legacy_child_devices { +uint8_t child_dev_size; +uint8_t devices[0 ];/* presumably 7 * 33 */ +} __attribute__ ((packed)); +#define YESNO (val) ((val) ? "yes" : "no")/* This is not for mapping to memory layout. */
@@ -1816,10 +1825,10 @@ static void dump_lfp_data(struct context *context, }static const char *const lvds_config[] = { - [BDB_DRIVER_NO_LVDS ] ="No LVDS" , - [BDB_DRIVER_INT_LVDS ] ="Integrated LVDS" , - [BDB_DRIVER_SDVO_LVDS ] ="SDVO LVDS" , - [BDB_DRIVER_EDP ] ="Embedded DisplayPort" , + [BDB_DRIVER_FEATURE_NO_LVDS ] ="No LVDS" , + [BDB_DRIVER_FEATURE_INT_LVDS ] ="Integrated LVDS" , + [BDB_DRIVER_FEATURE_SDVO_LVDS ] ="SDVO LVDS" , + [BDB_DRIVER_FEATURE_INT_SDVO_LVDS ] ="Embedded DisplayPort" , };static const char *default_algorithm (bool algorithm)
Signature · 1 line
2.47.2
Re: [PATCH i-g-t 2/5] tools/intel_vbt_decode: Remove intel_bios.h
Hi Jani,
Quoted 5 lines · Jani Nikula
With the DSI VBT defs having been split to a separate file,
intel_bios.hhas become rather small. Incorporate the remaining contents tointel_vbt_decode.c. Use existing macros for LVDS config.Signed-off-by Jani Nikula <[email protected]>
Please resend this as fdo patchwork has some problems and this one is missing (so it cannot create a series and CI cannot test it).
Regards,
Kamil
Quoted 106 lines
--- tools/intel_bios.h | 47 ---------------------------------------- tools/intel_vbt_decode.c | 19 +++++++++++----- 2 files changed, 14 insertions(+), 52 deletions(-) delete mode 100644 tools/intel_bios.htools/intel_bios.h deleted +0
-47@@ -1,47 +0,0 @@ -/* -* Copyright ? 2006 Intel Corporation -* -* Permission is hereby granted, free of charge, to any person obtaining a -* copy of this software and associated documentation files (the "Software"), -* to deal in the Software without restriction, including without limitation -* the rights to use, copy, modify, merge, publish, distribute, sublicense, -* and/or sell copies of the Software, and to permit persons to whom the -* Software is furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice (including the next -* paragraph) shall be included in all copies or substantial portions of the -* Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Authors: -* Eric Anholt <[email protected]> -* -*/ - -#ifndef _INTEL_BIOS_H_ -#define _INTEL_BIOS_H_ - -#include <stdint.h> - -#define DEVICE_TYPE_DP_DVI 0x68d6 -#define DEVICE_TYPE_DVI 0x68d2 -#define DEVICE_TYPE_MIPI 0x7cc2 - -struct bdb_legacy_child_devices { -uint8_t child_dev_size; -uint8_t devices[0 ];/* presumably 7 * 33 */ -} __attribute__ ((packed)); - -#define BDB_DRIVER_NO_LVDS 0 -#define BDB_DRIVER_INT_LVDS 1 -#define BDB_DRIVER_SDVO_LVDS 2 -#define BDB_DRIVER_EDP 3 - -#endif /* _INTEL_BIOS_H_ */ tools/intel_vbt_decode.c +14
-5@@ -40,7 +40,6 @@#include "igt_aux.h" #include "igt_halffloat.h" -#include "intel_bios.h" #include "intel_chipset.h" #include "intel_io.h" #include "drmtest.h" @@ -55,6 +54,16 @@ typedef uint64_t u64;#define _INTEL_BIOS_PRIVATE#include "intel_vbt_defs.h" +/* additional macros for parsing */ +#define DEVICE_TYPE_DP_DVI 0x68d6 +#define DEVICE_TYPE_DVI 0x68d2 +#define DEVICE_TYPE_MIPI 0x7cc2 + +struct bdb_legacy_child_devices { +uint8_t child_dev_size; +uint8_t devices[0 ];/* presumably 7 * 33 */ +} __attribute__ ((packed)); +#define YESNO (val) ((val) ? "yes" : "no")/* This is not for mapping to memory layout. */ @@ -1816,10 +1825,10 @@ static void dump_lfp_data(struct context *context, }static const char *const lvds_config[] = { - [BDB_DRIVER_NO_LVDS ] ="No LVDS" , - [BDB_DRIVER_INT_LVDS ] ="Integrated LVDS" , - [BDB_DRIVER_SDVO_LVDS ] ="SDVO LVDS" , - [BDB_DRIVER_EDP ] ="Embedded DisplayPort" , + [BDB_DRIVER_FEATURE_NO_LVDS ] ="No LVDS" , + [BDB_DRIVER_FEATURE_INT_LVDS ] ="Integrated LVDS" , + [BDB_DRIVER_FEATURE_SDVO_LVDS ] ="SDVO LVDS" , + [BDB_DRIVER_FEATURE_INT_SDVO_LVDS ] ="Embedded DisplayPort" , };static const char *default_algorithm (bool algorithm)Signature · 1 line
2.47.2
Re: [PATCH i-g-t 2/5] tools/intel_vbt_decode: Remove intel_bios.h
Quoted 2 lines · Kamil Konieczny
Please resend this as fdo patchwork has some problems and this one is missing (so it cannot create a series and CI cannot test it).
I did, but it still fails [1]. I presume it's because of the latin1 copyright signs. I really can't be bothered to debug where it all goes wrong, so I sent a patch to convert the remaining latin1 files to utf8 in igt [2]. I think that's trivial enough to push directly even if patchwork still trips over it, and we can move on.
BR,
Jani.
[1] https://patchwork.freedesktop.org/series/152979/
[2] https://lore.kernel.org/r/[email protected]
Signature · 1 line
Jani Nikula, Intel
Re: [PATCH i-g-t 2/5] tools/intel_vbt_decode: Remove intel_bios.h
Hi Jani,
Quoted 5 lines · Jani Nikula
Quoted 2 lines · Kamil Konieczny
Please resend this as fdo patchwork has some problems and this one is missing (so it cannot create a series and CI cannot test it).
I did, but it still fails [1].
Yes but at least it shows up in patchwork now.
Quoted 5 lines
I presume it's because of the latin1
copyright signs. I really can't be bothered to debug where it all goes wrong, so I sent a patch to convert the remaining latin1 files to utf8 in igt [2]. I think that's trivial enough to push directly even if patchwork still trips over it, and we can move on.
That is another tooling bug, same with 'git pw as' but at least it do apply when I take it from mailing list.
Imho I would review it and you can ignore patchwork error.
Also correct your other patch as after deletion of intel_bios.h it will be shorter.
Regards,
Kamil
Quoted 11 lines
BR,
Jani.[1] https://patchwork.freedesktop.org/series/152979/
[2] https://lore.kernel.org/r/[email protected]Signature · 1 line
Jani Nikula, Intel
Re: [PATCH i-g-t 2/5] tools/intel_vbt_decode: Remove intel_bios.h
In reply to Jani NikulaHi Jani,
Quoted 5 lines · Jani Nikula
With the DSI VBT defs having been split to a separate file,
intel_bios.hhas become rather small. Incorporate the remaining contents tointel_vbt_decode.c. Use existing macros for LVDS config.Signed-off-by Jani Nikula <[email protected]>
Quoted 106 lines
--- tools/intel_bios.h | 47 ---------------------------------------- tools/intel_vbt_decode.c | 19 +++++++++++----- 2 files changed, 14 insertions(+), 52 deletions(-) delete mode 100644 tools/intel_bios.htools/intel_bios.h deleted +0
-47@@ -1,47 +0,0 @@ -/* -* Copyright ? 2006 Intel Corporation -* -* Permission is hereby granted, free of charge, to any person obtaining a -* copy of this software and associated documentation files (the "Software"), -* to deal in the Software without restriction, including without limitation -* the rights to use, copy, modify, merge, publish, distribute, sublicense, -* and/or sell copies of the Software, and to permit persons to whom the -* Software is furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice (including the next -* paragraph) shall be included in all copies or substantial portions of the -* Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Authors: -* Eric Anholt <[email protected]> -* -*/ - -#ifndef _INTEL_BIOS_H_ -#define _INTEL_BIOS_H_ - -#include <stdint.h> - -#define DEVICE_TYPE_DP_DVI 0x68d6 -#define DEVICE_TYPE_DVI 0x68d2 -#define DEVICE_TYPE_MIPI 0x7cc2 - -struct bdb_legacy_child_devices { -uint8_t child_dev_size; -uint8_t devices[0 ];/* presumably 7 * 33 */ -} __attribute__ ((packed)); - -#define BDB_DRIVER_NO_LVDS 0 -#define BDB_DRIVER_INT_LVDS 1 -#define BDB_DRIVER_SDVO_LVDS 2 -#define BDB_DRIVER_EDP 3 - -#endif /* _INTEL_BIOS_H_ */ tools/intel_vbt_decode.c +14
-5@@ -40,7 +40,6 @@#include "igt_aux.h" #include "igt_halffloat.h" -#include "intel_bios.h" #include "intel_chipset.h" #include "intel_io.h" #include "drmtest.h" @@ -55,6 +54,16 @@ typedef uint64_t u64;#define _INTEL_BIOS_PRIVATE#include "intel_vbt_defs.h" +/* additional macros for parsing */ +#define DEVICE_TYPE_DP_DVI 0x68d6 +#define DEVICE_TYPE_DVI 0x68d2 +#define DEVICE_TYPE_MIPI 0x7cc2 + +struct bdb_legacy_child_devices { +uint8_t child_dev_size; +uint8_t devices[0 ];/* presumably 7 * 33 */ +} __attribute__ ((packed)); +#define YESNO (val) ((val) ? "yes" : "no")/* This is not for mapping to memory layout. */ @@ -1816,10 +1825,10 @@ static void dump_lfp_data(struct context *context, }static const char *const lvds_config[] = { - [BDB_DRIVER_NO_LVDS ] ="No LVDS" , - [BDB_DRIVER_INT_LVDS ] ="Integrated LVDS" , - [BDB_DRIVER_SDVO_LVDS ] ="SDVO LVDS" , - [BDB_DRIVER_EDP ] ="Embedded DisplayPort" , + [BDB_DRIVER_FEATURE_NO_LVDS ] ="No LVDS" , + [BDB_DRIVER_FEATURE_INT_LVDS ] ="Integrated LVDS" , + [BDB_DRIVER_FEATURE_SDVO_LVDS ] ="SDVO LVDS" , + [BDB_DRIVER_FEATURE_INT_SDVO_LVDS ] ="Embedded DisplayPort" , };static const char *default_algorithm (bool algorithm)Signature · 1 line
2.47.2
PATCH 3/5 tools/intel_vbt_decode: Add anonymous structs to group DSI VBT defs
In reply to Jani NikulaSynchronize intel_dsi_vbt_defs.h with kernel commit:
aa0c02f04369 ("drm/i915/vbt: add anonymous structs to group DSI VBT defs")
--- tools/intel_dsi_vbt_defs.h | 87 ++++++++++++++++++++------------------ 1 file changed, 47 insertions(+), 40 deletions(-)
tools/intel_dsi_vbt_defs.h +47 -40
@@ -47,53 +47,55 @@ struct mipi_config {u16 panel_id;/* General Params */ - u32 enable_dithering:1; - u32 rsvd1:1; - u32 is_bridge:1; +struct { +u32 enable_dithering:1 ; +u32 rsvd1:1 ; +u32 is_bridge:1 ; - u32 panel_arch_type:2; - u32 is_cmd_mode:1; +u32 panel_arch_type:2 ; +u32 is_cmd_mode:1 ;#define NON_BURST_SYNC_PULSE 0x1#define NON_BURST_SYNC_EVENTS 0x2#define BURST_MODE 0x3 - u32 video_transfer_mode:2; +u32 video_transfer_mode:2 ; - u32 cabc_supported:1; +u32 cabc_supported:1 ;#define PPS_BLC_PMIC 0#define PPS_BLC_SOC 1 - u32 pwm_blc:1; +u32 pwm_blc:1 ; -/* Bit 13:10 */ #define PIXEL_FORMAT_RGB565 0x1#define PIXEL_FORMAT_RGB666 0x2#define PIXEL_FORMAT_RGB666_LOOSELY_PACKED 0x3#define PIXEL_FORMAT_RGB888 0x4 - u32 videomode_color_format:4; +u32 videomode_color_format:4 ; -/* Bit 15:14 */ #define ENABLE_ROTATION_0 0x0#define ENABLE_ROTATION_90 0x1#define ENABLE_ROTATION_180 0x2#define ENABLE_ROTATION_270 0x3 - u32 rotation:2; - u32 bta_enabled:1; - u32 rsvd2:15; +u32 rotation:2 ; +u32 bta_enabled:1 ; +u32 rsvd2:15 ; + } __packed; -/* 2 byte Port Description */ +/* Port Desc */ +struct {#define DUAL_LINK_NOT_SUPPORTED 0#define DUAL_LINK_FRONT_BACK 1#define DUAL_LINK_PIXEL_ALT 2 - u16 dual_link:2; - u16 lane_cnt:2; - u16 pixel_overlap:3; - u16 rgb_flip:1; +u16 dual_link:2 ; +u16 lane_cnt:2 ; +u16 pixel_overlap:3 ; +u16 rgb_flip:1 ;#define DL_DCS_PORT_A 0x00#define DL_DCS_PORT_C 0x01#define DL_DCS_PORT_A_AND_C 0x02 - u16 dl_dcs_cabc_ports:2; - u16 dl_dcs_backlight_ports:2; - u16 rsvd3:4; +u16 dl_dcs_cabc_ports:2 ; +u16 dl_dcs_backlight_ports:2 ; +u16 rsvd3:4 ; + } __packed;u16 rsvd4;
@@ -102,18 +104,22 @@ struct mipi_config {u32 dsi_ddr_clk;u32 bridge_ref_clk; +/* LP Byte Clock */ +struct {#define BYTE_CLK_SEL_20MHZ 0#define BYTE_CLK_SEL_10MHZ 1#define BYTE_CLK_SEL_5MHZ 2 - u8 byte_clk_sel:2; - - u8 rsvd6:6; - -/* DPHY Flags */ - u16 dphy_param_valid:1; - u16 eot_pkt_disabled:1; - u16 enable_clk_stop:1; - u16 rsvd7:13; +u8 byte_clk_sel:2 ; +u8 rsvd6:6 ; + } __packed; + +/* DPhy Flags */ +struct { +u16 dphy_param_valid:1 ; +u16 eot_pkt_disabled:1 ; +u16 enable_clk_stop:1 ; +u16 rsvd7:13 ; + } __packed;u32 hs_tx_timeout;u32 lp_rx_timeout;
@@ -123,14 +129,16 @@ struct mipi_config {u32 dbi_bw_timer;u32 lp_byte_clk_val; -/* 4 byte Dphy Params */ - u32 prepare_cnt:6; - u32 rsvd8:2; - u32 clk_zero_cnt:8; - u32 trail_cnt:5; - u32 rsvd9:3; - u32 exit_zero_cnt:6; - u32 rsvd10:2; +/* DPhy Params */ +struct { +u32 prepare_cnt:6 ; +u32 rsvd8:2 ; +u32 clk_zero_cnt:8 ; +u32 trail_cnt:5 ; +u32 rsvd9:3 ; +u32 exit_zero_cnt:6 ; +u32 rsvd10:2 ; + } __packed;u32 clk_lane_switch_cnt;u32 hl_switch_cnt;
@@ -168,7 +176,6 @@ struct mipi_config {u8 reset_r_n;u8 pwr_down_r;u8 stdby_r_n; - } __packed;/* all delays have a unit of 100us */
Signature · 1 line
2.47.2
Re: [PATCH i-g-t 3/5] tools/intel_vbt_decode: Add anonymous structs to group DSI VBT defs
Hi Jani,
Quoted 5 lines · Jani Nikula
Synchronize
intel_dsi_vbt_defs.hwith kernel commit:
aa0c02f04369("drm/i915/vbt: add anonymous structs to group DSI VBT defs")Signed-off-by Jani Nikula <[email protected]>
Quoted 154 lines
--- tools/intel_dsi_vbt_defs.h | 87 ++++++++++++++++++++------------------ 1 file changed, 47 insertions(+), 40 deletions(-)tools/intel_dsi_vbt_defs.h +47
-40@@ -47,53 +47,55 @@ struct mipi_config {u16 panel_id;/* General Params */ - u32 enable_dithering:1; - u32 rsvd1:1; - u32 is_bridge:1; +struct { +u32 enable_dithering:1 ; +u32 rsvd1:1 ; +u32 is_bridge:1 ; - u32 panel_arch_type:2; - u32 is_cmd_mode:1; +u32 panel_arch_type:2 ; +u32 is_cmd_mode:1 ;#define NON_BURST_SYNC_PULSE 0x1#define NON_BURST_SYNC_EVENTS 0x2#define BURST_MODE 0x3 - u32 video_transfer_mode:2; +u32 video_transfer_mode:2 ; - u32 cabc_supported:1; +u32 cabc_supported:1 ;#define PPS_BLC_PMIC 0#define PPS_BLC_SOC 1 - u32 pwm_blc:1; +u32 pwm_blc:1 ; -/* Bit 13:10 */ #define PIXEL_FORMAT_RGB565 0x1#define PIXEL_FORMAT_RGB666 0x2#define PIXEL_FORMAT_RGB666_LOOSELY_PACKED 0x3#define PIXEL_FORMAT_RGB888 0x4 - u32 videomode_color_format:4; +u32 videomode_color_format:4 ; -/* Bit 15:14 */ #define ENABLE_ROTATION_0 0x0#define ENABLE_ROTATION_90 0x1#define ENABLE_ROTATION_180 0x2#define ENABLE_ROTATION_270 0x3 - u32 rotation:2; - u32 bta_enabled:1; - u32 rsvd2:15; +u32 rotation:2 ; +u32 bta_enabled:1 ; +u32 rsvd2:15 ; + } __packed; -/* 2 byte Port Description */ +/* Port Desc */ +struct {#define DUAL_LINK_NOT_SUPPORTED 0#define DUAL_LINK_FRONT_BACK 1#define DUAL_LINK_PIXEL_ALT 2 - u16 dual_link:2; - u16 lane_cnt:2; - u16 pixel_overlap:3; - u16 rgb_flip:1; +u16 dual_link:2 ; +u16 lane_cnt:2 ; +u16 pixel_overlap:3 ; +u16 rgb_flip:1 ;#define DL_DCS_PORT_A 0x00#define DL_DCS_PORT_C 0x01#define DL_DCS_PORT_A_AND_C 0x02 - u16 dl_dcs_cabc_ports:2; - u16 dl_dcs_backlight_ports:2; - u16 rsvd3:4; +u16 dl_dcs_cabc_ports:2 ; +u16 dl_dcs_backlight_ports:2 ; +u16 rsvd3:4 ; + } __packed;u16 rsvd4;@@ -102,18 +104,22 @@ struct mipi_config {u32 dsi_ddr_clk;u32 bridge_ref_clk; +/* LP Byte Clock */ +struct {#define BYTE_CLK_SEL_20MHZ 0#define BYTE_CLK_SEL_10MHZ 1#define BYTE_CLK_SEL_5MHZ 2 - u8 byte_clk_sel:2; - - u8 rsvd6:6; - -/* DPHY Flags */ - u16 dphy_param_valid:1; - u16 eot_pkt_disabled:1; - u16 enable_clk_stop:1; - u16 rsvd7:13; +u8 byte_clk_sel:2 ; +u8 rsvd6:6 ; + } __packed; + +/* DPhy Flags */ +struct { +u16 dphy_param_valid:1 ; +u16 eot_pkt_disabled:1 ; +u16 enable_clk_stop:1 ; +u16 rsvd7:13 ; + } __packed;u32 hs_tx_timeout;u32 lp_rx_timeout;@@ -123,14 +129,16 @@ struct mipi_config {u32 dbi_bw_timer;u32 lp_byte_clk_val; -/* 4 byte Dphy Params */ - u32 prepare_cnt:6; - u32 rsvd8:2; - u32 clk_zero_cnt:8; - u32 trail_cnt:5; - u32 rsvd9:3; - u32 exit_zero_cnt:6; - u32 rsvd10:2; +/* DPhy Params */ +struct { +u32 prepare_cnt:6 ; +u32 rsvd8:2 ; +u32 clk_zero_cnt:8 ; +u32 trail_cnt:5 ; +u32 rsvd9:3 ; +u32 exit_zero_cnt:6 ; +u32 rsvd10:2 ; + } __packed;u32 clk_lane_switch_cnt;u32 hl_switch_cnt;@@ -168,7 +176,6 @@ struct mipi_config {u8 reset_r_n;u8 pwr_down_r;u8 stdby_r_n; - } __packed;/* all delays have a unit of 100us */ Signature · 1 line
2.47.2
PATCH 4/5 tools/intel_vbt_decode: Flip bta_enabled to bta_disable
In reply to Jani NikulaSynchronize intel_dsi_vbt_defs.h with kernel commit:
745b597a7930 ("drm/i915/vbt: flip bta_enabled to bta_disable")
--- tools/intel_dsi_vbt_defs.h | 2 +- tools/intel_vbt_decode.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
tools/intel_dsi_vbt_defs.h +1 -1
@@ -76,7 +76,7 @@ struct mipi_config {#define ENABLE_ROTATION_180 0x2#define ENABLE_ROTATION_270 0x3 u32 rotation:2; - u32 bta_enabled:1; + u32 bta_disable:1; u32 rsvd2:15; } __packed;
tools/intel_vbt_decode.c +1 -1
@@ -2852,7 +2852,7 @@ static void dump_mipi_config(struct context *context,printf ("\tPanel %d%s\n" , i,panel_str (context, i));printf ("\t\tGeneral Param\n" ); -printf ("\t\t\t BTA disable: %s\n" , config->bta_enabled ?"Disabled" :"Enabled" ); +printf ("\t\t\t BTA disable: %s\n" , config->bta_disable ?"Disabled" :"Enabled" );printf ("\t\t\t Panel Rotation: %d degrees\n" , config->rotation *90 );printf ("\t\t\t Video Mode Color Format: " );
Signature · 1 line
2.47.2
Re: [PATCH i-g-t 4/5] tools/intel_vbt_decode: Flip bta_enabled to bta_disable
Hi Jani,
Quoted 5 lines · Jani Nikula
Synchronize
intel_dsi_vbt_defs.hwith kernel commit:
745b597a7930("drm/i915/vbt: flipbta_enabledtobta_disable")Signed-off-by Jani Nikula <[email protected]>
Quoted 34 lines
--- tools/intel_dsi_vbt_defs.h | 2 +- tools/intel_vbt_decode.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)tools/intel_dsi_vbt_defs.h +1
-1@@ -76,7 +76,7 @@ struct mipi_config {#define ENABLE_ROTATION_180 0x2#define ENABLE_ROTATION_270 0x3 u32 rotation:2; - u32 bta_enabled:1; + u32 bta_disable:1; u32 rsvd2:15; } __packed;tools/intel_vbt_decode.c +1
-1@@ -2852,7 +2852,7 @@ static void dump_mipi_config(struct context *context,printf ("\tPanel %d%s\n" , i,panel_str (context, i));printf ("\t\tGeneral Param\n" ); -printf ("\t\t\t BTA disable: %s\n" , config->bta_enabled ?"Disabled" :"Enabled" ); +printf ("\t\t\t BTA disable: %s\n" , config->bta_disable ?"Disabled" :"Enabled" );printf ("\t\t\t Panel Rotation: %d degrees\n" , config->rotation *90 );printf ("\t\t\t Video Mode Color Format: " );Signature · 1 line
2.47.2
PATCH 5/5 tools/intel_vbt_decode: Add missing DSI VBT defs
In reply to Jani NikulaSynchronize intel_dsi_vbt_defs.h with kernel commit:
906cbdc1fffa ("drm/i915/vbt: add missing DSI VBT defs")
--- tools/intel_dsi_vbt_defs.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
tools/intel_dsi_vbt_defs.h +10 -3
@@ -94,10 +94,15 @@ struct mipi_config {#define DL_DCS_PORT_A_AND_C 0x02 u16 dl_dcs_cabc_ports:2; u16 dl_dcs_backlight_ports:2; - u16 rsvd3:4; + u16 port_sync:1; /* 219-230 */ + u16 rsvd3:3; } __packed; -u16 rsvd4; +/* DSI Controller Parameters */ +struct { +u16 dsi_usage:1 ; +u16 rsvd4:15 ; + } __packed;u8 rsvd5;u32 target_burst_mode_freq;
@@ -118,7 +123,9 @@ struct mipi_config { u16 dphy_param_valid:1; u16 eot_pkt_disabled:1; u16 enable_clk_stop:1; - u16 rsvd7:13; + u16 blanking_packets_during_bllp:1; /* 219+ */ + u16 lp_clock_during_lpm:1; /* 219+ */ + u16 rsvd7:11; } __packed;u32 hs_tx_timeout;
Signature · 1 line
2.47.2
Re: [PATCH i-g-t 5/5] tools/intel_vbt_decode: Add missing DSI VBT defs
Hi Jani,
Quoted 5 lines · Jani Nikula
Synchronize
intel_dsi_vbt_defs.hwith kernel commit:
906cbdc1fffa("drm/i915/vbt: add missing DSI VBT defs")Signed-off-by Jani Nikula <[email protected]>
Quoted 40 lines
--- tools/intel_dsi_vbt_defs.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)tools/intel_dsi_vbt_defs.h +10
-3@@ -94,10 +94,15 @@ struct mipi_config {#define DL_DCS_PORT_A_AND_C 0x02 u16 dl_dcs_cabc_ports:2; u16 dl_dcs_backlight_ports:2; - u16 rsvd3:4; + u16 port_sync:1; /* 219-230 */ + u16 rsvd3:3; } __packed; -u16 rsvd4; +/* DSI Controller Parameters */ +struct { +u16 dsi_usage:1 ; +u16 rsvd4:15 ; + } __packed;u8 rsvd5;u32 target_burst_mode_freq;@@ -118,7 +123,9 @@ struct mipi_config { u16 dphy_param_valid:1; u16 eot_pkt_disabled:1; u16 enable_clk_stop:1; - u16 rsvd7:13; + u16 blanking_packets_during_bllp:1; /* 219+ */ + u16 lp_clock_during_lpm:1; /* 219+ */ + u16 rsvd7:11; } __packed;u32 hs_tx_timeout;Signature · 1 line
2.47.2
Patchwork
CI✗ Fi.CI.BUILD: failure for tools/intel_vbt_decode: more updates to VBT definitions
In reply to Jani Nikula== Series Details ==
== Series Details ==
Series: tools/intel_vbt_decode: more updates to VBT definitions
URL : https://patchwork.freedesktop.org/series/152953/
State : failure
== Summary ==
Applying: tools/intel_vbt_decode: Split up DSI VBT defs to a separate file
Applying: tools/intel_vbt_decode: Remove intel_bios.h
Using index info to reconstruct a base tree...
Patch failed at 0002 tools/intel_vbt_decode: Remove intel_bios.h When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".