1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2019 Intel Corporation
4  */
5 
6 #ifndef __INTEL_HDCP_H__
7 #define __INTEL_HDCP_H__
8 
9 #include <linux/types.h>
10 
11 struct drm_connector;
12 struct drm_connector_state;
13 struct drm_i915_private;
14 struct intel_connector;
15 struct intel_crtc_state;
16 struct intel_encoder;
17 struct intel_hdcp_shim;
18 enum port;
19 enum transcoder;
20 
21 void intel_hdcp_atomic_check(struct drm_connector *connector,
22 			     struct drm_connector_state *old_state,
23 			     struct drm_connector_state *new_state);
24 int intel_hdcp_init(struct intel_connector *connector,
25 		    const struct intel_hdcp_shim *hdcp_shim);
26 int intel_hdcp_enable(struct intel_connector *connector,
27 		      enum transcoder cpu_transcoder, u8 content_type);
28 int intel_hdcp_disable(struct intel_connector *connector);
29 void intel_hdcp_update_pipe(struct intel_encoder *encoder,
30 			    const struct intel_crtc_state *crtc_state,
31 			    const struct drm_connector_state *conn_state);
32 bool is_hdcp_supported(struct drm_i915_private *dev_priv, enum port port);
33 bool intel_hdcp_capable(struct intel_connector *connector);
34 bool intel_hdcp2_capable(struct intel_connector *connector);
35 void intel_hdcp_component_init(struct drm_i915_private *dev_priv);
36 void intel_hdcp_component_fini(struct drm_i915_private *dev_priv);
37 void intel_hdcp_cleanup(struct intel_connector *connector);
38 void intel_hdcp_handle_cp_irq(struct intel_connector *connector);
39 
40 #endif /* __INTEL_HDCP_H__ */
41