Linux Renesas SOC kernel development
 help / color / mirror / Atom feed
* [PATCH] media: adv748x: Don't disable CSI-2 on link_setup
@ 2019-03-06 11:26 Jacopo Mondi
  2019-03-06 19:15 ` Laurent Pinchart
  0 siblings, 1 reply; 8+ messages in thread
From: Jacopo Mondi @ 2019-03-06 11:26 UTC (permalink / raw)
  To: laurent.pinchart, niklas.soderlund+renesas, kieran.bingham
  Cc: Jacopo Mondi, linux-media, linux-renesas-soc

When both the media links between AFE and HDMI and the two TX CSI-2 outputs
gets disabled, the routing register ADV748X_IO_10 gets zeroed causing both
TXA and TXB output to get disabled.

This causes some HDMI transmitters to stop working after both AFE and
HDMI links are disabled. Fix this by preventing writing 0 to
ADV748X_IO_10 register, which gets only updated when links are enabled
again.

Fixes: 9423ca350df7 ("media: adv748x: Implement TX link_setup callback")
Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
---
The issue presents itself only on some HDMI transmitters, and went unnoticed
during the development of:
"[PATCH v3 0/6] media: adv748x: Implement dynamic routing support"

Patch intended to be applied on top of latest media-master, where the
"[PATCH v3 0/6] media: adv748x: Implement dynamic routing support"
series is applied.

The patch reports a "Fixes" tag, but should actually be merged with the above
mentioned series.

Thanks
   j
---
 drivers/media/i2c/adv748x/adv748x-core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/media/i2c/adv748x/adv748x-core.c b/drivers/media/i2c/adv748x/adv748x-core.c
index f57cd77a32fa..0e5a75eb6d75 100644
--- a/drivers/media/i2c/adv748x/adv748x-core.c
+++ b/drivers/media/i2c/adv748x/adv748x-core.c
@@ -354,6 +354,9 @@ static int adv748x_link_setup(struct media_entity *entity,

 	tx->src = enable ? rsd : NULL;

+	if (!enable)
+		return 0;
+
 	if (state->afe.tx) {
 		/* AFE Requires TXA enabled, even when output to TXB */
 		io10 |= ADV748X_IO_10_CSI4_EN;
--
2.20.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-03-11 14:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-06 11:26 [PATCH] media: adv748x: Don't disable CSI-2 on link_setup Jacopo Mondi
2019-03-06 19:15 ` Laurent Pinchart
2019-03-07 10:35   ` Jacopo Mondi
2019-03-07 11:25     ` Ian Arkver
2019-03-08 11:29     ` Laurent Pinchart
2019-03-08 13:12       ` Jacopo Mondi
2019-03-11 14:05         ` Hans Verkuil
2019-03-11 14:32           ` Jacopo Mondi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox