From patchwork Thu Sep 14 11:33:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jose Abreu X-Patchwork-Id: 44126 X-Patchwork-Delegate: hverkuil@xs4all.nl Received: from vger.kernel.org ([209.132.180.67]) by www.linuxtv.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dsSP3-0005Mk-9i; Thu, 14 Sep 2017 11:33:53 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752029AbdINLdt (ORCPT + 1 other); Thu, 14 Sep 2017 07:33:49 -0400 Received: from smtprelay.synopsys.com ([198.182.60.111]:37311 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752028AbdINLdr (ORCPT ); Thu, 14 Sep 2017 07:33:47 -0400 Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id 23A3910C1201; Thu, 14 Sep 2017 04:33:47 -0700 (PDT) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id A67A3E0C; Thu, 14 Sep 2017 04:33:46 -0700 (PDT) Received: from joabreu-VirtualBox.internal.synopsys.com (joabreu-e7440.internal.synopsys.com [10.107.19.118]) by mailhost.synopsys.com (Postfix) with ESMTP id 82728DEF; Thu, 14 Sep 2017 04:33:45 -0700 (PDT) From: Jose Abreu To: linux-media@vger.kernel.org Cc: Jose Abreu , Hans Verkuil , Joao Pinto Subject: [PATCH] [media] cec: GIVE_PHYSICAL_ADDR should respond to unregistered device Date: Thu, 14 Sep 2017 12:33:31 +0100 Message-Id: <73019b13e5e8d727c37ec1b99f2e746aad0a7153.1505388690.git.joabreu@synopsys.com> X-Mailer: git-send-email 1.9.1 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Running CEC 1.4 compliance test we get the following error on test 11.1.6.2: "ERROR: The DUT did not broadcast a message to the unregistered device." Fix this by letting GIVE_PHYSICAL_ADDR message respond to unregistered device. With this fix we pass CEC 1.4 official compliance. Signed-off-by: Jose Abreu Cc: Hans Verkuil Cc: Joao Pinto --- drivers/media/cec/cec-adap.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/media/cec/cec-adap.c b/drivers/media/cec/cec-adap.c index dd769e4..48482aa 100644 --- a/drivers/media/cec/cec-adap.c +++ b/drivers/media/cec/cec-adap.c @@ -1797,9 +1797,12 @@ static int cec_receive_notify(struct cec_adapter *adap, struct cec_msg *msg, case CEC_MSG_GIVE_DEVICE_VENDOR_ID: case CEC_MSG_ABORT: case CEC_MSG_GIVE_DEVICE_POWER_STATUS: - case CEC_MSG_GIVE_PHYSICAL_ADDR: case CEC_MSG_GIVE_OSD_NAME: case CEC_MSG_GIVE_FEATURES: + if (from_unregistered) + return 0; + /* Fall through */ + case CEC_MSG_GIVE_PHYSICAL_ADDR: /* * Skip processing these messages if the passthrough mode * is on. @@ -1807,7 +1810,7 @@ static int cec_receive_notify(struct cec_adapter *adap, struct cec_msg *msg, if (adap->passthrough) goto skip_processing; /* Ignore if addressing is wrong */ - if (is_broadcast || from_unregistered) + if (is_broadcast) return 0; break;