diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-07-09 10:21:36 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-07-09 10:21:36 -0300 |
commit | 6a6e8090069d0f026261cb53b574401acf0e42d0 (patch) | |
tree | b63f7b70f1a51dca8fd5f8b3ddafe7454307278c /drivers/media/platform/vivid/vivid-vid-common.c | |
parent | d2c6815031681fb69fa14c4b17845dccd3210ab1 (diff) | |
parent | c7169ad5616229b87cabf886bc5f9cbd1fc35a5f (diff) | |
download | talos-obmc-linux-6a6e8090069d0f026261cb53b574401acf0e42d0.tar.gz talos-obmc-linux-6a6e8090069d0f026261cb53b574401acf0e42d0.zip |
Merge branch 'topic/cec' into topic/docs-next
* topic/cec:
[media] DocBook/media: add CEC documentation
[media] s5p_cec: get rid of an unused var
[media] move s5p-cec to staging
[media] vivid: add CEC emulation
[media] cec: s5p-cec: Add s5p-cec driver
[media] cec: adv7511: add cec support
[media] cec: adv7842: add cec support
[media] cec: adv7604: add cec support
[media] cec: add compat32 ioctl support
[media] cec/TODO: add TODO file so we know why this is still in staging
[media] cec: add HDMI CEC framework (api)
[media] cec: add HDMI CEC framework (adapter)
[media] cec: add HDMI CEC framework (core)
[media] cec-funcs.h: static inlines to pack/unpack CEC messages
[media] cec.h: add cec header
[media] cec-edid: add module for EDID CEC helper functions
[media] cec.txt: add CEC framework documentation
[media] rc: Add HDMI CEC protocol handling
Input: add HDMI CEC specific keycodes
Input: add BUS_CEC type
Diffstat (limited to 'drivers/media/platform/vivid/vivid-vid-common.c')
-rw-r--r-- | drivers/media/platform/vivid/vivid-vid-common.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/platform/vivid/vivid-vid-common.c b/drivers/media/platform/vivid/vivid-vid-common.c index 39ea2284789c..fcda3ae4e6b0 100644 --- a/drivers/media/platform/vivid/vivid-vid-common.c +++ b/drivers/media/platform/vivid/vivid-vid-common.c @@ -811,6 +811,7 @@ int vidioc_g_edid(struct file *file, void *_fh, { struct vivid_dev *dev = video_drvdata(file); struct video_device *vdev = video_devdata(file); + struct cec_adapter *adap; memset(edid->reserved, 0, sizeof(edid->reserved)); if (vdev->vfl_dir == VFL_DIR_RX) { @@ -818,11 +819,16 @@ int vidioc_g_edid(struct file *file, void *_fh, return -EINVAL; if (dev->input_type[edid->pad] != HDMI) return -EINVAL; + adap = dev->cec_rx_adap; } else { + unsigned int bus_idx; + if (edid->pad >= dev->num_outputs) return -EINVAL; if (dev->output_type[edid->pad] != HDMI) return -EINVAL; + bus_idx = dev->cec_output2bus_map[edid->pad]; + adap = dev->cec_tx_adap[bus_idx]; } if (edid->start_block == 0 && edid->blocks == 0) { edid->blocks = dev->edid_blocks; @@ -835,5 +841,6 @@ int vidioc_g_edid(struct file *file, void *_fh, 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); return 0; } |