Home | History | Annotate | Line # | Download | only in drm
      1 /* Public domain. */
      2 
      3 #ifndef _I915_MEI_HDCP_INTERFACE_H_
      4 #define _I915_MEI_HDCP_INTERFACE_H_
      5 
      6 #include <drm/drm_hdcp.h>
      7 
      8 enum hdcp_wired_protocol {
      9 	HDCP_PROTOCOL_INVALID,
     10 	HDCP_PROTOCOL_HDMI,
     11 	HDCP_PROTOCOL_DP
     12 };
     13 
     14 enum hdcp_port_type {
     15 	HDCP_PORT_TYPE_INVALID		= 0,
     16 	HDCP_PORT_TYPE_INTEGRATED	= 1,
     17 	HDCP_PORT_TYPE_LSPCON		= 2,
     18 	HDCP_PORT_TYPE_CPDP		= 3,
     19 };
     20 
     21 enum mei_fw_ddi {
     22         MEI_DDI_INVALID_PORT		= 0,
     23 	MEI_DDI_B			= 1,
     24 	MEI_DDI_C			= 2,
     25 	MEI_DDI_E			= 3,
     26 	MEI_DDI_F			= 4,
     27 	MEI_DDI_A			= 7,
     28 };
     29 
     30 enum mei_fw_tc {
     31 	MEI_INVALID_TRANSCODER = 0,
     32 };
     33 
     34 struct hdcp_port_data {
     35 	struct hdcp2_streamid_type *streams;
     36 	uint32_t seq_num_m;
     37 	enum mei_fw_ddi fw_ddi;
     38 	enum mei_fw_tc fw_tc;
     39 	uint8_t port_type;
     40 	uint8_t protocol;
     41 	uint16_t k;
     42 };
     43 
     44 struct i915_hdcp_component_ops {
     45 	int (*initiate_hdcp2_session)(struct device *, struct hdcp_port_data *,
     46 	    struct hdcp2_ake_init *);
     47 	int (*verify_receiver_cert_prepare_km)(struct device *,
     48 	    struct hdcp_port_data *, struct hdcp2_ake_send_cert *, bool *,
     49 	    struct hdcp2_ake_no_stored_km *, size_t *);
     50 	int (*verify_hprime)(struct device *, struct hdcp_port_data *,
     51 	    struct hdcp2_ake_send_hprime *);
     52 	int (*store_pairing_info)(struct device *, struct hdcp_port_data *,
     53 	    struct hdcp2_ake_send_pairing_info *);
     54 	int (*initiate_locality_check)(struct device *, struct hdcp_port_data *,
     55 	    struct hdcp2_lc_init *);
     56 	int (*verify_lprime)(struct device *, struct hdcp_port_data *,
     57 	    struct hdcp2_lc_send_lprime *);
     58 	int (*get_session_key)(struct device *, struct hdcp_port_data *,
     59 	    struct hdcp2_ske_send_eks *);
     60 	int (*repeater_check_flow_prepare_ack)(struct device *,
     61 	    struct hdcp_port_data *, struct hdcp2_rep_send_receiverid_list *,
     62 	    struct hdcp2_rep_send_ack *);
     63 	int (*verify_mprime)(struct device *, struct hdcp_port_data *,
     64 	    struct hdcp2_rep_stream_ready *);
     65 	int (*enable_hdcp_authentication)(struct device *,
     66 	    struct hdcp_port_data *);
     67 	int (*close_hdcp_session)(struct device *, struct hdcp_port_data *);
     68 };
     69 
     70 struct i915_hdcp_comp_master {
     71 	void *mei_dev;
     72 	const struct i915_hdcp_component_ops *ops;
     73 };
     74 
     75 #endif
     76