diff options
-rw-r--r-- | drivers/media/video/samsung/fimc/fimc.h | 4 | ||||
-rw-r--r-- | drivers/media/video/samsung/fimc/fimc_capture.c | 5 | ||||
-rw-r--r-- | drivers/media/video/samsung/fimc/fimc_dev.c | 15 | ||||
-rw-r--r-- | drivers/video/samsung/s3cfb.c | 34 |
4 files changed, 37 insertions, 21 deletions
diff --git a/drivers/media/video/samsung/fimc/fimc.h b/drivers/media/video/samsung/fimc/fimc.h index 71872ac..fa8f2fe 100644 --- a/drivers/media/video/samsung/fimc/fimc.h +++ b/drivers/media/video/samsung/fimc/fimc.h @@ -35,9 +35,9 @@ #define FIMC_SUBDEVS 3 #define FIMC_MAXCAMS 5 /* added 1 because of WriteBack */ #define FIMC_PHYBUFS 4 -#define FIMC_OUTBUFS 3 +#define FIMC_OUTBUFS 2 #define FIMC_INQUEUES 10 -#define FIMC_MAX_CTXS 1 +#define FIMC_MAX_CTXS 2 #define FIMC_TPID 3 #define FIMC_CAPBUFS 16 #define FIMC_ONESHOT_TIMEOUT 200 diff --git a/drivers/media/video/samsung/fimc/fimc_capture.c b/drivers/media/video/samsung/fimc/fimc_capture.c index 7e6c487..466772f 100644 --- a/drivers/media/video/samsung/fimc/fimc_capture.c +++ b/drivers/media/video/samsung/fimc/fimc_capture.c @@ -972,6 +972,7 @@ int fimc_reqbufs_capture(void *fh, struct v4l2_requestbuffers *b) case V4L2_PIX_FMT_NV61: size[0] = cap->fmt.width * cap->fmt.height; size[1] = cap->fmt.width * cap->fmt.height; + size[3] = 16; /* Padding buffer */ break; case V4L2_PIX_FMT_NV12: size[0] = cap->fmt.width * cap->fmt.height; @@ -980,7 +981,7 @@ int fimc_reqbufs_capture(void *fh, struct v4l2_requestbuffers *b) case V4L2_PIX_FMT_NV21: size[0] = cap->fmt.width * cap->fmt.height; size[1] = cap->fmt.width * cap->fmt.height/2; - size[3] = 8; /* Padding buffer - required by upper layer to send buffer address (MEGA cam) */ + size[3] = 16; /* Padding buffer */ break; case V4L2_PIX_FMT_NV12T: /* Tiled frame size calculations as per 4x2 tiles @@ -1005,7 +1006,7 @@ int fimc_reqbufs_capture(void *fh, struct v4l2_requestbuffers *b) size[0] = cap->fmt.width * cap->fmt.height; size[1] = cap->fmt.width * cap->fmt.height >> 2; size[2] = cap->fmt.width * cap->fmt.height >> 2; - size[3] = 8; /* Padding buffer - required by upper layer to send buffer address (VGA cam)*/ + size[3] = 16; /* Padding buffer */ break; case V4L2_PIX_FMT_JPEG: diff --git a/drivers/media/video/samsung/fimc/fimc_dev.c b/drivers/media/video/samsung/fimc/fimc_dev.c index cf58847b..ee10ad8 100644 --- a/drivers/media/video/samsung/fimc/fimc_dev.c +++ b/drivers/media/video/samsung/fimc/fimc_dev.c @@ -1065,6 +1065,21 @@ static int fimc_release(struct file *filp) } } + /* + * it remain afterimage when I play movie using overlay and exit + */ + if (ctrl->fb.is_enable == 1) { + fimc_warn("WIN_OFF for FIMC%d\n", ctrl->id); + ret = s3cfb_direct_ioctl(ctrl->id, S3CFB_SET_WIN_OFF, + (unsigned long)NULL); + if (ret < 0) { + fimc_err("direct_ioctl(S3CFB_SET_WIN_OFF) fail\n"); + return -EINVAL; + } + + ctrl->fb.is_enable = 0; + } + fimc_info1("%s released.\n", ctrl->name); return 0; diff --git a/drivers/video/samsung/s3cfb.c b/drivers/video/samsung/s3cfb.c index b8af666..410515d 100644 --- a/drivers/video/samsung/s3cfb.c +++ b/drivers/video/samsung/s3cfb.c @@ -423,9 +423,6 @@ static int s3cfb_set_par(struct fb_info *fb) dev_dbg(fbdev->dev, "[fb%d] set_par\n", win->id); - if ((win->id != pdata->default_win) && fb->fix.smem_start) - s3cfb_unmap_video_memory(fb); - /* modify the fix info */ if (win->id != pdata->default_win) { fb->fix.line_length = fb->var.xres_virtual * @@ -433,9 +430,6 @@ static int s3cfb_set_par(struct fb_info *fb) fb->fix.smem_len = fb->fix.line_length * fb->var.yres_virtual; } - if (win->id != pdata->default_win) - s3cfb_map_video_memory(fb); - s3cfb_set_win_params(win->id); return 0; @@ -1064,20 +1058,25 @@ err_alloc: int s3cfb_register_framebuffer(void) { struct s3c_platform_fb *pdata = to_fb_plat(fbdev->dev); - int ret, i; - - for (i = 0; i < pdata->nr_wins; i++) { - ret = register_framebuffer(fbdev->fb[i]); + int ret, i, j; + + /* + * on registering framebuffer, + * framebuffer of default window is registered at first. + */ + for (i = pdata->default_win; i < pdata->nr_wins + pdata->default_win; i++) { + j = i % pdata->nr_wins; + ret = register_framebuffer(fbdev->fb[j]); if (ret) { dev_err(fbdev->dev, "failed to register " "framebuffer device\n"); return -EINVAL; } #ifndef CONFIG_FRAMEBUFFER_CONSOLE - if (i == pdata->default_win) { - s3cfb_check_var(&fbdev->fb[i]->var, fbdev->fb[i]); - s3cfb_set_par(fbdev->fb[i]); - s3cfb_draw_logo(fbdev->fb[i]); + if (j == pdata->default_win) { + s3cfb_check_var(&fbdev->fb[j]->var, fbdev->fb[j]); + s3cfb_set_par(fbdev->fb[j]); + s3cfb_draw_logo(fbdev->fb[j]); } #endif } @@ -1360,7 +1359,7 @@ void s3cfb_late_resume(struct early_suspend *h) struct s3c_platform_fb *pdata = to_fb_plat(info->dev); struct fb_info *fb; struct s3cfb_window *win; - int i; + int i, j; struct platform_device *pdev = to_platform_device(info->dev); pr_debug("s3cfb_late_resume is called\n"); @@ -1391,8 +1390,9 @@ void s3cfb_late_resume(struct early_suspend *h) s3cfb_display_on(info); - for (i = 0; i < pdata->nr_wins; i++) { - fb = info->fb[i]; + for (i = pdata->default_win; i < pdata->nr_wins + pdata->default_win; i++) { + j = i % pdata->nr_wins; + fb = info->fb[j]; win = fb->par; if ((win->path == DATA_PATH_DMA) && (win->enabled)) { s3cfb_set_par(fb); |