mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-09-02 18:06:13 +02:00

This patch adds MPU interface(8080 mode) support in the LCDIF driver so that LCDIF may send frames to the sec-dsim MIPI DSI controller embedded in i.MX8mm/mn via that interface. From the MIPI DSI controller perspective, the input interface is called S-i80(Synchronous i80 Interface). The general idea is to leverage the self refresh(SR) helpers offered by the DRM core to make the external display device enter self refresh mode and hence disable LCDIF when appropriate. The relevant DRM connectors' conn_state->self_refresh_aware flags are inspected to determine whether to use MPU interface or DOTCLK interface(also called RGB interface). Since LCDIF will be disabled when the self refresh is active and the data is transferred at modest rate, there are below known limitations: 1) The cur_frame_done interrupt comes at a lower frequency than the display vsync signal frequency due to the low data transfer rate. So, vblank events cannot reflect the real vsync pulses of the external display. 2) Screen tearing phenomenon can be seen, because the frame update is asynchronous to the external display self refresh and the LCDIF controller does not support the 'Tearing Effect' mechanism. 3) The fbdev emulation and boot logo can not be updated onto screen in time, because the external display often enters self refresh mode at those stages. The boot logo will show up until the next time when frame is sent to the external display via the MPU interface, e.g., when the next framebuffer pan display operation is done after the logo is ready in framebuffer. Like the below command line, writing to the framebuffer sys node 'pan' frequently at background may make the framebuffer emulation be a bit responsive. while true; do echo 0,0 > /sys/class/graphics/fb0/pan; sleep 1; done & Cc: Sandor Yu <Sandor.yu@nxp.com> Cc: Wujian sun <wujian.sun_1@nxp.com> Reviewed-by: Sandor Yu <Sandor.yu@nxp.com> Signed-off-by: Liu Ying <victor.liu@nxp.com>
46 lines
1.6 KiB
C
46 lines
1.6 KiB
C
/*
|
|
* Copyright 2018,2021 NXP
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*/
|
|
|
|
#ifndef __IMX_LCDIF_H__
|
|
#define __IMX_LCDIF_H__
|
|
|
|
struct lcdif_soc;
|
|
struct videomode;
|
|
|
|
struct lcdif_client_platformdata {
|
|
struct device_node *of_node;
|
|
};
|
|
|
|
int lcdif_vblank_irq_get(struct lcdif_soc *lcdif);
|
|
void lcdif_vblank_irq_enable(struct lcdif_soc *lcdif);
|
|
void lcdif_vblank_irq_disable(struct lcdif_soc *lcdif);
|
|
void lcdif_vblank_irq_clear(struct lcdif_soc *lcdif);
|
|
|
|
int lcdif_get_bus_fmt_from_pix_fmt(struct lcdif_soc *lcdif,
|
|
uint32_t format);
|
|
int lcdif_set_pix_fmt(struct lcdif_soc *lcdif, u32 format);
|
|
void lcdif_set_bus_fmt(struct lcdif_soc *lcdif, u32 bus_format);
|
|
void lcdif_set_fb_addr(struct lcdif_soc *lcdif, int id, u32 addr, bool use_i80);
|
|
void lcdif_set_mode(struct lcdif_soc *lcdif, struct videomode *vmode,
|
|
bool use_i80);
|
|
void lcdif_set_fb_hcrop(struct lcdif_soc *lcdif, u32 src_w,
|
|
u32 fb_w, bool crop);
|
|
void lcdif_enable_controller(struct lcdif_soc *lcdif, bool use_i80);
|
|
void lcdif_disable_controller(struct lcdif_soc *lcdif, bool use_i80);
|
|
void lcdif_dump_registers(struct lcdif_soc *lcdif);
|
|
long lcdif_pix_clk_round_rate(struct lcdif_soc *lcdif,
|
|
unsigned long rate);
|
|
|
|
#endif
|