#ifndef HDCP_H_
#define HDCP_H_
#include "mod_hdcp.h"
#include "hdcp_log.h"
#include <drm/display/drm_dp_helper.h>
#include <drm/display/drm_hdcp_helper.h>
enum mod_hdcp_trans_input_result { … };
struct mod_hdcp_transition_input_hdcp1 { … };
struct mod_hdcp_transition_input_hdcp2 { … };
mod_hdcp_transition_input;
struct mod_hdcp_message_hdcp1 { … };
struct mod_hdcp_message_hdcp2 { … };
mod_hdcp_message;
struct mod_hdcp_auth_counters { … };
struct mod_hdcp_connection { … };
struct mod_hdcp_authentication { … };
struct mod_hdcp_state { … };
struct mod_hdcp_event_context { … };
struct mod_hdcp { … };
enum mod_hdcp_initial_state_id { … };
enum mod_hdcp_hdcp1_state_id { … };
enum mod_hdcp_hdcp1_dp_state_id { … };
enum mod_hdcp_hdcp2_state_id { … };
enum mod_hdcp_hdcp2_dp_state_id { … };
mod_hdcp_action;
uint8_t mod_hdcp_execute_and_set(
mod_hdcp_action func, uint8_t *flag,
enum mod_hdcp_status *status, struct mod_hdcp *hdcp, char *str);
enum mod_hdcp_status mod_hdcp_hdcp1_execution(struct mod_hdcp *hdcp,
struct mod_hdcp_event_context *event_ctx,
struct mod_hdcp_transition_input_hdcp1 *input);
enum mod_hdcp_status mod_hdcp_hdcp1_dp_execution(struct mod_hdcp *hdcp,
struct mod_hdcp_event_context *event_ctx,
struct mod_hdcp_transition_input_hdcp1 *input);
enum mod_hdcp_status mod_hdcp_hdcp1_transition(struct mod_hdcp *hdcp,
struct mod_hdcp_event_context *event_ctx,
struct mod_hdcp_transition_input_hdcp1 *input,
struct mod_hdcp_output *output);
enum mod_hdcp_status mod_hdcp_hdcp1_dp_transition(struct mod_hdcp *hdcp,
struct mod_hdcp_event_context *event_ctx,
struct mod_hdcp_transition_input_hdcp1 *input,
struct mod_hdcp_output *output);
enum mod_hdcp_status mod_hdcp_hdcp2_execution(struct mod_hdcp *hdcp,
struct mod_hdcp_event_context *event_ctx,
struct mod_hdcp_transition_input_hdcp2 *input);
enum mod_hdcp_status mod_hdcp_hdcp2_dp_execution(struct mod_hdcp *hdcp,
struct mod_hdcp_event_context *event_ctx,
struct mod_hdcp_transition_input_hdcp2 *input);
enum mod_hdcp_status mod_hdcp_hdcp2_transition(struct mod_hdcp *hdcp,
struct mod_hdcp_event_context *event_ctx,
struct mod_hdcp_transition_input_hdcp2 *input,
struct mod_hdcp_output *output);
enum mod_hdcp_status mod_hdcp_hdcp2_dp_transition(struct mod_hdcp *hdcp,
struct mod_hdcp_event_context *event_ctx,
struct mod_hdcp_transition_input_hdcp2 *input,
struct mod_hdcp_output *output);
void mod_hdcp_dump_binary_message(uint8_t *msg, uint32_t msg_size,
uint8_t *buf, uint32_t buf_size);
void mod_hdcp_log_ddc_trace(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_add_display_to_topology(
struct mod_hdcp *hdcp, struct mod_hdcp_display *display);
enum mod_hdcp_status mod_hdcp_remove_display_from_topology(
struct mod_hdcp *hdcp, uint8_t index);
enum mod_hdcp_status mod_hdcp_hdcp1_create_session(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_hdcp1_destroy_session(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_hdcp1_validate_rx(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_hdcp1_enable_encryption(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_hdcp1_validate_ksvlist_vp(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_hdcp1_enable_dp_stream_encryption(
struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_hdcp1_link_maintenance(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_hdcp2_create_session(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_hdcp2_destroy_session(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_hdcp2_prepare_ake_init(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_hdcp2_validate_ake_cert(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_hdcp2_validate_h_prime(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_hdcp2_prepare_lc_init(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_hdcp2_validate_l_prime(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_hdcp2_prepare_eks(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_hdcp2_enable_encryption(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_hdcp2_validate_rx_id_list(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_hdcp2_enable_dp_stream_encryption(
struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_hdcp2_prepare_stream_management(
struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_hdcp2_validate_stream_ready(
struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_read_bksv(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_read_bcaps(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_read_bstatus(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_read_r0p(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_read_ksvlist(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_read_vp(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_read_binfo(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_write_aksv(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_write_ainfo(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_write_an(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_read_hdcp2version(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_read_rxcaps(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_read_rxstatus(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_read_ake_cert(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_read_h_prime(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_read_pairing_info(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_read_l_prime(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_read_rx_id_list(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_read_stream_ready(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_write_ake_init(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_write_no_stored_km(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_write_stored_km(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_write_lc_init(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_write_eks(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_write_repeater_auth_ack(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_write_stream_manage(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_write_content_type(struct mod_hdcp *hdcp);
enum mod_hdcp_status mod_hdcp_clear_cp_irq_status(struct mod_hdcp *hdcp);
static inline uint8_t is_dp_hdcp(struct mod_hdcp *hdcp)
{ … }
static inline uint8_t is_dp_mst_hdcp(struct mod_hdcp *hdcp)
{ … }
static inline uint8_t is_hdmi_dvi_sl_hdcp(struct mod_hdcp *hdcp)
{ … }
static inline uint8_t current_state(struct mod_hdcp *hdcp)
{ … }
static inline void set_state_id(struct mod_hdcp *hdcp,
struct mod_hdcp_output *output, uint8_t id)
{ … }
static inline uint8_t is_in_hdcp1_states(struct mod_hdcp *hdcp)
{ … }
static inline uint8_t is_in_hdcp1_dp_states(struct mod_hdcp *hdcp)
{ … }
static inline uint8_t is_in_hdcp2_states(struct mod_hdcp *hdcp)
{ … }
static inline uint8_t is_in_hdcp2_dp_states(struct mod_hdcp *hdcp)
{ … }
static inline uint8_t is_in_authenticated_states(struct mod_hdcp *hdcp)
{ … }
static inline uint8_t is_hdcp1(struct mod_hdcp *hdcp)
{ … }
static inline uint8_t is_hdcp2(struct mod_hdcp *hdcp)
{ … }
static inline uint8_t is_in_cp_not_desired_state(struct mod_hdcp *hdcp)
{ … }
static inline uint8_t is_in_initialized_state(struct mod_hdcp *hdcp)
{ … }
static inline void increment_stay_counter(struct mod_hdcp *hdcp)
{ … }
static inline void fail_and_restart_in_ms(uint16_t time,
enum mod_hdcp_status *status,
struct mod_hdcp_output *output)
{ … }
static inline void callback_in_ms(uint16_t time, struct mod_hdcp_output *output)
{ … }
static inline void set_watchdog_in_ms(struct mod_hdcp *hdcp, uint16_t time,
struct mod_hdcp_output *output)
{ … }
static inline void set_auth_complete(struct mod_hdcp *hdcp,
struct mod_hdcp_output *output)
{ … }
static inline uint8_t is_display_active(struct mod_hdcp_display *display)
{ … }
static inline uint8_t is_display_encryption_enabled(struct mod_hdcp_display *display)
{ … }
static inline uint8_t get_active_display_count(struct mod_hdcp *hdcp)
{ … }
static inline struct mod_hdcp_display *get_first_active_display(
struct mod_hdcp *hdcp)
{ … }
static inline struct mod_hdcp_display *get_active_display_at_index(
struct mod_hdcp *hdcp, uint8_t index)
{ … }
static inline struct mod_hdcp_display *get_empty_display_container(
struct mod_hdcp *hdcp)
{ … }
static inline void reset_retry_counts(struct mod_hdcp *hdcp)
{ … }
#endif