OSDN Git Service

drm/msm: fix zero device count HDCP repeater test cases
authorAbhinav Kumar <abhinavk@codeaurora.org>
Tue, 12 Sep 2017 05:27:27 +0000 (22:27 -0700)
committerGerrit - the friendly Code Review server <code-review@localhost>
Mon, 25 Sep 2017 16:42:36 +0000 (09:42 -0700)
Fix the handling of HDCP repeaters to mark part II
of the authentication as failure if they do not have
any devices connected to them.

Change-Id: I6b21ed2ce9a280f7e200404b05d111508a6d3dd8
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
drivers/gpu/drm/msm/sde_hdcp_1x.c

index d08cf13..c2d29a0 100644 (file)
@@ -1201,9 +1201,16 @@ static int sde_hdcp_1x_authentication_part2(struct sde_hdcp_1x *hdcp)
                if (rc)
                        goto error;
 
-               /* do not proceed further if no device connected */
-               if (!hdcp->current_tp.dev_count)
+               /*
+                * Do not proceed further if no device connected
+                * If no downstream devices are attached to the repeater
+                * then part II fails.
+                */
+
+               if (!hdcp->current_tp.dev_count) {
+                       rc = -EINVAL;
                        goto error;
+               }
 
                rc = sde_hdcp_1x_write_ksv_fifo(hdcp);
        } while (--v_retry && rc);