Commit 43ee0318 authored by Ye Li's avatar Ye Li
Browse files

MLK-18945-8 video: mxsfb: Update LCDIF driver for sec_mipi_dsi on iMX8MM



Update LCDIF driver for integrating with samsung mipi dsi controller on
iMX8MM platform.

The changes include:
1. Fix build warning for ARM64 platform.
2. Change max outstanding transactions req to 16 for better performance
   on system bus.
3. Set ENABLE signal to active low for valid data transfer.
Signed-off-by: default avatarYe Li <ye.li@nxp.com>
parent 01e116cc
......@@ -90,7 +90,7 @@ void mxs_lcd_get_panel(struct display_panel *dispanel)
static void mxs_lcd_init(GraphicDevice *panel,
struct ctfb_res_modes *mode, int bpp)
{
struct mxs_lcdif_regs *regs = (struct mxs_lcdif_regs *)(panel->isaBase);
struct mxs_lcdif_regs *regs = (struct mxs_lcdif_regs *)(ulong)(panel->isaBase);
uint32_t word_len = 0, bus_width = 0;
uint8_t valid_data = 0;
......@@ -130,15 +130,26 @@ static void mxs_lcd_init(GraphicDevice *panel,
writel(valid_data << LCDIF_CTRL1_BYTE_PACKING_FORMAT_OFFSET,
&regs->hw_lcdif_ctrl1);
#ifdef CONFIG_IMX_MIPI_DSI_BRIDGE
writel(LCDIF_CTRL2_OUTSTANDING_REQS_REQ_16, &regs->hw_lcdif_ctrl2);
#endif
mxsfb_system_setup();
writel((mode->yres << LCDIF_TRANSFER_COUNT_V_COUNT_OFFSET) | mode->xres,
&regs->hw_lcdif_transfer_count);
#ifdef CONFIG_IMX_SEC_MIPI_DSI
writel(LCDIF_VDCTRL0_ENABLE_PRESENT |
LCDIF_VDCTRL0_VSYNC_PERIOD_UNIT |
LCDIF_VDCTRL0_VSYNC_PULSE_WIDTH_UNIT |
mode->vsync_len, &regs->hw_lcdif_vdctrl0);
#else
writel(LCDIF_VDCTRL0_ENABLE_PRESENT | LCDIF_VDCTRL0_ENABLE_POL |
LCDIF_VDCTRL0_VSYNC_PERIOD_UNIT |
LCDIF_VDCTRL0_VSYNC_PULSE_WIDTH_UNIT |
mode->vsync_len, &regs->hw_lcdif_vdctrl0);
#endif
writel(mode->upper_margin + mode->lower_margin +
mode->vsync_len + mode->yres,
&regs->hw_lcdif_vdctrl1);
......@@ -173,7 +184,7 @@ static void mxs_lcd_init(GraphicDevice *panel,
void lcdif_power_down(void)
{
struct mxs_lcdif_regs *regs = (struct mxs_lcdif_regs *)(panel.isaBase);
struct mxs_lcdif_regs *regs = (struct mxs_lcdif_regs *)(ulong)(panel.isaBase);
int timeout = 1000000;
#ifdef CONFIG_MX6
......@@ -283,7 +294,7 @@ void *video_hw_init(void)
/* Wipe framebuffer */
memset(fb, 0, panel.memSize);
panel.frameAdrs = (u32)fb;
panel.frameAdrs = (ulong)fb;
printf("%s\n", panel.modeIdent);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment