}else{
post_dsp_vact_end = v_total - screen->mode.lower_margin -
- screen->post_dsp_sty;
- post_dsp_hact_st = post_dsp_vact_end - screen->post_ysize;
+ post_dsp_vact_st = post_dsp_vact_end - screen->post_ysize;
}
if((screen->post_ysize < y_res)&&(screen->post_ysize != 0)){
post_vsd_en = 1;
return 0;
}
+static int rk3288_lcdc_area_swap(struct rk_lcdc_win *win,int area_num)
+{
+ struct rk_lcdc_win_area area_temp;
+ switch(area_num){
+ case 2:
+ area_temp = win->area[0];
+ win->area[0] = win->area[1];
+ win->area[1] = area_temp;
+ break;
+ case 3:
+ area_temp = win->area[0];
+ win->area[0] = win->area[2];
+ win->area[2] = area_temp;
+ break;
+ case 4:
+ area_temp = win->area[0];
+ win->area[0] = win->area[3];
+ win->area[3] = area_temp;
+
+ area_temp = win->area[1];
+ win->area[1] = win->area[2];
+ win->area[2] = area_temp;
+ break;
+ default:
+ printk(KERN_WARNING "un supported area num!\n");
+ break;
+ }
+ return 0;
+}
static int rk3288_win_0_1_reg_update(struct rk_lcdc_driver *dev_drv,int win_id)
{
struct lcdc_device *lcdc_dev =
container_of(dev_drv, struct lcdc_device, driver);
struct rk_lcdc_win *win = dev_drv->win[win_id];
+ struct rk_screen *screen = dev_drv->cur_screen;
unsigned int mask, val, off;
off = (win_id-2) * 0x50;
-
+ if((screen->y_mirror == 1)&&(win->area_num > 1)){
+ rk3288_lcdc_area_swap(win,win->area_num);
+ }
+
if(win->state == 1){
mask = m_WIN2_EN | m_WIN2_DATA_FMT | m_WIN2_RB_SWAP;
val = v_WIN2_EN(1) | v_WIN2_DATA_FMT(win->fmt_cfg) |
u32 stride_32bit_2;
u32 stride_128bit_1;
u32 stride_128bit_2;
- u16 uv_x_off,uv_y_off,dsp_height,uv_y_act;
+ u16 uv_x_off,uv_y_off,uv_y_act;
u8 is_pic_yuv=0;
win_id = dev_drv->ops->fb_get_win_id(dev_drv, info->fix.id);
stride = stride_32bit_1;//default rgb
fix->line_length = stride;
- dsp_height = win->area[0].ysize;
switch (win->format){
case YUV422:
uv_x_off = xoffset >> 1 ;//
uv_y_off = yoffset;//0
fix->line_length = stride;
- uv_y_act = dsp_height>>1;
+ uv_y_act = win->area[0].yact>>1;
break;
case YUV420://420sp
is_pic_yuv = 1;
uv_x_off = xoffset;
uv_y_off = yoffset >> 1;
fix->line_length = stride;
- uv_y_act = dsp_height>>1;
+ uv_y_act = win->area[0].yact>>1;
break;
case YUV444:
is_pic_yuv = 1;
uv_x_off = xoffset*2;
uv_y_off = yoffset;
fix->line_length = stride<<2;
- uv_y_act = dsp_height;
+ uv_y_act = win->area[0].yact;
break;
default:
break;
u32 stride_32bit_2;
u32 stride_128bit_1;
u32 stride_128bit_2;
- u16 uv_x_off,uv_y_off,uv_y_act,dsp_height;
+ u16 uv_x_off,uv_y_off,uv_y_act;
u8 is_pic_yuv=0;
u8 ppixel_a=0,global_a=0;
#ifdef USE_ION_MMU
reg_win_data->win_id = -1;
}
for(i=0;i<reg_win_data->area_num;i++){
- dsp_height = reg_win_data->reg_area_data[i].ysize;
reg_win_data->reg_area_data[i].xpos = win_par->area_par[i].xpos;//visiable pos in panel
reg_win_data->reg_area_data[i].ypos = win_par->area_par[i].ypos;
uv_x_off = xoffset >> 1 ;//
uv_y_off = yoffset;//0
fix->line_length = stride;
- uv_y_act = dsp_height>>1;
+ uv_y_act = win_par->area_par[0].yact>>1;
break;
case YUV420://420sp
is_pic_yuv = 1;
uv_x_off = xoffset;
uv_y_off = yoffset >> 1;
fix->line_length = stride;
- uv_y_act = dsp_height>>1;
+ uv_y_act = win_par->area_par[0].yact>>1;
break;
case YUV444:
is_pic_yuv = 1;
uv_x_off = xoffset*2;
uv_y_off = yoffset;
fix->line_length = stride<<2;
- uv_y_act = dsp_height;
+ uv_y_act = win_par->area_par[0].yact;
break;
default:
break;
u32 stride_32bit_2;
u32 stride_128bit_1;
u32 stride_128bit_2;
- u16 uv_x_off,uv_y_off,dsp_height,uv_y_act;
+ u16 uv_x_off,uv_y_off,uv_y_act;
u8 is_pic_yuv=0;
var->pixclock = dev_drv->pixclock;
stride = stride_32bit_1;//default rgb
fix->line_length = stride;
- dsp_height = win->area[0].ysize;
switch (fb_data_fmt){
case YUV422:
is_pic_yuv = 1;
uv_y_off = yoffset;//0
fix->line_length = stride;
cblen = crlen = (xvir*yvir)>>1;
- uv_y_act = dsp_height;
+ uv_y_act = win->area[0].yact>>1;
break;
case YUV420://420sp
is_pic_yuv = 1;
uv_y_off = yoffset >> 1;
fix->line_length = stride;
cblen = crlen = (xvir*yvir)>>2;
- uv_y_act = dsp_height>>1;
+ uv_y_act = win->area[0].yact>>1;
break;
case YUV444:
is_pic_yuv = 1;
uv_y_off = yoffset;
fix->line_length = stride<<2;
cblen = crlen = (xvir*yvir);
- uv_y_act = dsp_height;
+ uv_y_act = win->area[0].yact;
break;
default:
break;