Lines Matching refs:hdcp

28 static inline enum mod_hdcp_status validate_bksv(struct mod_hdcp *hdcp)  in validate_bksv()  argument
34 memcpy(bksv, hdcp->auth.msg.hdcp1.bksv, sizeof(hdcp->auth.msg.hdcp1.bksv)); in validate_bksv()
45 static inline enum mod_hdcp_status check_ksv_ready(struct mod_hdcp *hdcp) in check_ksv_ready() argument
47 if (is_dp_hdcp(hdcp)) in check_ksv_ready()
48 return (hdcp->auth.msg.hdcp1.bstatus & DP_BSTATUS_READY) ? in check_ksv_ready()
51 return (hdcp->auth.msg.hdcp1.bcaps & DRM_HDCP_DDC_BCAPS_KSV_FIFO_READY) ? in check_ksv_ready()
56 static inline enum mod_hdcp_status check_hdcp_capable_dp(struct mod_hdcp *hdcp) in check_hdcp_capable_dp() argument
58 return (hdcp->auth.msg.hdcp1.bcaps & DP_BCAPS_HDCP_CAPABLE) ? in check_hdcp_capable_dp()
63 static inline enum mod_hdcp_status check_r0p_available_dp(struct mod_hdcp *hdcp) in check_r0p_available_dp() argument
66 if (is_dp_hdcp(hdcp)) { in check_r0p_available_dp()
67 status = (hdcp->auth.msg.hdcp1.bstatus & in check_r0p_available_dp()
78 struct mod_hdcp *hdcp) in check_link_integrity_dp() argument
80 return (hdcp->auth.msg.hdcp1.bstatus & in check_link_integrity_dp()
87 struct mod_hdcp *hdcp) in check_no_reauthentication_request_dp() argument
89 return (hdcp->auth.msg.hdcp1.bstatus & DP_BSTATUS_REAUTH_REQ) ? in check_no_reauthentication_request_dp()
94 static inline enum mod_hdcp_status check_no_max_cascade(struct mod_hdcp *hdcp) in check_no_max_cascade() argument
98 if (is_dp_hdcp(hdcp)) in check_no_max_cascade()
99 status = DRM_HDCP_MAX_CASCADE_EXCEEDED(hdcp->auth.msg.hdcp1.binfo_dp >> 8) in check_no_max_cascade()
103 status = DRM_HDCP_MAX_CASCADE_EXCEEDED(hdcp->auth.msg.hdcp1.bstatus >> 8) in check_no_max_cascade()
109 static inline enum mod_hdcp_status check_no_max_devs(struct mod_hdcp *hdcp) in check_no_max_devs() argument
113 if (is_dp_hdcp(hdcp)) in check_no_max_devs()
114 status = DRM_HDCP_MAX_DEVICE_EXCEEDED(hdcp->auth.msg.hdcp1.binfo_dp) ? in check_no_max_devs()
118 status = DRM_HDCP_MAX_DEVICE_EXCEEDED(hdcp->auth.msg.hdcp1.bstatus) ? in check_no_max_devs()
124 static inline uint8_t get_device_count(struct mod_hdcp *hdcp) in get_device_count() argument
126 return is_dp_hdcp(hdcp) ? in get_device_count()
127 DRM_HDCP_NUM_DOWNSTREAM(hdcp->auth.msg.hdcp1.binfo_dp) : in get_device_count()
128 DRM_HDCP_NUM_DOWNSTREAM(hdcp->auth.msg.hdcp1.bstatus); in get_device_count()
131 static inline enum mod_hdcp_status check_device_count(struct mod_hdcp *hdcp) in check_device_count() argument
134 if (0 == get_device_count(hdcp)) { in check_device_count()
143 return ((1 + get_device_count(hdcp)) < get_active_display_count(hdcp)) ? in check_device_count()
148 static enum mod_hdcp_status wait_for_active_rx(struct mod_hdcp *hdcp, in wait_for_active_rx() argument
161 hdcp, "bksv_read")) in wait_for_active_rx()
165 hdcp, "bcaps_read")) in wait_for_active_rx()
171 static enum mod_hdcp_status exchange_ksvs(struct mod_hdcp *hdcp, in exchange_ksvs() argument
184 hdcp, "create_session")) in exchange_ksvs()
188 hdcp, "an_write")) in exchange_ksvs()
192 hdcp, "aksv_write")) in exchange_ksvs()
196 hdcp, "bksv_read")) in exchange_ksvs()
200 hdcp, "bksv_validation")) in exchange_ksvs()
202 if (hdcp->auth.msg.hdcp1.ainfo) { in exchange_ksvs()
205 hdcp, "ainfo_write")) in exchange_ksvs()
213 struct mod_hdcp *hdcp, in computations_validate_rx_test_for_repeater() argument
226 hdcp, "r0p_read")) in computations_validate_rx_test_for_repeater()
230 hdcp, "rx_validation")) in computations_validate_rx_test_for_repeater()
232 if (hdcp->connection.is_repeater) { in computations_validate_rx_test_for_repeater()
233 if (!hdcp->connection.link.adjust.hdcp1.postpone_encryption) in computations_validate_rx_test_for_repeater()
237 hdcp, "encryption")) in computations_validate_rx_test_for_repeater()
242 hdcp, "encryption")) in computations_validate_rx_test_for_repeater()
244 if (is_dp_mst_hdcp(hdcp)) in computations_validate_rx_test_for_repeater()
248 hdcp, "stream_encryption_dp")) in computations_validate_rx_test_for_repeater()
255 static enum mod_hdcp_status authenticated(struct mod_hdcp *hdcp, in authenticated() argument
268 hdcp, "link_maintenance"); in authenticated()
273 static enum mod_hdcp_status wait_for_ready(struct mod_hdcp *hdcp, in wait_for_ready() argument
286 if (is_dp_hdcp(hdcp)) { in wait_for_ready()
289 hdcp, "bstatus_read")) in wait_for_ready()
293 hdcp, "link_integrity_check")) in wait_for_ready()
297 hdcp, "reauth_request_check")) in wait_for_ready()
302 hdcp, "bcaps_read")) in wait_for_ready()
307 hdcp, "ready_check")) in wait_for_ready()
313 static enum mod_hdcp_status read_ksv_list(struct mod_hdcp *hdcp, in read_ksv_list() argument
325 if (is_dp_hdcp(hdcp)) { in read_ksv_list()
328 hdcp, "binfo_read_dp")) in read_ksv_list()
333 hdcp, "bstatus_read")) in read_ksv_list()
338 hdcp, "max_cascade_check")) in read_ksv_list()
342 hdcp, "max_devs_check")) in read_ksv_list()
346 hdcp, "device_count_check")) in read_ksv_list()
348 device_count = get_device_count(hdcp); in read_ksv_list()
349 hdcp->auth.msg.hdcp1.ksvlist_size = device_count*5; in read_ksv_list()
352 hdcp, "ksvlist_read")) in read_ksv_list()
356 hdcp, "vp_read")) in read_ksv_list()
360 hdcp, "ksvlist_vp_validation")) in read_ksv_list()
365 hdcp, "encryption")) in read_ksv_list()
367 if (is_dp_mst_hdcp(hdcp)) in read_ksv_list()
371 hdcp, "stream_encryption_dp")) in read_ksv_list()
377 static enum mod_hdcp_status determine_rx_hdcp_capable_dp(struct mod_hdcp *hdcp, in determine_rx_hdcp_capable_dp() argument
390 hdcp, "bcaps_read")) in determine_rx_hdcp_capable_dp()
394 hdcp, "hdcp_capable_dp")) in determine_rx_hdcp_capable_dp()
400 static enum mod_hdcp_status wait_for_r0_prime_dp(struct mod_hdcp *hdcp, in wait_for_r0_prime_dp() argument
414 hdcp, "bstatus_read")) in wait_for_r0_prime_dp()
418 hdcp, "r0p_available_dp")) in wait_for_r0_prime_dp()
424 static enum mod_hdcp_status authenticated_dp(struct mod_hdcp *hdcp, in authenticated_dp() argument
438 hdcp, "bstatus_read"); in authenticated_dp()
442 hdcp, "link_integrity_check"); in authenticated_dp()
446 hdcp, "reauth_request_check"); in authenticated_dp()
453 enum mod_hdcp_status *status, struct mod_hdcp *hdcp, char *str) in mod_hdcp_execute_and_set() argument
455 *status = func(hdcp); in mod_hdcp_execute_and_set()
457 HDCP_INPUT_PASS_TRACE(hdcp, str); in mod_hdcp_execute_and_set()
460 HDCP_INPUT_FAIL_TRACE(hdcp, str); in mod_hdcp_execute_and_set()
466 enum mod_hdcp_status mod_hdcp_hdcp1_execution(struct mod_hdcp *hdcp, in mod_hdcp_hdcp1_execution() argument
472 switch (current_state(hdcp)) { in mod_hdcp_hdcp1_execution()
474 status = wait_for_active_rx(hdcp, event_ctx, input); in mod_hdcp_hdcp1_execution()
477 status = exchange_ksvs(hdcp, event_ctx, input); in mod_hdcp_hdcp1_execution()
480 status = computations_validate_rx_test_for_repeater(hdcp, in mod_hdcp_hdcp1_execution()
484 status = authenticated(hdcp, event_ctx, input); in mod_hdcp_hdcp1_execution()
487 status = wait_for_ready(hdcp, event_ctx, input); in mod_hdcp_hdcp1_execution()
490 status = read_ksv_list(hdcp, event_ctx, input); in mod_hdcp_hdcp1_execution()
500 enum mod_hdcp_status mod_hdcp_hdcp1_dp_execution(struct mod_hdcp *hdcp, in mod_hdcp_hdcp1_dp_execution() argument
506 switch (current_state(hdcp)) { in mod_hdcp_hdcp1_dp_execution()
508 status = determine_rx_hdcp_capable_dp(hdcp, event_ctx, input); in mod_hdcp_hdcp1_dp_execution()
511 status = exchange_ksvs(hdcp, event_ctx, input); in mod_hdcp_hdcp1_dp_execution()
514 status = wait_for_r0_prime_dp(hdcp, event_ctx, input); in mod_hdcp_hdcp1_dp_execution()
518 hdcp, event_ctx, input); in mod_hdcp_hdcp1_dp_execution()
521 status = authenticated_dp(hdcp, event_ctx, input); in mod_hdcp_hdcp1_dp_execution()
524 status = wait_for_ready(hdcp, event_ctx, input); in mod_hdcp_hdcp1_dp_execution()
527 status = read_ksv_list(hdcp, event_ctx, input); in mod_hdcp_hdcp1_dp_execution()