original_kernel/drivers/media/platform
Albert Wang a70a6c4330 [media] media: soc_camera: don't clear pix->sizeimage in JPEG mode
In JPEG mode, the size of image is variable due to different JPEG compression
rate. We only can get the pix->sizeimage from the user.

If we clear pix->sizeimage in soc_camera_try_fmt() then we will get it from:
	ret = soc_mbus_image_size(xlate->host_fmt, pix->bytesperline,
				pix->height);
	if (ret < 0)
		return ret;

	pix->sizeimage = max_t(u32, pix->sizeimage, ret);

In general, this sizeimage will be larger than the actul JPEG image size.

But vb2 will check the buffer and size of image in __qbuf_userptr():
	/* Check if the provided plane buffer is large enough */
	if (planes[plane].length < q->plane_sizes[plane])

So we shouldn't clear the pix->sizeimage and also shouldn't re-calculate
the pix->sizeimage in soc_mbus_image_size() in JPEG mode

We also shouldn't re-calculate pix->bytesperline:
	ret = soc_mbus_bytes_per_line(pix->width, xlate->host_fmt);
	if (ret < 0)
		return ret;

	pix->bytesperline = max_t(u32, pix->bytesperline, ret);

pix->bytesperline also should be set by the user or by the driver's
try_fmt() implementation.

Change-Id: I700690a2287346127a624b5260922eaa5427a596

Signed-off-by: Albert Wang <twang13@marvell.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15 20:05:40 -03:00
..
blackfin
davinci
marvell-ccic
omap
omap3isp
s5p-fimc
s5p-g2d
s5p-jpeg
s5p-mfc
s5p-tv [media] s5p-tv: Use devm_* functions in sii9234_drv.c file 2012-08-15 19:01:09 -03:00
Kconfig
Makefile
arv.c
atmel-isi.c
coda.c [media] media: coda: add const qualifiers 2012-08-15 19:15:02 -03:00
coda.h
fsl-viu.c
indycam.c
indycam.h
m2m-deinterlace.c
mem2mem_testdev.c [media] mem2mem_testdev: unlock and return error code properly 2012-08-15 18:50:27 -03:00
mx1_camera.c [media] video: mx1_camera: Use clk_prepare_enable/clk_disable_unprepare 2012-08-15 17:16:19 -03:00
mx2_camera.c [media] media: mx2_camera: Fix clock handling for i.MX27 2012-08-15 20:00:02 -03:00
mx2_emmaprp.c [media] drivers/media/platform/mx2_emmaprp.c: use devm_kzalloc and devm_clk_get 2012-08-15 18:58:52 -03:00
mx3_camera.c [media] media: mx3_camera: Improve data bus width check code for probe 2012-08-15 20:05:25 -03:00
omap1_camera.c
omap24xxcam-dma.c
omap24xxcam.c
omap24xxcam.h
pxa_camera.c
sh_mobile_ceu_camera.c
sh_vou.c
soc_camera.c [media] media: soc_camera: don't clear pix->sizeimage in JPEG mode 2012-08-15 20:05:40 -03:00
soc_camera_platform.c [media] soc-camera: Add and use soc_camera_power_[on|off]() helper functions 2012-08-15 17:03:29 -03:00
soc_mediabus.c [media] media: soc_camera: don't clear pix->sizeimage in JPEG mode 2012-08-15 20:05:40 -03:00
timblogiw.c
via-camera.c
via-camera.h
vino.c
vino.h
vivi.c