tools/intel_bios_reader: Dump the DSI video transfer mode and pixel overlap
PATCH 1/4 tools/intel_bios_reader: Dump the DSI video transfer mode and pixel overlap
From: Ville Syrjälä <[email protected]>
Knowing how were trasmitting the data is pretty important, so let's dump out the video transfer mode and pixel overlap for DSI.
--- tools/intel_bios.h | 3 ++- tools/intel_bios_reader.c | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-)
tools/intel_bios.h +2 -1
@@ -743,7 +743,8 @@ struct mipi_config {/* 2 byte Port Description */ uint16_t dual_link:2; uint16_t lane_cnt:2; - uint16_t rsvd3:12; + uint16_t pixel_overlap:3; + uint16_t rsvd3:9;/* 2 byte DSI COntroller params */ /* 0 - Using DSI PHY, 1 - TE usage */
tools/intel_bios_reader.c +6 -2
@@ -1046,12 +1046,16 @@ static void dump_mipi_config(struct context *context,printf ("RGB888\n" );printf ("\t\t PPS GPIO Pins: %s \n" , config->pwm_blc ?"Using SOC" :"Using PMIC" );printf ("\t\t CABC Support: %s\n" , config->cabc ?"supported" :"not supported" ); -//insert video mode type printf ("\t\t Mode: %s\n" , config->cmd_mode ?"COMMAND" :"VIDEO" ); +printf ("\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);printf ("\t\t Dithering: %s\n" , config->dithering ?"done in Display Controller" :"done in Panel Controller" );printf ("\tPort Desc\n" ); -//insert pixel overlap count +printf ("\t\t Pixel overlap: %d\n" , config->pixel_overlap);printf ("\t\t Lane Count: %d\n" , config->lane_cnt +1 );printf ("\t\t Dual Link Support: " );if (config->dual_link ==0 )
Signature · 6 lines
2.10.2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/4 tools/intel_reg: Dump some interesting CCK regs on VLV/CHV
From: Ville Syrjälä <[email protected]>
CCK houses various important clock related registers. Let's dump those as well.
--- tools/registers/cherryview | 1 + tools/registers/valleyview | 1 + tools/registers/vlv_cck.txt | 11 +++++++++++ 3 files changed, 13 insertions(+) create mode 100644 tools/registers/vlv_cck.txt
tools/registers/cherryview +1 -0
@@ -6,4 +6,5 @@ chv_display_base.txt chv_dpio_phy_x2.txt chv_dpio_phy_x1.txt vlv_dsi.txt +vlv_cck.txt gen7_other.txt
tools/registers/valleyview +1 -0
@@ -4,4 +4,5 @@ vlv_display_base.txt vlv_dpio_phy.txt vlv_dsi.txt vlv_flisdsi.txt +vlv_cck.txt gen7_other.txt
tools/registers/vlv_cck.txt new file +11 -0
@@ -0,0 +1,11 @@ +('CCK_FUSE_0', '0x08', 'CCK') +('CCK_DSI_PLL_FUSE', '0x44', 'CCK') +('CCK_DSI_PLL_CONTROL', '0x48', 'CCK') +('CCK_DSI_PLL_DIVIDER', '0x4c', 'CCK') +('CCK_CZ_CLOCK_CONTROL', '0x62', 'CCK') +('CCK_GPLL_CLOCK_CONTROL', '0x67', 'CCK') +('CCK_DISPLAY_CLOCK_CONTROL', '0x6b', 'CCK') +('CCK_DISPLAY_REF_CLOCK_CONTROL', '0x6c', 'CCK') +('CCK_MIPI_ESCAPE_CONTROL', '0x6d', 'CCK') +('CCK_DSI0_CONTROL', '0x6e', 'CCK') +('CCK_DSI1_CONTROL', '0x6f', 'CCK')
Signature · 6 lines
2.10.2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/4 lib/debugfs: Check if debufs is already mounted before attempting to mount it
In reply to [email protected]From: Ville Syrjälä <[email protected]>
mount("/sys/kernel/debug") will return an error if something is already mounted there. So let's check for that before calling mount(). This allows many of the tools (eg. intel_reg) to work even when no drm drivers are loaded since the earlier "/sys/kernel/debug/dri" & co. path checks will fail in that case and we will fall back to attempting to mount debugfs ourselves.
--- lib/igt_debugfs.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-)
lib/igt_debugfs.c +19 -2
@@ -89,6 +89,22 @@ typedef struct {char dri_path[128 ]; } igt_debugfs_t; +static bool is_mountpoint (const char *path) +{ +char buf[strlen (path) +4 ]; +dev_t dot_dev, dotdot_dev; +struct stat st; + +igt_assert_lt (snprintf (buf,sizeof (buf),"%s/." , path),sizeof (buf)); +igt_assert_eq (stat (buf, &st),0 ); + dot_dev = st.st_dev; + +igt_assert_lt (snprintf (buf,sizeof (buf),"%s/.." , path),sizeof (buf)); +igt_assert_eq (stat (buf, &st),0 ); + dotdot_dev = st.st_dev; + +return dot_dev != dotdot_dev; +}/** * igt_debugfs_mount:
@@ -109,8 +125,9 @@ const char *igt_debugfs_mount(void)if (stat ("/sys/kernel/debug/dri" , &st) ==0 )return "/sys/kernel/debug" ; -igt_assert (stat ("/sys/kernel/debug" , &st) ==0 ); -igt_assert (mount ("debug" ,"/sys/kernel/debug" ,"debugfs" ,0 ,0 ) ==0 ); +igt_assert (is_mountpoint ("/sys/kernel/debug" ) || +mount ("debug" ,"/sys/kernel/debug" ,"debugfs" ,0 ,0 ) ==0 ); +return "/sys/kernel/debug" ; }
Signature · 6 lines
2.10.2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/4 tools/intel_display_poller: Allow the tool to be used without i915 loaded
In reply to [email protected]From: Ville Syrjälä <[email protected]>
We don't need the drm fd to find out the PCI device ID. So let's drop the drm stuff, which allows the tool to work without i915 loaded.
--- tools/intel_display_poller.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
tools/intel_display_poller.c +2 -4
@@ -961,7 +961,7 @@ static void __attribute__((noreturn)) usage(const char *name)int main (int argc,char *argv[]) { -int fd, i; +int i;int pipe =0 , bit =0 , target_scanline =0 , target_fuzz =1 ;bool test_pixelcount = false;uint32_t devid;
@@ -1045,9 +1045,7 @@ int main(int argc, char *argv[]) } } - fd =drm_open_driver (DRIVER_INTEL ); - devid =intel_get_drm_devid (fd); -close (fd); + devid =intel_get_pci_device ()->device_id;/* * check if the requires registers are
Signature · 6 lines
2.10.2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx