[U-Boot] [PATCH 4/8] sunxi: video: Split out TCON code

Maxime Ripard maxime.ripard at free-electrons.com
Thu Mar 9 08:33:06 UTC 2017


Hi,

Thanks for your great work.

On Thu, Mar 09, 2017 at 12:34:40AM +0100, Jernej Skrabec wrote:
> -	writel(0, &lcdc->tcon0_io_tristate);
> +	sunxi_ctfb_mode_to_display_timing(mode, &timing);
> +	lcdc_tcon0_mode_set(lcdc, &timing, clk_div, for_ext_vga_dac,
> +			    sunxi_display.depth, CONFIG_VIDEO_LCD_DCLK_PHASE);

I'm not sure what this sunxi_ctfb_mode_to_display_timing function is
useful for, but it's introduction and the conversion of the users
would probably need to be moved to another patch.

>  #elif defined CONFIG_VIDEO_VGA_VIA_LCD
>  		sunxi_composer_mode_set(mode, address);
>  		sunxi_lcdc_tcon0_mode_set(mode, true);
> -		sunxi_composer_enable();
> -		sunxi_lcdc_enable();
> +		lcdc_enable((struct sunxi_lcdc_reg *)SUNXI_LCD0_BASE,
> +			    sunxi_display.depth);
> +		lcdc_enable((struct sunxi_lcdc_reg *)SUNXI_LCD0_BASE, 0);

That one is suspicious. Shouldn't sunxi_composer_enable be left, and
lcdc_enable called only once?

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170309/e9db8d97/attachment.sig>


More information about the U-Boot mailing list