diff options
author | Jose Abreu <Jose.Abreu@synopsys.com> | 2017-09-14 11:23:38 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-09-23 07:30:16 -0400 |
commit | 845d6524d69b40bd6abd61dc1264a8657159aa55 (patch) | |
tree | 69f470758fa30fd76f4d3f0385939e50ee75744c | |
parent | e949f61461ab83b094cad564c89a8d2b078b4508 (diff) |
media: cec: Respond to unregistered initiators, when applicable
Running CEC 1.4 compliance test we get the following error on test
11.1.6.2: "ERROR: The DUT did not broadcast a
<Report Physical Address> message to the unregistered device."
Fix this by letting GIVE_PHYSICAL_ADDR message respond to unregistered
device. Also, GIVE_DEVICE_VENDOR_ID and GIVE_FEATURES fall in the
same category so, respond also to these messages.
With this fix we pass CEC 1.4 official compliance.
Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Cc: Joao Pinto <jpinto@synopsys.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: <stable@vger.kernel.org> # for v4.10 and up
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r-- | drivers/media/cec/cec-adap.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/media/cec/cec-adap.c b/drivers/media/cec/cec-adap.c index dd769e40416f..84d1b67f850c 100644 --- a/drivers/media/cec/cec-adap.c +++ b/drivers/media/cec/cec-adap.c | |||
@@ -1794,12 +1794,19 @@ static int cec_receive_notify(struct cec_adapter *adap, struct cec_msg *msg, | |||
1794 | */ | 1794 | */ |
1795 | switch (msg->msg[1]) { | 1795 | switch (msg->msg[1]) { |
1796 | case CEC_MSG_GET_CEC_VERSION: | 1796 | case CEC_MSG_GET_CEC_VERSION: |
1797 | case CEC_MSG_GIVE_DEVICE_VENDOR_ID: | ||
1798 | case CEC_MSG_ABORT: | 1797 | case CEC_MSG_ABORT: |
1799 | case CEC_MSG_GIVE_DEVICE_POWER_STATUS: | 1798 | case CEC_MSG_GIVE_DEVICE_POWER_STATUS: |
1800 | case CEC_MSG_GIVE_PHYSICAL_ADDR: | ||
1801 | case CEC_MSG_GIVE_OSD_NAME: | 1799 | case CEC_MSG_GIVE_OSD_NAME: |
1800 | /* | ||
1801 | * These messages reply with a directed message, so ignore if | ||
1802 | * the initiator is Unregistered. | ||
1803 | */ | ||
1804 | if (!adap->passthrough && from_unregistered) | ||
1805 | return 0; | ||
1806 | /* Fall through */ | ||
1807 | case CEC_MSG_GIVE_DEVICE_VENDOR_ID: | ||
1802 | case CEC_MSG_GIVE_FEATURES: | 1808 | case CEC_MSG_GIVE_FEATURES: |
1809 | case CEC_MSG_GIVE_PHYSICAL_ADDR: | ||
1803 | /* | 1810 | /* |
1804 | * Skip processing these messages if the passthrough mode | 1811 | * Skip processing these messages if the passthrough mode |
1805 | * is on. | 1812 | * is on. |
@@ -1807,7 +1814,7 @@ static int cec_receive_notify(struct cec_adapter *adap, struct cec_msg *msg, | |||
1807 | if (adap->passthrough) | 1814 | if (adap->passthrough) |
1808 | goto skip_processing; | 1815 | goto skip_processing; |
1809 | /* Ignore if addressing is wrong */ | 1816 | /* Ignore if addressing is wrong */ |
1810 | if (is_broadcast || from_unregistered) | 1817 | if (is_broadcast) |
1811 | return 0; | 1818 | return 0; |
1812 | break; | 1819 | break; |
1813 | 1820 | ||