[Gen9, Gen10 General] scholbert:
debugging the display subsystem

Hi,

something for the hackers again...

I got stuck at some point while implementing simple framebuffer support for my u-boot code, because i needed some further insights of certain PLL setups.

Unfortunately it's not possible to read out some of the registers from userland using mmap, especially the PLL's.

Entering kernel level was a must to get the values for some registers.

By using my experimental environment with a SD-card containing MLO, u-boot uImage uInitrd, there's the great opportunity to feed the kernel with customized cmdlines easily.

Something useful is to set some debug flags to get advanced output from the display subsystem.

Just append debug omapdss.debug=1 omapfb.debug=1 to the cmdline and there you go.

Here's an interesting section grabbed during boot up:

...
[ 6.110931] omapdss DISPC: context saved, ctx_loss_count -2
[ 6.121673] omapfb omapfb: failed to apply dispc config
[ 6.124542] OMAPFB: mgr->apply'ed
[ 6.128967] omapdss DISPC: dispc_runtime_get
[ 6.134002] omapdss DISPC: dispc_restore_context
[ 6.137573] omapdss DSI: dsi_runtime_get
[ 6.140502] omapdss DSI: PLL init
[ 6.144348] omapdss DSI: PLL init done
[ 6.151885] omapdss DISPC: onoff 1 rf 1 ieo 0 ipc 0 ihs 1 ivs 1 acbi 0 acb 0
[ 6.155517] omapdss DSI: dsi_pll_calc
[ 6.155517] omapdss DSI: dsi_pll_set_clock_div()
[ 6.164886] omapdss DSI: DSI Fint 2400000
[ 6.171905] omapdss DSI: clkin (dss_sys_clk) rate 19200000, highfreq 0
[ 6.171936] omapdss DSI: CLKIN4DDR = 2 * 325 / 8 * 19200000 / 1 = 1560000000
[ 6.184600] omapdss DSI: Data rate on 1 DSI lane 780 Mbps
[ 6.190093] omapdss DSI: Clock lane freq 390000000 Hz
[ 6.198272] omapdss DSI: regm_dispc = 12, DSI_PLL_HSDIV_DISPC (PLL1_CLK1) = 130000000
[ 6.205535] omapdss DSI: regm_dsi = 0, DSI_PLL_HSDIV_DSI (PLL1_CLK2) = 0
[ 6.209472] omapdss DSI: PLL config done
[ 6.213897] omapdss DISPC: lck = 130000000 (1)
[ 6.213989] omapdss DISPC: pck = 65000000 (2)
[ 6.223754] omapdss DISPC: channel 2 xres 1024 yres 768
[ 6.227020] omapdss DISPC: pck 65000
[ 6.227111] omapdss DISPC: hsw 2 hfp 218 hbp 100 vsw 4 vfp 26 vbp 8
[ 6.238311] omapdss DISPC: hsync 48363Hz, vsync 60Hz
[ 6.243347] panel_enable [xga8]
[ 6.379089] OMAPFB: apply_changes, fb 0, ovl 0
[ 6.386260] OMAPFB: setup_overlay 0, posx 0, posy 0, outw 1024, outh 768
[ 6.390808] OMAPFB: paddr 9c000000, vaddr e1800000
[ 6.400115] omapdss OVERLAY: check_overlay 0: (0,0 1024x768 -> 1024x768) disp (1024x768)
[ 6.400207] omapdss MANAGER: omap_dss_mgr_apply(lcd2)
[ 6.414123] omapdss OVERLAY: check_overlay 0: (0,0 1024x768 -> 1024x768) disp (1024x768)
[ 6.419097] omapdss MANAGER: configure_overlay(0)
[ 6.434265] omapdss DISPC: dispc_setup_plane 0, pa 9c000000, sw 1024, 0,0, 1024/1x768/1 -> 1024x768, ilace 0, cmode 800, rot 0, mir 0 chan 2 5tap
[ 6.440124] omapdss DISPC: calc_rot(0): scrw 1024, 1024x768
[ 6.447326] omapdss DISPC: offset0 0, offset1 0, row_inc 1, pix_inc 1
[ 6.453002] omapdss DISPC: 0,0 1024*1x768*1 -> 1024x768
[ 6.460540] omapdss DISPC: fifo(0) low/high old 1272/1279, new 560/1279
[ 6.465423] omapdss DISPC: dispc_enable_plane 0, 1
[ 6.470214] omapdss MANAGER: configure_manager(2)
[ 6.473144] omapdss DISPC: GO LCD2
[ 6.476776] OMAPFB: create sysfs for fbs
[ 6.476898] OMAPFB: create sysfs for fbs
...

If you got questions, don't hesitate ;)

Have a nice day,

scholbert