video: rockchip: screen: add refresh mode for cmd mode screen

Change-Id: I4643eb1272a1f504ba4b36eb31a4125fa22390f3
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
This commit is contained in:
Huang Jiachai
2016-10-12 16:53:08 +08:00
parent 3507fb51c4
commit 72cb87a32e
4 changed files with 11 additions and 4 deletions

View File

@@ -107,6 +107,10 @@ static int of_parse_display_timing(const struct device_node *np,
dt->flags |= val ? DISPLAY_FLAGS_SWAP_RB : 0;
if (!of_property_read_u32(np, "screen-type", &val))
dt->screen_type = val;
if (!of_property_read_u32(np, "refresh-mode", &val))
dt->refresh_mode = val;
else
dt->refresh_mode = 0;
if (!of_property_read_u32(np, "lvds-format", &val))
dt->lvds_format = val;
if (!of_property_read_u32(np, "out-face", &val))

View File

@@ -500,6 +500,7 @@ int rk_fb_video_mode_from_timing(const struct display_timing *dt,
screen->mode.yres = dt->vactive.typ;
screen->mode.vsync_len = dt->vsync_len.typ;
screen->type = dt->screen_type;
screen->refresh_mode = dt->refresh_mode;
screen->lvds_format = dt->lvds_format;
screen->face = dt->face;
screen->color_mode = dt->color_mode;

View File

@@ -54,7 +54,7 @@ struct overscan {
unsigned char bottom;
};
/* Screen description
/* Screen description
*type:LVDS,RGB,MIPI,MCU
*lvds_fromat:lvds data format,set it if the screen is lvds
*face:thi display output face,18bit,24bit,etc
@@ -62,11 +62,12 @@ struct overscan {
*/
struct rk_screen {
u16 type;
u16 lvds_format;
u16 refresh_mode;
u16 lvds_format;
u16 face;
u16 color_mode;
u8 lcdc_id;
u8 screen_id;
u8 lcdc_id;
u8 screen_id;
struct fb_videomode mode;
u32 post_dsp_stx;
u32 post_dsp_sty;

View File

@@ -78,6 +78,7 @@ struct display_timing {
enum display_flags flags; /* display flags */
#if defined(CONFIG_FB_ROCKCHIP)
u16 screen_type; /*screen type*/
u16 refresh_mode; /* 0: video mode 1: cmd mode */
u16 screen_widt; /* screen physical size */
u16 screen_hight;
u16 lvds_format; /*lvds data format for lvds screen*/