From patchwork Mon Aug 27 12:28:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 10577045 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9030E14E1 for ; Mon, 27 Aug 2018 12:28:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7DE63299F3 for ; Mon, 27 Aug 2018 12:28:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7C30D29A1A; Mon, 27 Aug 2018 12:28:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E8F2A29A0D for ; Mon, 27 Aug 2018 12:28:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 181656E218; Mon, 27 Aug 2018 12:28:57 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from lb1-smtp-cloud9.xs4all.net (lb1-smtp-cloud9.xs4all.net [194.109.24.22]) by gabe.freedesktop.org (Postfix) with ESMTPS id 498C66E218 for ; Mon, 27 Aug 2018 12:28:55 +0000 (UTC) Received: from [IPv6:2001:983:e9a7:1:8960:b49d:3b62:6d25] ([IPv6:2001:983:e9a7:1:8960:b49d:3b62:6d25]) by smtp-cloud9.xs4all.net with ESMTPA id uGdWfUWYAEJtcuGdXfn8EX; Mon, 27 Aug 2018 14:28:53 +0200 To: Linux Media Mailing List , "dri-devel@lists.freedesktop.org" From: Hans Verkuil Subject: [PATCH] drm/i2c/tda9950.c: set MAX_RETRIES for errors only Message-ID: <6109476a-e8fa-6d82-3ed8-3833f0f18615@xs4all.nl> Date: Mon, 27 Aug 2018 14:28:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 Content-Language: en-US X-CMAE-Envelope: MS4wfJ3viJnkXkBWeSH1wsSMPZP62tu5f9mp6gM9FGX1xN3AvjOk3wulDRLdWPd2ColAFBBYJWCtCaWqHsUL8U4pw+zikhsPuvTNLtmTR55KMS+X2KgKTdAb bThNnHzgAIDXaFQ04obS6RWGEvyHJ335EomUdeSO1iRuzSHV3UaEqQlyRWMofcBTcf0kAJddxoJpA8nefVBT/+BrAB/daFMVi1uPAcm4UobuwxDg4LYbaCTB ZDyNKZf4ySubm1Ju8DvTu1MEmw5/qu3JO0/l4SjvgwEzSGHr5uuWYN9GvaLzxepgp5yEvj1HrjJgqnOICcHeqwnQqChHDd5VnS0Sgy9Vv3KFHeQRXyH9ndVQ 3p3G/VYK X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Russell King - ARM Linux Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The CEC_TX_STATUS_MAX_RETRIES should be set for errors only to prevent the CEC framework from retrying the transmit. If the transmit was successful, then don't set this flag. Found by running 'cec-compliance -A' on a beaglebone box. Signed-off-by: Hans Verkuil Reviewed-by: Gustavo Padovan Acked-by: Daniel Vetter for stuffing right away --- drivers/gpu/drm/i2c/tda9950.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i2c/tda9950.c b/drivers/gpu/drm/i2c/tda9950.c index 5d2f0d548469..4a14fc3b5011 100644 --- a/drivers/gpu/drm/i2c/tda9950.c +++ b/drivers/gpu/drm/i2c/tda9950.c @@ -191,7 +191,8 @@ static irqreturn_t tda9950_irq(int irq, void *data) break; } /* TDA9950 executes all retries for us */ - tx_status |= CEC_TX_STATUS_MAX_RETRIES; + if (tx_status != CEC_TX_STATUS_OK) + tx_status |= CEC_TX_STATUS_MAX_RETRIES; cec_transmit_done(priv->adap, tx_status, arb_lost_cnt, nack_cnt, 0, err_cnt); break;