From patchwork Wed Aug 24 13:00:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 12953502 X-Patchwork-Delegate: kieran@bingham.xyz Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6807AC32793 for ; Wed, 24 Aug 2022 13:00:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237810AbiHXNA5 (ORCPT ); Wed, 24 Aug 2022 09:00:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237973AbiHXNAz (ORCPT ); Wed, 24 Aug 2022 09:00:55 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B50F97B23 for ; Wed, 24 Aug 2022 06:00:53 -0700 (PDT) Received: from deskari.lan (91-158-154-79.elisa-laajakaista.fi [91.158.154.79]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 458924A8; Wed, 24 Aug 2022 15:00:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1661346051; bh=TZTLKT1X06XXta7ywfGo9pLibQ9+6k6tgSFdKbj6Mcg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gzegaz1a7UNVoNlGsaDh89PahgognU+VxfcXeO6pvEY+ozuCrfYYrnWseCYzLkOH8 3Oi4gQNUcCMDbY/h6P76CP3c7GYsf3LicAyNBRdzTEq/2lu48i1KZLNd+b2st5XtEV 1Q5jy/ssBkxb+HzvNjR1Tze625hzIiRwuKpwCVmA= From: Tomi Valkeinen To: Douglas Anderson , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Kieran Bingham , dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org Cc: Tomi Valkeinen Subject: [PATCH v5 1/4] drm/bridge: ti-sn65dsi86: check AUX errors better Date: Wed, 24 Aug 2022 16:00:31 +0300 Message-Id: <20220824130034.196041-2-tomi.valkeinen@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220824130034.196041-1-tomi.valkeinen@ideasonboard.com> References: <20220824130034.196041-1-tomi.valkeinen@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org From: Tomi Valkeinen The driver does not check AUX_IRQ_STATUS_NAT_I2C_FAIL bit at all when sending AUX transfers, which leads to the driver not returning an error. Add the check. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/bridge/ti-sn65dsi86.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c index 90bbabde1595..ba84215c1511 100644 --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c @@ -582,6 +582,11 @@ static ssize_t ti_sn_aux_transfer(struct drm_dp_aux *aux, goto exit; } + if (val & AUX_IRQ_STATUS_NAT_I2C_FAIL) { + ret = -EIO; + goto exit; + } + if (val & AUX_IRQ_STATUS_AUX_SHORT) { ret = regmap_read(pdata->regmap, SN_AUX_LENGTH_REG, &len); if (ret)