diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2017-03-27 10:36:53 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-04-05 20:20:57 +0200 |
commit | 055075a3e8b8992f86707d3d7d20b857e71d205d (patch) | |
tree | 04eeef32dd64e7374e8e3c531e4aef4d032c4707 | |
parent | [media] platform: vivid: Use cec_get_drvdata() (diff) | |
download | linux-055075a3e8b8992f86707d3d7d20b857e71d205d.tar.xz linux-055075a3e8b8992f86707d3d7d20b857e71d205d.zip |
[media] vivid: fix g_edid implementation
The VIDIOC_G_EDID implementation in vivid didn't take edid->start_block into account when
copying the EDID data.
Make sure that the internal EDID is updated with the correct CEC physical address. Currently
the returned EDID is updated, but that will only work well if edid->start_block is 0.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r-- | drivers/media/platform/vivid/vivid-vid-common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/vivid/vivid-vid-common.c b/drivers/media/platform/vivid/vivid-vid-common.c index 5fc010f6ce67..f0f423c7ca41 100644 --- a/drivers/media/platform/vivid/vivid-vid-common.c +++ b/drivers/media/platform/vivid/vivid-vid-common.c @@ -858,7 +858,7 @@ int vidioc_g_edid(struct file *file, void *_fh, return -EINVAL; if (edid->start_block + edid->blocks > dev->edid_blocks) edid->blocks = dev->edid_blocks - edid->start_block; - memcpy(edid->edid, dev->edid, edid->blocks * 128); - cec_set_edid_phys_addr(edid->edid, edid->blocks * 128, adap->phys_addr); + cec_set_edid_phys_addr(dev->edid, dev->edid_blocks * 128, adap->phys_addr); + memcpy(edid->edid, dev->edid + edid->start_block * 128, edid->blocks * 128); return 0; } |