struct rk_lcdc_win *extend_win = NULL;
struct rk_lcdc_win *win = NULL;
struct rk_screen *screen = dev_drv->cur_screen;
- struct rk_screen screen_primary;
int win_id = 0;
u32 cblen = 0, crlen = 0;
u16 xsize = 0, ysize = 0; /* winx display window height/width --->LCDC_WINx_DSP_INFO */
if (var->grayscale >> 8) {
xsize = (var->grayscale >> 8) & 0xfff;
ysize = (var->grayscale >> 20) & 0xfff;
+ if (xsize > screen->mode.xres)
+ xsize = screen->mode.xres;
+ if (ysize > screen->mode.yres)
+ ysize = screen->mode.yres;
} else { /*ohterwise full screen display */
xsize = screen->mode.xres;
ysize = screen->mode.yres;
}
}
- rk_fb_get_prmry_screen(&screen_primary);
win->format = fb_data_fmt;
win->area[0].y_vir_stride = stride >> 2;
win->area[0].uv_vir_stride = uv_stride >> 2;
- win->area[0].xpos = xpos*screen->mode.xres/screen_primary.mode.xres;
- win->area[0].ypos = ypos*screen->mode.yres/screen_primary.mode.yres;
- win->area[0].xsize = screen->mode.xres*xsize/screen_primary.mode.xres;
- win->area[0].ysize = screen->mode.yres*ysize/screen_primary.mode.yres;
+ win->area[0].xpos = xpos;
+ win->area[0].ypos = ypos;
+ win->area[0].xsize = xsize;
+ win->area[0].ysize = ysize;
win->area[0].xact = var->xres; /* winx active window height,is a wint of vir */
win->area[0].yact = var->yres;
win->area[0].xvir = var->xres_virtual; /* virtual resolution stride --->LCDC_WINx_VIR */
static const struct fb_videomode rk3036_cvbs_mode[] = {
/*name refresh xres yres pixclock h_bp h_fp v_bp v_fp h_pw v_pw polariry PorI flag*/
- {"NTSC", 60, 720, 480, 27000000, 57, 19, 19, 0, 62, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_INTERLACED, 0},
- {"PAL", 50, 720, 576, 27000000, 69, 12, 19, 2, 63, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_INTERLACED, 0},
+/* {"NTSC", 60, 720, 480, 27000000, 57, 19, 19, 0, 62, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_INTERLACED, 0},
+ {"PAL", 50, 720, 576, 27000000, 69, 12, 19, 2, 63, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_INTERLACED, 0},
+*/ {"NTSC", 60, 720, 480, 27000000, 43, 33, 19, 0, 62, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_INTERLACED, 0},
+ {"PAL", 50, 720, 576, 27000000, 52, 29, 19, 2, 63, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_INTERLACED, 0},
};
static struct rk3036_tve *rk3036_tve;
/* screen type & face */
screen->type = SCREEN_TVOUT;
screen->face = OUT_P888;
-
+ screen->color_mode = COLOR_YCBCR;
screen->mode = *modedb;
/* Pin polarity */
platform_driver_unregister(&rk3036_tve_driver);
}
-module_init(rk3036_tve_init);
+late_initcall(rk3036_tve_init);
module_exit(rk3036_tve_exit);
/* Module information */