Lines Matching defs:hdcp

31 #include "hdcp.h"
33 static inline enum mod_hdcp_status validate_bksv(struct mod_hdcp *hdcp)
38 memcpy(&n, hdcp->auth.msg.hdcp1.bksv, sizeof(uint64_t));
48 static inline enum mod_hdcp_status check_ksv_ready(struct mod_hdcp *hdcp)
50 if (is_dp_hdcp(hdcp))
51 return (hdcp->auth.msg.hdcp1.bstatus & DP_BSTATUS_READY) ?
54 return (hdcp->auth.msg.hdcp1.bcaps & DRM_HDCP_DDC_BCAPS_KSV_FIFO_READY) ?
59 static inline enum mod_hdcp_status check_hdcp_capable_dp(struct mod_hdcp *hdcp)
61 return (hdcp->auth.msg.hdcp1.bcaps & DP_BCAPS_HDCP_CAPABLE) ?
66 static inline enum mod_hdcp_status check_r0p_available_dp(struct mod_hdcp *hdcp)
69 if (is_dp_hdcp(hdcp)) {
70 status = (hdcp->auth.msg.hdcp1.bstatus &
81 struct mod_hdcp *hdcp)
83 return (hdcp->auth.msg.hdcp1.bstatus &
90 struct mod_hdcp *hdcp)
92 return (hdcp->auth.msg.hdcp1.bstatus & DP_BSTATUS_REAUTH_REQ) ?
97 static inline enum mod_hdcp_status check_no_max_cascade(struct mod_hdcp *hdcp)
101 if (is_dp_hdcp(hdcp))
102 status = DRM_HDCP_MAX_CASCADE_EXCEEDED(hdcp->auth.msg.hdcp1.binfo_dp >> 8)
106 status = DRM_HDCP_MAX_CASCADE_EXCEEDED(hdcp->auth.msg.hdcp1.bstatus >> 8)
112 static inline enum mod_hdcp_status check_no_max_devs(struct mod_hdcp *hdcp)
116 if (is_dp_hdcp(hdcp))
117 status = DRM_HDCP_MAX_DEVICE_EXCEEDED(hdcp->auth.msg.hdcp1.binfo_dp) ?
121 status = DRM_HDCP_MAX_DEVICE_EXCEEDED(hdcp->auth.msg.hdcp1.bstatus) ?
127 static inline uint8_t get_device_count(struct mod_hdcp *hdcp)
129 return is_dp_hdcp(hdcp) ?
130 DRM_HDCP_NUM_DOWNSTREAM(hdcp->auth.msg.hdcp1.binfo_dp) :
131 DRM_HDCP_NUM_DOWNSTREAM(hdcp->auth.msg.hdcp1.bstatus);
134 static inline enum mod_hdcp_status check_device_count(struct mod_hdcp *hdcp)
136 /* device count must be greater than or equal to tracked hdcp displays */
137 return (get_device_count(hdcp) < get_added_display_count(hdcp)) ?
142 static enum mod_hdcp_status wait_for_active_rx(struct mod_hdcp *hdcp,
155 hdcp, "bksv_read"))
159 hdcp, "bcaps_read"))
165 static enum mod_hdcp_status exchange_ksvs(struct mod_hdcp *hdcp,
178 hdcp, "add_topology"))
182 hdcp, "create_session"))
186 hdcp, "an_write"))
190 hdcp, "aksv_write"))
194 hdcp, "bksv_read"))
198 hdcp, "bksv_validation"))
200 if (hdcp->auth.msg.hdcp1.ainfo) {
203 hdcp, "ainfo_write"))
211 struct mod_hdcp *hdcp,
224 hdcp, "r0p_read"))
228 hdcp, "rx_validation"))
230 if (hdcp->connection.is_repeater) {
231 if (!hdcp->connection.link.adjust.hdcp1.postpone_encryption)
235 hdcp, "encryption"))
240 hdcp, "encryption"))
242 if (is_dp_mst_hdcp(hdcp))
246 hdcp, "stream_encryption_dp"))
253 static enum mod_hdcp_status authenticated(struct mod_hdcp *hdcp,
266 hdcp, "link_maintenance"))
272 static enum mod_hdcp_status wait_for_ready(struct mod_hdcp *hdcp,
285 if (is_dp_hdcp(hdcp)) {
288 hdcp, "bstatus_read"))
292 hdcp, "link_integrity_check"))
296 hdcp, "reauth_request_check"))
301 hdcp, "bcaps_read"))
306 hdcp, "ready_check"))
312 static enum mod_hdcp_status read_ksv_list(struct mod_hdcp *hdcp,
324 if (is_dp_hdcp(hdcp)) {
327 hdcp, "binfo_read_dp"))
332 hdcp, "bstatus_read"))
337 hdcp, "max_cascade_check"))
341 hdcp, "max_devs_check"))
345 hdcp, "device_count_check"))
347 device_count = get_device_count(hdcp);
348 hdcp->auth.msg.hdcp1.ksvlist_size = device_count*5;
351 hdcp, "ksvlist_read"))
355 hdcp, "vp_read"))
359 hdcp, "ksvlist_vp_validation"))
364 hdcp, "encryption"))
366 if (is_dp_mst_hdcp(hdcp))
370 hdcp, "stream_encryption_dp"))
376 static enum mod_hdcp_status determine_rx_hdcp_capable_dp(struct mod_hdcp *hdcp,
389 hdcp, "bcaps_read"))
393 hdcp, "hdcp_capable_dp"))
399 static enum mod_hdcp_status wait_for_r0_prime_dp(struct mod_hdcp *hdcp,
413 hdcp, "bstatus_read"))
417 hdcp, "r0p_available_dp"))
423 static enum mod_hdcp_status authenticated_dp(struct mod_hdcp *hdcp,
436 hdcp, "bstatus_read"))
440 hdcp, "link_integrity_check"))
444 hdcp, "reauth_request_check"))
452 enum mod_hdcp_status *status, struct mod_hdcp *hdcp, const char *str)
454 *status = func(hdcp);
456 HDCP_INPUT_PASS_TRACE(hdcp, str);
459 HDCP_INPUT_FAIL_TRACE(hdcp, str);
465 enum mod_hdcp_status mod_hdcp_hdcp1_execution(struct mod_hdcp *hdcp,
471 switch (current_state(hdcp)) {
473 status = wait_for_active_rx(hdcp, event_ctx, input);
476 status = exchange_ksvs(hdcp, event_ctx, input);
479 status = computations_validate_rx_test_for_repeater(hdcp,
483 status = authenticated(hdcp, event_ctx, input);
486 status = wait_for_ready(hdcp, event_ctx, input);
489 status = read_ksv_list(hdcp, event_ctx, input);
499 extern enum mod_hdcp_status mod_hdcp_hdcp1_dp_execution(struct mod_hdcp *hdcp,
505 switch (current_state(hdcp)) {
507 status = determine_rx_hdcp_capable_dp(hdcp, event_ctx, input);
510 status = exchange_ksvs(hdcp, event_ctx, input);
513 status = wait_for_r0_prime_dp(hdcp, event_ctx, input);
517 hdcp, event_ctx, input);
520 status = authenticated_dp(hdcp, event_ctx, input);
523 status = wait_for_ready(hdcp, event_ctx, input);
526 status = read_ksv_list(hdcp, event_ctx, input);