This is an automatic generated email to let you know that the following patch 
were queued:

Subject: [media] v4l2-compat-ioctl32: VIDIOC_S_EDID should return all fields on 
error
Author:  Hans Verkuil <[email protected]>
Date:    Thu Mar 30 09:05:25 2017 -0300

Most ioctls do not have to write back the contents of the argument
if an error is returned. But VIDIOC_S_EDID is an exception together
with the EXT_CTRLS ioctls (already handled correctly).

Add this exception to v4l2-compat-ioctl32.

This fixes a compliance error when using compat32 and trying to
set a new EDID with more blocks than the hardware supports. In
that case the driver will return -E2BIG and set edid.blocks to the
actual maximum number of blocks. This field was never copied back
to userspace due to this bug.

Signed-off-by: Hans Verkuil <[email protected]>
Acked-by: Sakari Ailus <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

---

diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c 
b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
index eac9565dc3d8..77b8a2dcfcdf 100644
--- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
+++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
@@ -990,6 +990,10 @@ static long do_video_ioctl(struct file *file, unsigned int 
cmd, unsigned long ar
                if (put_v4l2_ext_controls32(&karg.v2ecs, up))
                        err = -EFAULT;
                break;
+       case VIDIOC_S_EDID:
+               if (put_v4l2_edid32(&karg.v2edid, up))
+                       err = -EFAULT;
+               break;
        }
        if (err)
                return err;
@@ -1011,7 +1015,6 @@ static long do_video_ioctl(struct file *file, unsigned 
int cmd, unsigned long ar
                break;
 
        case VIDIOC_G_EDID:
-       case VIDIOC_S_EDID:
                err = put_v4l2_edid32(&karg.v2edid, up);
                break;
 

_______________________________________________
linuxtv-commits mailing list
[email protected]
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to