]> git.karo-electronics.de Git - karo-tx-linux.git/commit
[media] coda: allow userspace to set compressed buffer size in a certain range
authorPhilipp Zabel <p.zabel@pengutronix.de>
Thu, 2 Oct 2014 17:08:35 +0000 (14:08 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 28 Oct 2014 17:39:30 +0000 (15:39 -0200)
commitd4c6a416b9d57af6ff8a2dc71f81dad70dbefb2b
treeb6a1ab642da0d83025aef4cc4aaef92a186b7132
parent619165628d8f0e296c66a2f37bcea50769b7873d
[media] coda: allow userspace to set compressed buffer size in a certain range

For small frame sizes, allocating 1 MiB per compressed buffer is a waste of
space. On the other hand, incompressible 1080p data can produce JPEGs larger
than 1 MiB at higher quality settings. Allow userspace to set the compressed
buffer size and clamp the value to a sensible range.
Also set the initial sizeimage to a value inside the range allowed by try_fmt.
While at it, reduce the default image size to a maximum of 1920*1088 (otherwise
JPEG will default to 8k*8k and 96 MiB buffers).

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/coda/coda-bit.c
drivers/media/platform/coda/coda-common.c