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 26 ssize_t intel_hdcp_gsc_msg_send(struct drm_i915_private *i915, u8 *msg_in, 27 size_t msg_in_len, u8 *msg_out, 28 size_t msg_out_len); 29 bool intel_hdcp_gsc_check_status(struct drm_i915_private *i915); 30 int 31 intel_hdcp_gsc_initiate_session(struct device *dev, struct hdcp_port_data *data, 32 struct hdcp2_ake_init *ake_data); 33 int 34 intel_hdcp_gsc_verify_receiver_cert_prepare_km(struct device *dev, 35 struct hdcp_port_data *data, 36 struct hdcp2_ake_send_cert *rx_cert, 37 bool *km_stored, 38 struct hdcp2_ake_no_stored_km 39 *ek_pub_km, 40 size_t *msg_sz); 41 int 42 intel_hdcp_gsc_verify_hprime(struct device *dev, struct hdcp_port_data *data, 43 struct hdcp2_ake_send_hprime *rx_hprime); 44 int 45 intel_hdcp_gsc_store_pairing_info(struct device *dev, struct hdcp_port_data *data, 46 struct hdcp2_ake_send_pairing_info *pairing_info); 47 int 48 intel_hdcp_gsc_initiate_locality_check(struct device *dev, 49 struct hdcp_port_data *data, 50 struct hdcp2_lc_init *lc_init_data); 51 int 52 intel_hdcp_gsc_verify_lprime(struct device *dev, struct hdcp_port_data *data, 53 struct hdcp2_lc_send_lprime *rx_lprime); 54 int intel_hdcp_gsc_get_session_key(struct device *dev, 55 struct hdcp_port_data *data, 56 struct hdcp2_ske_send_eks *ske_data); 57 int 58 intel_hdcp_gsc_repeater_check_flow_prepare_ack(struct device *dev, 59 struct hdcp_port_data *data, 60 struct hdcp2_rep_send_receiverid_list 61 *rep_topology, 62 struct hdcp2_rep_send_ack 63 *rep_send_ack); 64 int intel_hdcp_gsc_verify_mprime(struct device *dev, 65 struct hdcp_port_data *data, 66 struct hdcp2_rep_stream_ready *stream_ready); 67 int intel_hdcp_gsc_enable_authentication(struct device *dev, 68 struct hdcp_port_data *data); 69 int 70 intel_hdcp_gsc_close_session(struct device *dev, struct hdcp_port_data *data); 71 72 #endif /* __INTEL_HDCP_GSC_MESSAGE_H__ */ 73