Message ID | 20190319104114.12077-2-tomi.valkeinen@ti.com |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp3711531jad; Tue, 19 Mar 2019 03:42:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqztJe27O+mGYS3072xU0SNfG4nYC46FX44UGFxJfBJs4ZuJE3V8PNmeWPrWneUG+9d63ei7 X-Received: by 2002:a63:db07:: with SMTP id e7mr589263pgg.231.1552992133951; Tue, 19 Mar 2019 03:42:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552992133; cv=none; d=google.com; s=arc-20160816; b=B3Ab0vL+tHwvJ5mZQjrNpCgwauRLM9rrlmWR8BggXzUdyiNg8GJvhXpfE5oizeIjb9 PaF+5M+tX9SThIVNaV6IHdN43ecV1dWqYJuPPy6JaPnHQIRxWpb6G3dqErdgvtj9q5Ds LSUkrPRmgwhUNw//3C79i3muoTYne0YuYAGy7ITCx1VPGZTVO7YKzwWYmDZlBxA9/XyH 0j0Lt7dLLIr8f3rSVkKhIDwZDRRNjeoSQTCpeBegqto+3STKAcMpLnrwej3WoVlkvZQk zAvTkDtAJjxh3Iog8AdbyMJP3hapRujq6RkDbZI7nux5V1LbRMy37f34ctY57f4tB5aJ 7F1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:delivered-to; bh=WqyVrv84AFbIBLfEWD5/0enlT7dcqxDFuAC6h53RpSo=; b=iitzwOYM8w2J7TUCjOnZIc/5qe98MFiVep92cT4RKEtaeZAwTaJ2Mfwx2LY1lRSRbR RgqCpux0cgWsMQkqos3n6iSErLgn+vKOCuaQ+N334xDUnIKk+y/bFrnVA2/w8yoUxrb0 gD0DLid1yFpbqU8MnsrjuRDodlpAbuyNpxvH+uqvjSJ9Utg/Dsmos9e3P2zL6IUhANR8 8EtCV5af5f0U9lLlxpxvHC8+O8IoV2E4nvm8jOZ/0pPnsTdxuyWdfHHNmioYJWFh7oU4 WNPUci36f4b8lTkq9jSxoSMtdY1bmqmTgffWGj+QMOUdKLw/Ga8NtT5JLWKjnDfzg9Wr MRLg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: <dri-devel-bounces@lists.freedesktop.org> Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id m2si11553132pgn.481.2019.03.19.03.42.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Mar 2019 03:42:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 66C3789385; Tue, 19 Mar 2019 10:42:11 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3998789385 for <dri-devel@lists.freedesktop.org>; Tue, 19 Mar 2019 10:42:10 +0000 (UTC) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x2JAg4dZ051237; Tue, 19 Mar 2019 05:42:04 -0500 Received: from DFLE109.ent.ti.com (dfle109.ent.ti.com [10.64.6.30]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x2JAg4tH113880 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 19 Mar 2019 05:42:04 -0500 Received: from DFLE106.ent.ti.com (10.64.6.27) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 19 Mar 2019 05:42:04 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1713.5 via Frontend Transport; Tue, 19 Mar 2019 05:42:04 -0500 Received: from deskari.lan (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id x2JAfxlK019091; Tue, 19 Mar 2019 05:42:02 -0500 From: Tomi Valkeinen <tomi.valkeinen@ti.com> To: Andrzej Hajda <a.hajda@samsung.com>, Laurent Pinchart <Laurent.pinchart@ideasonboard.com>, <dri-devel@lists.freedesktop.org>, Lucas Stach <l.stach@pengutronix.de>, Andrey Gusakov <andrey.gusakov@cogentembedded.com>, Philipp Zabel <p.zabel@pengutronix.de>, Jyri Sarha <jsarha@ti.com>, Peter Ujfalusi <peter.ujfalusi@ti.com>, Benoit Parrot <bparrot@ti.com> Subject: [PATCH 01/21] drm/bridge: tc358767: fix tc_aux_get_status error handling Date: Tue, 19 Mar 2019 12:40:54 +0200 Message-ID: <20190319104114.12077-2-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190319104114.12077-1-tomi.valkeinen@ti.com> References: <20190319104114.12077-1-tomi.valkeinen@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1552992124; bh=KpmV4wsUtpZXmBy1gNs1XdBpmyEcmJ2GQvQUmMElCDg=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=fS4x2xwXQyagu8lEx7W7Maqq0ZOrE2S8xIrPnEjDE3aGhPWSjjowdJVYpFZcbNmzx Fasy1FGPn08EjtevF+LoevuZSsj2dXMFHTW+ojMxvsE/YZkWgRbXLohhirx1FgSJYg gS9BjQC04vI/4FWGGqTgH7a2nX/9GxUfSl495MxY= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> |
Series |
drm/bridge: tc358767: DP support
|
expand
|
diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index 888980d4bc74..7031c4f52c57 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -286,14 +286,17 @@ static int tc_aux_get_status(struct tc_data *tc, u8 *reply) ret = regmap_read(tc->regmap, DP0_AUXSTATUS, &value); if (ret < 0) return ret; + if (value & AUX_BUSY) { - if (value & AUX_TIMEOUT) { - dev_err(tc->dev, "i2c access timeout!\n"); - return -ETIMEDOUT; - } + dev_err(tc->dev, "aux busy!\n"); return -EBUSY; } + if (value & AUX_TIMEOUT) { + dev_err(tc->dev, "aux access timeout!\n"); + return -ETIMEDOUT; + } + *reply = (value & AUX_STATUS_MASK) >> AUX_STATUS_SHIFT; return 0; }
tc_aux_get_status() does not report AUX_TIMEOUT correctly, as it only checks the AUX_TIMEOUT if aux is still busy. Fix this by always checking for AUX_TIMEOUT. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> --- drivers/gpu/drm/bridge/tc358767.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)