Hans Verkuil cc7d2dfb75 [media] v4l2_plane_pix_format: use __u32 bytesperline instead of __u16
While running v4l2-compliance tests on vivid I suddenly got errors due to
a call to vmalloc_user with size 0 from vb2.

Digging deeper into the cause I discovered that this was due to the fact that
struct v4l2_plane_pix_format defines bytesperline as a __u16 instead of a __u32.

The test I was running selected a format of 4 * 4096 by 4 * 2048 with a 32
bit pixelformat.

So bytesperline was 4 * 4 * 4096 = 65536, which becomes 0 in a __u16. And
bytesperline * height is suddenly 0 as well. While the vivid driver may be
a virtual driver, it is to be expected that this limit will be hit for real
hardware as well in the near future: 8k deep-color video will already reach
it.

The solution is to change the type to __u32. The only drivers besides vivid
that use the multiplanar API are little-endian ARM and SH platforms (exynos,
ti-vpe, vsp1), so this is safe.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 23:54:47 -03:00
..
2015-02-19 10:56:51 -08:00
2015-02-17 09:27:54 -08:00
2014-10-09 22:26:02 -04:00
2014-05-05 15:32:05 +02:00
2014-02-28 15:12:08 -08:00
2014-08-25 03:28:09 -05:00
2014-02-10 16:01:40 -08:00
2014-12-10 17:41:10 -08:00
2015-02-11 13:03:11 -08:00
2014-06-11 08:35:34 -07:00
2015-02-11 13:03:11 -08:00
2015-02-15 10:48:44 -08:00
2014-06-19 17:45:14 -07:00
2015-02-02 14:23:42 -08:00
2014-05-05 15:32:05 +02:00
2014-03-21 13:16:58 +01:00
2014-12-08 09:07:11 -05:00
2014-11-21 19:48:50 +05:30
2014-05-05 15:32:05 +02:00
2014-05-05 15:32:05 +02:00
2014-09-23 23:44:16 -07:00