aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pxa_camera.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/pxa_camera.c')
-rw-r--r--drivers/media/video/pxa_camera.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c
index f6919a0e2ac2..aa7efc45d364 100644
--- a/drivers/media/video/pxa_camera.c
+++ b/drivers/media/video/pxa_camera.c
@@ -1218,6 +1218,7 @@ static int pxa_camera_try_fmt(struct soc_camera_device *icd,
1218 const struct soc_camera_format_xlate *xlate; 1218 const struct soc_camera_format_xlate *xlate;
1219 struct v4l2_pix_format *pix = &f->fmt.pix; 1219 struct v4l2_pix_format *pix = &f->fmt.pix;
1220 __u32 pixfmt = pix->pixelformat; 1220 __u32 pixfmt = pix->pixelformat;
1221 int ret;
1221 1222
1222 xlate = soc_camera_xlate_by_fourcc(icd, pixfmt); 1223 xlate = soc_camera_xlate_by_fourcc(icd, pixfmt);
1223 if (!xlate) { 1224 if (!xlate) {
@@ -1240,8 +1241,13 @@ static int pxa_camera_try_fmt(struct soc_camera_device *icd,
1240 DIV_ROUND_UP(xlate->host_fmt->depth, 8); 1241 DIV_ROUND_UP(xlate->host_fmt->depth, 8);
1241 pix->sizeimage = pix->height * pix->bytesperline; 1242 pix->sizeimage = pix->height * pix->bytesperline;
1242 1243
1244 /* camera has to see its format, but the user the original one */
1245 pix->pixelformat = xlate->cam_fmt->fourcc;
1243 /* limit to sensor capabilities */ 1246 /* limit to sensor capabilities */
1244 return icd->ops->try_fmt(icd, f); 1247 ret = icd->ops->try_fmt(icd, f);
1248 pix->pixelformat = xlate->host_fmt->fourcc;
1249
1250 return ret;
1245} 1251}
1246 1252
1247static int pxa_camera_reqbufs(struct soc_camera_file *icf, 1253static int pxa_camera_reqbufs(struct soc_camera_file *icf,