[PATCH] media: adv748x: Don't disable CSI-2 on link_setup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
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




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux