video: ipo: fix debug and comment
Subsystems (2)
PATCH 1/2 video: ipo: fix debug and comment
- fix debug pixel clk display and add unit
- fix some comments
--- drivers/video/ipu_disp.c | 2 +- drivers/video/mxc_ipuv3_fb.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-)
drivers/video/ipu_disp.c +1 -1
@@ -887,7 +887,7 @@ int32_t ipu_init_sync_panel(int disp, uint32_t pixel_clk, v_total = height + v_sync_width + v_start_width + v_end_width;/* Init clocking */ -debug ("pixel clk = %d\n" , pixel_clk); +debug ("pixel clk = %dHz\n" , pixel_clk);if (sig.ext_clk) {if (!(g_di1_tvout && (disp ==1 ))) {/*not round div for tvout*/
drivers/video/mxc_ipuv3_fb.c +3 -4
@@ -258,8 +258,7 @@ static int mxcfb_set_par(struct fb_info *fbi)if (fbi->var.sync &FB_SYNC_CLK_IDLE_EN ) sig_cfg.clkidle_en =1 ; -debug ("pixclock = %ul Hz\n" , - (u32) (PICOS2KHZ (fbi->var.pixclock) *1000UL )); +debug ("pixclock = %lu Hz\n" ,PICOS2KHZ (fbi->var.pixclock) *1000UL ); if (ipu_init_sync_panel(mxc_fbi->ipu_di, (PICOS2KHZ(fbi->var.pixclock)) * 1000UL,
@@ -486,7 +485,7 @@ static struct fb_info *mxcfb_init_fbinfo(void)/* * Probe routine for the framebuffer driver. It is called during the -* driver binding process. The following functions are performed in +* driver binding process. The following functions are performed in * this routine: Framebuffer initialization, Memory allocation and * mapping, Framebuffer registration, IPU initialization. *
@@ -542,7 +541,7 @@ static int mxcfb_probe(u32 interface_pix_fmt, uint8_t disp,mxcfb_set_fix (fbi); -/* alocate fb first */ +/* allocate fb first */ if (mxcfb_map_video_memory (fbi) <0 )return -ENOMEM ;
Signature · 1 line
2.1.0
PATCH 2/2 video: ipu_disp: remove pixclk fixup
The ipu display insists on having a lower_margin smaller then 2. If this is not the case it will attempt to force it and adjust the pixclk accordingly. This multiplies pixclk in Hz with the width and height, since this is typically a * 10^7 * b * 10^2 * c * 10^2 this will overflow the uint_32 and make things even worse. Since this is a bootloader and the adjustment is neglectible, just force it to two and warn about it.
--- drivers/video/ipu_disp.c | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-)
drivers/video/ipu_disp.c +6 -25
@@ -802,28 +802,6 @@ int ipu_pixfmt_to_map(uint32_t fmt) }/* -* This function is called to adapt synchronous LCD panel to IPU restriction. -*/ -void adapt_panel_to_ipu_restricitions (uint32_t *pixel_clk, -uint16_t width,uint16_t height, -uint16_t h_start_width, -uint16_t h_end_width, -uint16_t v_start_width, -uint16_t *v_end_width) -{ -if (*v_end_width <2 ) { -uint16_t total_width = width + h_start_width + h_end_width; -uint16_t total_height_old = height + v_start_width + - (*v_end_width); -uint16_t total_height_new = height + v_start_width +2 ; - *v_end_width =2 ; - *pixel_clk = (*pixel_clk) * total_width * total_height_new / - (total_width * total_height_old); -printf ("WARNING: adapt panel end blank lines\n" ); - } -} - -/* * This function is called to initialize a synchronous LCD panel. * * @param disp The DI the panel is attached to.
@@ -880,9 +858,12 @@ int32_t ipu_init_sync_panel(int disp, uint32_t pixel_clk,if ((v_sync_width ==0 ) || (h_sync_width ==0 ))return -EINVAL ; -adapt_panel_to_ipu_restricitions (&pixel_clk, width, height, - h_start_width, h_end_width, - v_start_width, &v_end_width); +/* adapt panel to ipu restricitions */ +if (v_end_width <2 ) { + v_end_width =2 ; +puts ("WARNING: v_end_width (lower_margin) must be >= 2, adjusted\n" ); + } + h_total = width + h_sync_width + h_start_width + h_end_width; v_total = height + v_sync_width + v_start_width + v_end_width;
Signature · 1 line
2.1.0
PATCH 2/2 video: ipu_disp: remove pixclk fixup
Hello Stefano,
Quoted 11 lines · Jeroen Hofstee
The ipu display insists on having a
lower_marginsmaller then 2. If this is not the case it will attempt to force it and adjust the pixclk accordingly. This multiplies pixclk in Hz with the width and height, since this is typically a * 10^7 * b * 10^2 * c * 10^2 this will overflow theuint_32and make things even worse. Since this is a bootloader and the adjustment is neglectible, just force it to two and warn about it.Cc Stefano Babic <[email protected]>Signed-off-by Jeroen Hofstee <[email protected]
The lower_margin should be larger then 1 / _not_
smalller then 2 actually.
Regards,
Jeroen
PATCH 2/2 video: ipu_disp: remove pixclk fixup
In reply to Jeroen HofsteeQuoted 9 lines · On Tue, 14 Oct 2014 20:37:15 +0200 Jeroen Hofstee <[email protected]> wrote:
The ipu display insists on having a
lower_marginsmaller then 2. If this is not the case it will attempt to force it and adjust the pixclk accordingly. This multiplies pixclk in Hz with the width and height, since this is typically a * 10^7 * b * 10^2 * c * 10^2 this will overflow theuint_32and make things even worse. Since this is a bootloader and the adjustment is neglectible, just force it to two and warn about it.
Quoted 5 lines
Cc Stefano Babic <[email protected]>Signed-off-by Jeroen Hofstee <[email protected]>--- drivers/video/ipu_disp.c | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-)
Applied to u-boot-video/master.
Thanks,
Anatolij
PATCH 1/2 video: ipo: fix debug and comment
In reply to Jeroen HofsteeHi Jeroen,
Quoted 9 lines · On Tue, 14 Oct 2014 20:37:14 +0200 Jeroen Hofstee <[email protected]> wrote:
- fix debug pixel clk display and add unit
- fix some commentsCc Stefano Babic <[email protected]>Signed-off-by Jeroen Hofstee <[email protected]>--- drivers/video/ipu_disp.c | 2 +- drivers/video/mxc_ipuv3_fb.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-)
Applied to u-boot-video/master.
Thanks,
Anatolij