Drivers should only set the payload on .buf_prepare if the buffer is CAPTURE type. If an OUTPUT buffer has a zero bytesused set by userspace then v4l2-core will set it to buffer length. If we overwrite bytesused for OUTPUT buffers, too, then vb2_get_plane_payload() will return incorrect value which might be then written to hw registers by the driver. Andrzej Pietrasiewicz (2): media: hantro: Fix .buf_prepare media: cedrus: Fix .buf_prepare Ezequiel Garcia (1): media: rkvdec: Fix .buf_prepare drivers/staging/media/hantro/hantro_v4l2.c | 9 ++++++++- drivers/staging/media/rkvdec/rkvdec.c | 10 +++++++++- drivers/staging/media/sunxi/cedrus/cedrus_video.c | 8 +++++++- 3 files changed, 24 insertions(+), 3 deletions(-) base-commit: 0b276e470a4d43e1365d3eb53c608a3d208cabd4 -- 2.17.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel