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