0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef _I915_MEI_HDCP_INTERFACE_H_
0010 #define _I915_MEI_HDCP_INTERFACE_H_
0011
0012 #include <linux/mutex.h>
0013 #include <linux/device.h>
0014 #include <drm/display/drm_hdcp.h>
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 enum hdcp_port_type {
0026 HDCP_PORT_TYPE_INVALID,
0027 HDCP_PORT_TYPE_INTEGRATED,
0028 HDCP_PORT_TYPE_LSPCON,
0029 HDCP_PORT_TYPE_CPDP
0030 };
0031
0032
0033
0034
0035
0036
0037
0038 enum hdcp_wired_protocol {
0039 HDCP_PROTOCOL_INVALID,
0040 HDCP_PROTOCOL_HDMI,
0041 HDCP_PROTOCOL_DP
0042 };
0043
0044 enum mei_fw_ddi {
0045 MEI_DDI_INVALID_PORT = 0x0,
0046
0047 MEI_DDI_B = 1,
0048 MEI_DDI_C,
0049 MEI_DDI_D,
0050 MEI_DDI_E,
0051 MEI_DDI_F,
0052 MEI_DDI_A = 7,
0053 MEI_DDI_RANGE_END = MEI_DDI_A,
0054 };
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067 enum mei_fw_tc {
0068 MEI_INVALID_TRANSCODER = 0x00,
0069 MEI_TRANSCODER_EDP,
0070 MEI_TRANSCODER_DSI0,
0071 MEI_TRANSCODER_DSI1,
0072 MEI_TRANSCODER_A = 0x10,
0073 MEI_TRANSCODER_B,
0074 MEI_TRANSCODER_C,
0075 MEI_TRANSCODER_D
0076 };
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092 struct hdcp_port_data {
0093 enum mei_fw_ddi fw_ddi;
0094 enum mei_fw_tc fw_tc;
0095 u8 port_type;
0096 u8 protocol;
0097 u16 k;
0098 u32 seq_num_m;
0099 struct hdcp2_streamid_type *streams;
0100 };
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122 struct i915_hdcp_component_ops {
0123
0124
0125
0126 struct module *owner;
0127
0128 int (*initiate_hdcp2_session)(struct device *dev,
0129 struct hdcp_port_data *data,
0130 struct hdcp2_ake_init *ake_data);
0131 int (*verify_receiver_cert_prepare_km)(struct device *dev,
0132 struct hdcp_port_data *data,
0133 struct hdcp2_ake_send_cert
0134 *rx_cert,
0135 bool *km_stored,
0136 struct hdcp2_ake_no_stored_km
0137 *ek_pub_km,
0138 size_t *msg_sz);
0139 int (*verify_hprime)(struct device *dev,
0140 struct hdcp_port_data *data,
0141 struct hdcp2_ake_send_hprime *rx_hprime);
0142 int (*store_pairing_info)(struct device *dev,
0143 struct hdcp_port_data *data,
0144 struct hdcp2_ake_send_pairing_info
0145 *pairing_info);
0146 int (*initiate_locality_check)(struct device *dev,
0147 struct hdcp_port_data *data,
0148 struct hdcp2_lc_init *lc_init_data);
0149 int (*verify_lprime)(struct device *dev,
0150 struct hdcp_port_data *data,
0151 struct hdcp2_lc_send_lprime *rx_lprime);
0152 int (*get_session_key)(struct device *dev,
0153 struct hdcp_port_data *data,
0154 struct hdcp2_ske_send_eks *ske_data);
0155 int (*repeater_check_flow_prepare_ack)(struct device *dev,
0156 struct hdcp_port_data *data,
0157 struct hdcp2_rep_send_receiverid_list
0158 *rep_topology,
0159 struct hdcp2_rep_send_ack
0160 *rep_send_ack);
0161 int (*verify_mprime)(struct device *dev,
0162 struct hdcp_port_data *data,
0163 struct hdcp2_rep_stream_ready *stream_ready);
0164 int (*enable_hdcp_authentication)(struct device *dev,
0165 struct hdcp_port_data *data);
0166 int (*close_hdcp_session)(struct device *dev,
0167 struct hdcp_port_data *data);
0168 };
0169
0170
0171
0172
0173
0174
0175
0176 struct i915_hdcp_comp_master {
0177 struct device *mei_dev;
0178 const struct i915_hdcp_component_ops *ops;
0179
0180
0181 struct mutex mutex;
0182 };
0183
0184 #endif