Skip to contentSkip to conversation

drm/bridge: anx7625: Set downstream sink into normal status

PATCH Superseded Xin Ji 2 participants 4 messages Mar 2, 2022 – Mar 22, 2022

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Xin Ji

author
#0 lore raw

PATCH 1/1 drm/bridge: anx7625: Set downstream sink into normal status

As downstream sink was set into standby mode while bridge disabled, this patch used for setting downstream sink into normal status while enable bridge.

---
 drivers/gpu/drm/bridge/analogix/anx7625.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/gpu/drm/bridge/analogix/anx7625.c +8 -0
index 9aab879a8851..963eaf73ecab 100644
@@ -919,12 +919,20 @@ static void anx7625_dp_start(struct anx7625_data *ctx)
 {
 	int ret;
 	struct device *dev = &ctx->client->dev;
+	u8 data;
 
 	if (!ctx->display_timing_valid) {
 		DRM_DEV_ERROR(dev, "mipi not set display timing yet.\n");
 		return;
 	}
 
+	dev_info(dev, "set downstream sink into normal\n");
+	/* Downstream sink enter into normal mode */
+	data = 1;
+	ret = anx7625_aux_trans(ctx, DP_AUX_NATIVE_WRITE, 0x000600, 1, &data);
+	if (ret < 0)
+		dev_err(dev, "IO error : set sink into normal mode fail\n");
+
 	/* Disable HDCP */
 	anx7625_write_and(ctx, ctx->i2c.rx_p1_client, 0xee, 0x9f);
 
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 35 lines · Xin Ji

As downstream sink was set into standby mode while bridge disabled, this patch used for setting downstream sink into normal status while enable bridge.

---
 drivers/gpu/drm/bridge/analogix/anx7625.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/gpu/drm/bridge/analogix/anx7625.c +8 -0
index 9aab879a8851..963eaf73ecab 100644
@@ -919,12 +919,20 @@ static void anx7625_dp_start(struct anx7625_data *ctx)
 {
        int ret;
        struct device *dev = &ctx->client->dev;
+       u8 data;
 
        if (!ctx->display_timing_valid) {
                DRM_DEV_ERROR(dev, "mipi not set display timing yet.\n");
                return;
        }
 
+       dev_info(dev, "set downstream sink into normal\n");
+       /* Downstream sink enter into normal mode */
+       data = 1;
+       ret = anx7625_aux_trans(ctx, DP_AUX_NATIVE_WRITE, 0x000600, 1, &data);
+       if (ret < 0)
+               dev_err(dev, "IO error : set sink into normal mode fail\n");
+
        /* Disable HDCP */
        anx7625_write_and(ctx, ctx->i2c.rx_p1_client, 0xee, 0x9f);
 
#2 lore raw

Hi Xin,

Can we use dev_dbg instead of dev_info for the logging?

The log here is more like a debugging message, and using dev_dbg makes it consistent with anx7625_dp_stop.

Sorry for not catching this earlier.

Best regards,
Pin-yen

Quoted 40 lines · Pin-yen Lin
Quoted 35 lines · Xin Ji

As downstream sink was set into standby mode while bridge disabled, this patch used for setting downstream sink into normal status while enable bridge.

---
 drivers/gpu/drm/bridge/analogix/anx7625.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/gpu/drm/bridge/analogix/anx7625.c +8 -0
index 9aab879a8851..963eaf73ecab 100644
@@ -919,12 +919,20 @@ static void anx7625_dp_start(struct anx7625_data *ctx)
 {
        int ret;
        struct device *dev = &ctx->client->dev;
+       u8 data;
 
        if (!ctx->display_timing_valid) {
                DRM_DEV_ERROR(dev, "mipi not set display timing yet.\n");
                return;
        }
 
+       dev_info(dev, "set downstream sink into normal\n");
+       /* Downstream sink enter into normal mode */
+       data = 1;
+       ret = anx7625_aux_trans(ctx, DP_AUX_NATIVE_WRITE, 0x000600, 1, &data);
+       if (ret < 0)
+               dev_err(dev, "IO error : set sink into normal mode fail\n");
+
        /* Disable HDCP */
        anx7625_write_and(ctx, ctx->i2c.rx_p1_client, 0xee, 0x9f);
 
author
#3 lore raw
Quoted 11 lines · Pin-yen Lin

Hi Xin,

Can we use dev_dbg instead of dev_info for the logging?

The log here is more like a debugging message, and using dev_dbg makes it consistent with anx7625_dp_stop.

Sorry for not catching this earlier.

Best regards,
Pin-yen

Hi Pin-yen, OK, I'll change it in next version.
Thanks,
Xin

Quoted 42 lines · Pin-yen Lin
Quoted 40 lines
Quoted 35 lines · Xin Ji

As downstream sink was set into standby mode while bridge disabled, this patch used for setting downstream sink into normal status while enable bridge.

---
 drivers/gpu/drm/bridge/analogix/anx7625.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/gpu/drm/bridge/analogix/anx7625.c +8 -0
index 9aab879a8851..963eaf73ecab 100644
@@ -919,12 +919,20 @@ static void anx7625_dp_start(struct anx7625_data *ctx)
 {
        int ret;
        struct device *dev = &ctx->client->dev;
+       u8 data;
 
        if (!ctx->display_timing_valid) {
                DRM_DEV_ERROR(dev, "mipi not set display timing yet.\n");
                return;
        }
 
+       dev_info(dev, "set downstream sink into normal\n");
+       /* Downstream sink enter into normal mode */
+       data = 1;
+       ret = anx7625_aux_trans(ctx, DP_AUX_NATIVE_WRITE, 0x000600, 1, &data);
+       if (ret < 0)
+               dev_err(dev, "IO error : set sink into normal mode fail\n");
+
        /* Disable HDCP */
        anx7625_write_and(ctx, ctx->i2c.rx_p1_client, 0xee, 0x9f);