Lines Matching refs:hdcp

26 #include "hdcp.h"
28 static inline enum mod_hdcp_status validate_bksv(struct mod_hdcp *hdcp)
34 memcpy(bksv, hdcp->auth.msg.hdcp1.bksv, sizeof(hdcp->auth.msg.hdcp1.bksv));
45 static inline enum mod_hdcp_status check_ksv_ready(struct mod_hdcp *hdcp)
47 if (is_dp_hdcp(hdcp))
48 return (hdcp->auth.msg.hdcp1.bstatus & DP_BSTATUS_READY) ?
51 return (hdcp->auth.msg.hdcp1.bcaps & DRM_HDCP_DDC_BCAPS_KSV_FIFO_READY) ?
56 static inline enum mod_hdcp_status check_hdcp_capable_dp(struct mod_hdcp *hdcp)
58 return (hdcp->auth.msg.hdcp1.bcaps & DP_BCAPS_HDCP_CAPABLE) ?
63 static inline enum mod_hdcp_status check_r0p_available_dp(struct mod_hdcp *hdcp)
67 if (is_dp_hdcp(hdcp)) {
68 status = (hdcp->auth.msg.hdcp1.bstatus &
79 struct mod_hdcp *hdcp)
81 return (hdcp->auth.msg.hdcp1.bstatus &
88 struct mod_hdcp *hdcp)
90 return (hdcp->auth.msg.hdcp1.bstatus & DP_BSTATUS_REAUTH_REQ) ?
95 static inline enum mod_hdcp_status check_no_max_cascade(struct mod_hdcp *hdcp)
99 if (is_dp_hdcp(hdcp))
100 status = DRM_HDCP_MAX_CASCADE_EXCEEDED(hdcp->auth.msg.hdcp1.binfo_dp >> 8)
104 status = DRM_HDCP_MAX_CASCADE_EXCEEDED(hdcp->auth.msg.hdcp1.bstatus >> 8)
110 static inline enum mod_hdcp_status check_no_max_devs(struct mod_hdcp *hdcp)
114 if (is_dp_hdcp(hdcp))
115 status = DRM_HDCP_MAX_DEVICE_EXCEEDED(hdcp->auth.msg.hdcp1.binfo_dp) ?
119 status = DRM_HDCP_MAX_DEVICE_EXCEEDED(hdcp->auth.msg.hdcp1.bstatus) ?
125 static inline uint8_t get_device_count(struct mod_hdcp *hdcp)
127 return is_dp_hdcp(hdcp) ?
128 DRM_HDCP_NUM_DOWNSTREAM(hdcp->auth.msg.hdcp1.binfo_dp) :
129 DRM_HDCP_NUM_DOWNSTREAM(hdcp->auth.msg.hdcp1.bstatus);
132 static inline enum mod_hdcp_status check_device_count(struct mod_hdcp *hdcp)
135 if (get_device_count(hdcp) == 0)
140 * panel is possibly not included in DEVICE_COUNT) + get_device_count(hdcp).
141 * Device count must be greater than or equal to tracked hdcp displays.
143 return ((1 + get_device_count(hdcp)) < get_active_display_count(hdcp)) ?
148 static enum mod_hdcp_status wait_for_active_rx(struct mod_hdcp *hdcp,
161 hdcp, "bksv_read"))
165 hdcp, "bcaps_read"))
171 static enum mod_hdcp_status exchange_ksvs(struct mod_hdcp *hdcp,
184 hdcp, "create_session"))
188 hdcp, "an_write"))
192 hdcp, "aksv_write"))
196 hdcp, "bksv_read"))
200 hdcp, "bksv_validation"))
202 if (hdcp->auth.msg.hdcp1.ainfo) {
205 hdcp, "ainfo_write"))
213 struct mod_hdcp *hdcp,
226 hdcp, "r0p_read"))
230 hdcp, "rx_validation"))
232 if (hdcp->connection.is_repeater) {
233 if (!hdcp->connection.link.adjust.hdcp1.postpone_encryption)
237 hdcp, "encryption"))
242 hdcp, "encryption"))
244 if (is_dp_mst_hdcp(hdcp))
248 hdcp, "stream_encryption_dp"))
255 static enum mod_hdcp_status authenticated(struct mod_hdcp *hdcp,
268 hdcp, "link_maintenance");
273 static enum mod_hdcp_status wait_for_ready(struct mod_hdcp *hdcp,
286 if (is_dp_hdcp(hdcp)) {
289 hdcp, "bstatus_read"))
293 hdcp, "link_integrity_check"))
297 hdcp, "reauth_request_check"))
302 hdcp, "bcaps_read"))
307 hdcp, "ready_check"))
313 static enum mod_hdcp_status read_ksv_list(struct mod_hdcp *hdcp,
325 if (is_dp_hdcp(hdcp)) {
328 hdcp, "binfo_read_dp"))
333 hdcp, "bstatus_read"))
338 hdcp, "max_cascade_check"))
342 hdcp, "max_devs_check"))
346 hdcp, "device_count_check"))
348 device_count = get_device_count(hdcp);
349 hdcp->auth.msg.hdcp1.ksvlist_size = device_count*5;
352 hdcp, "ksvlist_read"))
356 hdcp, "vp_read"))
360 hdcp, "ksvlist_vp_validation"))
365 hdcp, "encryption"))
367 if (is_dp_mst_hdcp(hdcp))
371 hdcp, "stream_encryption_dp"))
377 static enum mod_hdcp_status determine_rx_hdcp_capable_dp(struct mod_hdcp *hdcp,
390 hdcp, "bcaps_read"))
394 hdcp, "hdcp_capable_dp"))
400 static enum mod_hdcp_status wait_for_r0_prime_dp(struct mod_hdcp *hdcp,
414 hdcp, "bstatus_read"))
418 hdcp, "r0p_available_dp"))
424 static enum mod_hdcp_status authenticated_dp(struct mod_hdcp *hdcp,
438 hdcp, "bstatus_read");
442 hdcp, "link_integrity_check");
446 hdcp, "reauth_request_check");
453 enum mod_hdcp_status *status, struct mod_hdcp *hdcp, char *str)
455 *status = func(hdcp);
457 HDCP_INPUT_PASS_TRACE(hdcp, str);
460 HDCP_INPUT_FAIL_TRACE(hdcp, str);
466 enum mod_hdcp_status mod_hdcp_hdcp1_execution(struct mod_hdcp *hdcp,
472 switch (current_state(hdcp)) {
474 status = wait_for_active_rx(hdcp, event_ctx, input);
477 status = exchange_ksvs(hdcp, event_ctx, input);
480 status = computations_validate_rx_test_for_repeater(hdcp,
484 status = authenticated(hdcp, event_ctx, input);
487 status = wait_for_ready(hdcp, event_ctx, input);
490 status = read_ksv_list(hdcp, event_ctx, input);
500 enum mod_hdcp_status mod_hdcp_hdcp1_dp_execution(struct mod_hdcp *hdcp,
506 switch (current_state(hdcp)) {
508 status = determine_rx_hdcp_capable_dp(hdcp, event_ctx, input);
511 status = exchange_ksvs(hdcp, event_ctx, input);
514 status = wait_for_r0_prime_dp(hdcp, event_ctx, input);
518 hdcp, event_ctx, input);
521 status = authenticated_dp(hdcp, event_ctx, input);
524 status = wait_for_ready(hdcp, event_ctx, input);
527 status = read_ksv_list(hdcp, event_ctx, input);