1. rk3128-box.dts: enable tve.

2. rk_fb: set_par did not covert display window infomation set from user space to
   screen size, it will be calculate in user space.
This commit is contained in:
Zheng Yang
2014-08-27 18:33:03 +08:00
parent 5af42f221b
commit 97561eb8e1
4 changed files with 20 additions and 12 deletions

View File

@@ -135,13 +135,17 @@
display-timings = <&disp_timings>;
};
&fb {
rockchip,disp-mode = <NO_DUAL>;
};
&lcdc {
status = "okay";
rockchip,fb-win-map = <FB0_WIN1_FB1_WIN0_FB2_WIN2>;
};
&tve {
status = "disabled";
status = "okay";
};
&i2c2 {

View File

@@ -2037,9 +2037,9 @@ static int rk312x_lcdc_parse_dt(struct lcdc_device *lcdc_dev)
struct device_node *np = lcdc_dev->dev->of_node;
const struct of_device_id *match;
const struct rk_lcdc_drvdata *lcdc_drvdata;
int val;
#if defined(CONFIG_ROCKCHIP_IOMMU)
int val;
if (of_property_read_u32(np, "rockchip,iommu-enabled", &val))
lcdc_dev->driver.iommu_enabled = 0;
else

View File

@@ -2725,7 +2725,6 @@ static int rk_fb_set_par(struct fb_info *info)
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 */
@@ -2764,6 +2763,10 @@ static int rk_fb_set_par(struct fb_info *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;
@@ -2861,14 +2864,13 @@ static int rk_fb_set_par(struct fb_info *info)
}
}
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 */

View File

@@ -23,8 +23,10 @@
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;
@@ -140,7 +142,7 @@ static int tve_switch_fb(const struct fb_videomode *modedb, int enable)
/* screen type & face */
screen->type = SCREEN_TVOUT;
screen->face = OUT_P888;
screen->color_mode = COLOR_YCBCR;
screen->mode = *modedb;
/* Pin polarity */
@@ -403,7 +405,7 @@ static void __exit rk3036_tve_exit(void)
platform_driver_unregister(&rk3036_tve_driver);
}
module_init(rk3036_tve_init);
late_initcall(rk3036_tve_init);
module_exit(rk3036_tve_exit);
/* Module information */