Commit 055075a3 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[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: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent f8cc16c8
...@@ -858,7 +858,7 @@ int vidioc_g_edid(struct file *file, void *_fh, ...@@ -858,7 +858,7 @@ int vidioc_g_edid(struct file *file, void *_fh,
return -EINVAL; return -EINVAL;
if (edid->start_block + edid->blocks > dev->edid_blocks) if (edid->start_block + edid->blocks > dev->edid_blocks)
edid->blocks = dev->edid_blocks - edid->start_block; edid->blocks = dev->edid_blocks - edid->start_block;
memcpy(edid->edid, dev->edid, edid->blocks * 128); cec_set_edid_phys_addr(dev->edid, dev->edid_blocks * 128, adap->phys_addr);
cec_set_edid_phys_addr(edid->edid, edid->blocks * 128, adap->phys_addr); memcpy(edid->edid, dev->edid + edid->start_block * 128, edid->blocks * 128);
return 0; return 0;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment