diff options
author | Javier Viguera <javier.viguera@digi.com> | 2012-02-07 10:22:40 +0100 |
---|---|---|
committer | Javier Viguera <javier.viguera@digi.com> | 2012-02-07 10:28:31 +0100 |
commit | be39b7625170fccd03b29354e803c283407b8a29 (patch) | |
tree | c019b57246cd60692153bde16df75fac5f9a630e /drivers | |
parent | 940f65c7309cba35dae51daa12f1a0d13d1d80a1 (diff) |
ccxmx5x: fix v4l2_capture for VGA interface (#41837)
This partially reverts commit '314c1b4' because after commit '5b13ce7'
only one video interface is registered.
Vantive: #41837
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/mxc/capture/mxc_v4l2_capture.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/media/video/mxc/capture/mxc_v4l2_capture.c b/drivers/media/video/mxc/capture/mxc_v4l2_capture.c index 7b6c366058ea..0d83a1e32bcb 100644 --- a/drivers/media/video/mxc/capture/mxc_v4l2_capture.c +++ b/drivers/media/video/mxc/capture/mxc_v4l2_capture.c @@ -486,8 +486,10 @@ static int verify_preview(cam_data *cam, struct v4l2_window *win) do { fbi = (struct fb_info *)registered_fb[i]; - if (fbi == NULL) - continue; + if (fbi == NULL) { + pr_err("ERROR: verify_preview frame buffer NULL.\n"); + return -1; + } /* Which DI supports 2 layers? */ if (strncmp(fbi->fix.id, "DISP3 BG", 8) == 0) { @@ -505,8 +507,14 @@ static int verify_preview(cam_data *cam, struct v4l2_window *win) } /* Found the frame buffer to preview on. */ - if (strcmp(fbi->fix.id, - mxc_capture_outputs[cam->output].name) == 0) { + /* + * TODO: compare only first 8 characters to allow matching between 'DISP3 BG' + * and 'DISP3 BG - DI1'. This is a workaround to allow VGA display work with + * the camera (vantive #41837). Needs to be revisited once the dual display is + * supported. + */ + if (strncmp(fbi->fix.id, + mxc_capture_outputs[cam->output].name, 8) == 0) { if (strcmp(fbi->fix.id, "DISP3 FG") == 0) foregound_fb = true; @@ -515,11 +523,6 @@ static int verify_preview(cam_data *cam, struct v4l2_window *win) } } while (++i < num_registered_fb); - if (fbi == NULL) { - pr_err("ERROR: verify_preview frame buffer NULL.\n"); - return -1; - } - if (foregound_fb) { width_bound = bg_fbi->var.xres; height_bound = bg_fbi->var.yres; |