1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2019 Intel Corporation
4  */
5 
6 #ifndef __INTEL_ATOMIC_H__
7 #define __INTEL_ATOMIC_H__
8 
9 #include <linux/types.h>
10 
11 struct drm_atomic_state;
12 struct drm_connector;
13 struct drm_connector_state;
14 struct drm_crtc;
15 struct drm_crtc_state;
16 struct drm_device;
17 struct drm_i915_private;
18 struct drm_property;
19 struct intel_atomic_state;
20 struct intel_crtc;
21 struct intel_crtc_state;
22 
23 int intel_digital_connector_atomic_get_property(struct drm_connector *connector,
24 						const struct drm_connector_state *state,
25 						struct drm_property *property,
26 						u64 *val);
27 int intel_digital_connector_atomic_set_property(struct drm_connector *connector,
28 						struct drm_connector_state *state,
29 						struct drm_property *property,
30 						u64 val);
31 int intel_digital_connector_atomic_check(struct drm_connector *conn,
32 					 struct drm_atomic_state *state);
33 struct drm_connector_state *
34 intel_digital_connector_duplicate_state(struct drm_connector *connector);
35 
36 struct drm_crtc_state *intel_crtc_duplicate_state(struct drm_crtc *crtc);
37 void intel_crtc_destroy_state(struct drm_crtc *crtc,
38 			       struct drm_crtc_state *state);
39 struct drm_atomic_state *intel_atomic_state_alloc(struct drm_device *dev);
40 void intel_atomic_state_clear(struct drm_atomic_state *state);
41 
42 struct intel_crtc_state *
43 intel_atomic_get_crtc_state(struct drm_atomic_state *state,
44 			    struct intel_crtc *crtc);
45 
46 int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv,
47 			       struct intel_crtc *intel_crtc,
48 			       struct intel_crtc_state *crtc_state);
49 
50 int intel_atomic_lock_global_state(struct intel_atomic_state *state);
51 
52 int intel_atomic_serialize_global_state(struct intel_atomic_state *state);
53 
54 #endif /* __INTEL_ATOMIC_H__ */
55