xref: /linux/drivers/gpu/drm/i915/display/intel_atomic.h (revision c5d3cdad688ed75fb311a3a671eb30ba7106d7d3)
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_connector;
21 struct intel_crtc;
22 struct intel_crtc_state;
23 
24 int intel_digital_connector_atomic_get_property(struct drm_connector *connector,
25 						const struct drm_connector_state *state,
26 						struct drm_property *property,
27 						u64 *val);
28 int intel_digital_connector_atomic_set_property(struct drm_connector *connector,
29 						struct drm_connector_state *state,
30 						struct drm_property *property,
31 						u64 val);
32 int intel_digital_connector_atomic_check(struct drm_connector *conn,
33 					 struct drm_atomic_state *state);
34 struct drm_connector_state *
35 intel_digital_connector_duplicate_state(struct drm_connector *connector);
36 bool intel_connector_needs_modeset(struct intel_atomic_state *state,
37 				   struct drm_connector *connector);
38 struct intel_digital_connector_state *
39 intel_atomic_get_digital_connector_state(struct intel_atomic_state *state,
40 					 struct intel_connector *connector);
41 
42 struct drm_crtc_state *intel_crtc_duplicate_state(struct drm_crtc *crtc);
43 void intel_crtc_destroy_state(struct drm_crtc *crtc,
44 			       struct drm_crtc_state *state);
45 void intel_crtc_free_hw_state(struct intel_crtc_state *crtc_state);
46 void intel_crtc_copy_color_blobs(struct intel_crtc_state *crtc_state);
47 struct drm_atomic_state *intel_atomic_state_alloc(struct drm_device *dev);
48 void intel_atomic_state_free(struct drm_atomic_state *state);
49 void intel_atomic_state_clear(struct drm_atomic_state *state);
50 
51 struct intel_crtc_state *
52 intel_atomic_get_crtc_state(struct drm_atomic_state *state,
53 			    struct intel_crtc *crtc);
54 
55 int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv,
56 			       struct intel_crtc *intel_crtc,
57 			       struct intel_crtc_state *crtc_state);
58 
59 int _intel_atomic_lock_global_state(struct intel_atomic_state *state);
60 
61 int _intel_atomic_serialize_global_state(struct intel_atomic_state *state);
62 
63 #endif /* __INTEL_ATOMIC_H__ */
64