1 /* SPDX-License-Identifier: MIT */ 2 /* 3 * Copyright © 2023 Intel Corporation 4 */ 5 6 #ifndef __INTEL_HDCP_GSC_MESSAGE_H__ 7 #define __INTEL_HDCP_GSC_MESSAGE_H__ 8 9 #include <linux/types.h> 10 11 struct device; 12 struct drm_i915_private; 13 struct hdcp_port_data; 14 struct hdcp2_ake_init; 15 struct hdcp2_ake_send_cert; 16 struct hdcp2_ake_no_stored_km; 17 struct hdcp2_ake_send_hprime; 18 struct hdcp2_ake_send_pairing_info; 19 struct hdcp2_lc_init; 20 struct hdcp2_lc_send_lprime; 21 struct hdcp2_ske_send_eks; 22 struct hdcp2_rep_send_receiverid_list; 23 struct hdcp2_rep_send_ack; 24 struct hdcp2_rep_stream_ready; 25 struct intel_display; 26 27 ssize_t intel_hdcp_gsc_msg_send(struct drm_i915_private *i915, u8 *msg_in, 28 size_t msg_in_len, u8 *msg_out, 29 size_t msg_out_len); 30 bool intel_hdcp_gsc_check_status(struct intel_display *display); 31 int 32 intel_hdcp_gsc_initiate_session(struct device *dev, struct hdcp_port_data *data, 33 struct hdcp2_ake_init *ake_data); 34 int 35 intel_hdcp_gsc_verify_receiver_cert_prepare_km(struct device *dev, 36 struct hdcp_port_data *data, 37 struct hdcp2_ake_send_cert *rx_cert, 38 bool *km_stored, 39 struct hdcp2_ake_no_stored_km 40 *ek_pub_km, 41 size_t *msg_sz); 42 int 43 intel_hdcp_gsc_verify_hprime(struct device *dev, struct hdcp_port_data *data, 44 struct hdcp2_ake_send_hprime *rx_hprime); 45 int 46 intel_hdcp_gsc_store_pairing_info(struct device *dev, struct hdcp_port_data *data, 47 struct hdcp2_ake_send_pairing_info *pairing_info); 48 int 49 intel_hdcp_gsc_initiate_locality_check(struct device *dev, 50 struct hdcp_port_data *data, 51 struct hdcp2_lc_init *lc_init_data); 52 int 53 intel_hdcp_gsc_verify_lprime(struct device *dev, struct hdcp_port_data *data, 54 struct hdcp2_lc_send_lprime *rx_lprime); 55 int intel_hdcp_gsc_get_session_key(struct device *dev, 56 struct hdcp_port_data *data, 57 struct hdcp2_ske_send_eks *ske_data); 58 int 59 intel_hdcp_gsc_repeater_check_flow_prepare_ack(struct device *dev, 60 struct hdcp_port_data *data, 61 struct hdcp2_rep_send_receiverid_list 62 *rep_topology, 63 struct hdcp2_rep_send_ack 64 *rep_send_ack); 65 int intel_hdcp_gsc_verify_mprime(struct device *dev, 66 struct hdcp_port_data *data, 67 struct hdcp2_rep_stream_ready *stream_ready); 68 int intel_hdcp_gsc_enable_authentication(struct device *dev, 69 struct hdcp_port_data *data); 70 int 71 intel_hdcp_gsc_close_session(struct device *dev, struct hdcp_port_data *data); 72 73 #endif /* __INTEL_HDCP_GSC_MESSAGE_H__ */ 74