mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
rk3288 lcdc: win0/1/2/3 test at fpga ok
This commit is contained in:
@@ -94,13 +94,3 @@ config LCDC_RK3288
|
||||
depends on FB_ROCKCHIP
|
||||
help
|
||||
Driver for rk3288 lcdc.There are two lcd controllers on rk3288
|
||||
config LCDC0_RK3288
|
||||
bool "lcdc0 support"
|
||||
depends on LCDC_RK3288
|
||||
help
|
||||
Support rk3288 lcdc0 if you say y here
|
||||
config LCDC1_RK3288
|
||||
bool "lcdc1 support"
|
||||
depends on LCDC_RK3288
|
||||
help
|
||||
Support rk3288 lcdc1 if you say y here
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -87,7 +87,7 @@ int rk_fb_pixel_width(int data_format)
|
||||
static int rk_fb_data_fmt(int data_format,int bits_per_pixel)
|
||||
{
|
||||
int fb_data_fmt;
|
||||
if(bits_per_pixel == 0){
|
||||
if(data_format){
|
||||
switch(data_format){
|
||||
case HAL_PIXEL_FORMAT_RGBX_8888:
|
||||
fb_data_fmt = XBGR888;
|
||||
@@ -253,6 +253,7 @@ int rk_fb_video_mode_from_timing(const struct display_timing *dt,
|
||||
screen->type = dt->screen_type;
|
||||
screen->lvds_format = dt->lvds_format;
|
||||
screen->face = dt->face;
|
||||
|
||||
if (dt->flags & DISPLAY_FLAGS_PIXDATA_POSEDGE)
|
||||
screen->pin_dclk = 1;
|
||||
else
|
||||
@@ -293,7 +294,10 @@ int rk_disp_prase_timing_dt(struct rk_lcdc_driver *dev_drv)
|
||||
"vactive:%d\n"
|
||||
"vback_porch:%d\n"
|
||||
"vfront_porch:%d\n"
|
||||
"vsync_len:%d\n",
|
||||
"vsync_len:%d\n"
|
||||
"screen_type:%d\n"
|
||||
"lvds_format:%d\n"
|
||||
"face:%d\n",
|
||||
dt->pixelclock.typ,
|
||||
dt->hactive.typ,
|
||||
dt->hback_porch.typ,
|
||||
@@ -302,7 +306,10 @@ int rk_disp_prase_timing_dt(struct rk_lcdc_driver *dev_drv)
|
||||
dt->vactive.typ,
|
||||
dt->vback_porch.typ,
|
||||
dt->vfront_porch.typ,
|
||||
dt->vsync_len.typ);
|
||||
dt->vsync_len.typ,
|
||||
dt->screen_type,
|
||||
dt->lvds_format,
|
||||
dt->face);
|
||||
return 0;
|
||||
|
||||
}
|
||||
@@ -772,9 +779,6 @@ static int rk_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
|
||||
uv_y_off = yoffset;
|
||||
fix->line_length = stride<<2;
|
||||
break;
|
||||
default:
|
||||
printk(KERN_ERR "%s:un supported format:0x%x\n", __func__, data_format);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
// x y mirror ,jump line
|
||||
@@ -807,10 +811,6 @@ static int rk_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
|
||||
win->area[0].y_offset = yoffset*xvir + xoffset;
|
||||
win->area[0].c_offset = yoffset*2*xvir + (xoffset<<1);
|
||||
break;
|
||||
default:
|
||||
printk(KERN_ERR "%s un supported format:0x%x\n",
|
||||
__func__, data_format);
|
||||
return -EINVAL;
|
||||
}
|
||||
win->area[0].smem_start = fix->smem_start;
|
||||
win->area[0].cbr_start = fix->smem_start + xvir * yvir;
|
||||
@@ -1285,7 +1285,7 @@ static int rk_fb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg
|
||||
int num_buf; /*buffer_number*/
|
||||
int ret;
|
||||
struct rk_fb_win_cfg_data win_data;
|
||||
unsigned int dsp_addr[2];
|
||||
unsigned int dsp_addr[4];
|
||||
int list_stat;
|
||||
|
||||
int win_id = dev_drv->ops->fb_get_win_id(dev_drv, info->fix.id);
|
||||
@@ -1975,8 +1975,8 @@ int rk_fb_switch_screen(struct rk_screen *screen , int enable, int lcdc_id)
|
||||
int ret;
|
||||
int win_id;
|
||||
|
||||
if (rk_fb->disp_mode != DUAL)
|
||||
rk29_backlight_set(0);
|
||||
//if (rk_fb->disp_mode != DUAL)
|
||||
// rk29_backlight_set(0);
|
||||
|
||||
sprintf(name, "lcdc%d", lcdc_id);
|
||||
|
||||
@@ -2092,8 +2092,8 @@ int rk_fb_switch_screen(struct rk_screen *screen , int enable, int lcdc_id)
|
||||
}
|
||||
}
|
||||
|
||||
if (rk_fb->disp_mode != DUAL)
|
||||
rk29_backlight_set(1);
|
||||
//if (rk_fb->disp_mode != DUAL)
|
||||
// rk29_backlight_set(1);
|
||||
hdmi_switch_complete = enable;
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -96,6 +96,7 @@ extern bool rk_fb_poll_wait_frame_complete(void);
|
||||
#define OUT_CCIR656 6
|
||||
#define OUT_S888 8
|
||||
#define OUT_S888DUMY 12
|
||||
#define OUT_RGB_AAA 15
|
||||
#define OUT_P16BPP4 24
|
||||
#define OUT_D888_P666 0x21 //18bit screen,connect to lcdc D2~D7, D10~D15, D18~D23
|
||||
#define OUT_D888_P565 0x22
|
||||
@@ -538,19 +539,5 @@ extern int rk_fb_calc_fps(struct rk_screen * screen, u32 pixclock);
|
||||
extern void rk_fd_fence_wait(struct rk_lcdc_driver *dev_drv, struct sync_fence *fence);
|
||||
extern void rk_fb_free_dma_buf(struct rk_fb_reg_win_data *reg_win_data);
|
||||
|
||||
#if defined(CONFIG_BACKLIGHT_RK29_BL)
|
||||
void rk29_backlight_set(bool on);
|
||||
bool rk29_get_backlight_status(void);
|
||||
#else
|
||||
static void rk29_backlight_set(bool on)
|
||||
{
|
||||
while (0) ;
|
||||
}
|
||||
|
||||
static bool rk29_get_backlight_status(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -67,6 +67,7 @@ struct rk_screen {
|
||||
u32 post_ysize;
|
||||
u16 x_mirror;
|
||||
u16 y_mirror;
|
||||
int interlace;
|
||||
u16 width;
|
||||
u16 height;
|
||||
u8 ft;
|
||||
|
||||
Reference in New Issue
Block a user