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>
Cc: Tomi Valkeinen <tomi.valkeinen@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 [thread overview]
Message-ID: <20190319104114.12077-2-tomi.valkeinen@ti.com> (raw)
In-Reply-To: <20190319104114.12077-1-tomi.valkeinen@ti.com>
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(-)
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;
}
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-03-19 10:42 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-19 10:40 [PATCH 00/21] drm/bridge: tc358767: DP support Tomi Valkeinen
2019-03-19 10:40 ` Tomi Valkeinen [this message]
2019-03-19 10:40 ` [PATCH 02/21] drm/bridge: tc358767: reset voltage-swing & pre-emphasis Tomi Valkeinen
2019-03-19 10:40 ` [PATCH 03/21] drm/bridge: tc358767: fix ansi 8b10b use Tomi Valkeinen
2019-03-19 10:40 ` [PATCH 04/21] drm/bridge: tc358767: cleanup spread & scrambler_dis Tomi Valkeinen
2019-03-19 10:40 ` [PATCH 05/21] drm/bridge: tc358767: remove unused swing & preemp Tomi Valkeinen
2019-03-19 10:40 ` [PATCH 06/21] drm/bridge: tc358767: cleanup aux_link_setup Tomi Valkeinen
2019-03-19 10:41 ` [PATCH 07/21] drm/bridge: tc358767: move video stream setup to tc_main_link_stream Tomi Valkeinen
2019-03-19 10:41 ` [PATCH 08/21] drm/bridge: tc358767: split stream enable/disable Tomi Valkeinen
2019-03-19 10:41 ` [PATCH 09/21] drm/bridge: tc358767: move PXL PLL enable/disable to " Tomi Valkeinen
2019-03-19 10:41 ` [PATCH 10/21] drm/bridge: tc358767: add link disable function Tomi Valkeinen
2019-03-19 10:41 ` [PATCH 11/21] drm/bridge: tc358767: ensure DP is disabled before LT Tomi Valkeinen
2019-03-19 10:41 ` [PATCH 12/21] drm/bridge: tc358767: remove unnecessary msleep Tomi Valkeinen
2019-03-19 10:41 ` [PATCH 13/21] drm/bridge: tc358767: use more reliable seq when finishing LT Tomi Valkeinen
2019-03-19 10:41 ` [PATCH 14/21] drm/bridge: tc358767: cleanup LT result check Tomi Valkeinen
2019-03-19 10:41 ` [PATCH 15/21] drm/bridge: tc358767: clean-up link training Tomi Valkeinen
2019-03-19 10:41 ` [PATCH 16/21] drm/bridge: tc358767: remove check for video mode in link enable Tomi Valkeinen
2019-03-19 10:41 ` [PATCH 17/21] drm/bridge: tc358767: use bridge mode_valid Tomi Valkeinen
2019-03-19 10:41 ` [PATCH 18/21] drm/bridge: tc358767: remove tc_connector_best_encoder Tomi Valkeinen
2019-03-19 10:41 ` [PATCH 19/21] drm/bridge: tc358767: copy the mode data, instead of storing the pointer Tomi Valkeinen
2019-03-19 10:41 ` [PATCH 20/21] drm/bridge: tc358767: add GPIO & interrupt registers Tomi Valkeinen
2019-03-19 10:41 ` [PATCH 21/21] drm/bridge: tc358767: implement naive HPD handling Tomi Valkeinen
2019-03-19 18:18 ` [21/21] " Andrey Smirnov
2019-03-20 5:55 ` Andrey Smirnov
2019-03-20 7:06 ` Tomi Valkeinen
2019-03-20 6:57 ` Tomi Valkeinen
2019-03-20 13:03 ` Tomi Valkeinen
2019-03-20 22:58 ` Andrey Smirnov
2019-03-21 13:12 ` Tomi Valkeinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190319104114.12077-2-tomi.valkeinen@ti.com \
--to=tomi.valkeinen@ti.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=a.hajda@samsung.com \
--cc=andrey.gusakov@cogentembedded.com \
--cc=bparrot@ti.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jsarha@ti.com \
--cc=l.stach@pengutronix.de \
--cc=p.zabel@pengutronix.de \
--cc=peter.ujfalusi@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).