xref: /openbsd/sys/dev/pci/drm/i915/display/intel_atomic.h (revision 12d6b21a)
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 #define drm_i915_private inteldrm_softc
12 
13 struct drm_atomic_state;
14 struct drm_connector;
15 struct drm_connector_state;
16 struct drm_crtc;
17 struct drm_crtc_state;
18 struct drm_device;
19 struct drm_i915_private;
20 struct drm_property;
21 struct intel_atomic_state;
22 struct intel_connector;
23 struct intel_crtc;
24 struct intel_crtc_state;
25 
26 int intel_digital_connector_atomic_get_property(struct drm_connector *connector,
27 						const struct drm_connector_state *state,
28 						struct drm_property *property,
29 						u64 *val);
30 int intel_digital_connector_atomic_set_property(struct drm_connector *connector,
31 						struct drm_connector_state *state,
32 						struct drm_property *property,
33 						u64 val);
34 int intel_digital_connector_atomic_check(struct drm_connector *conn,
35 					 struct drm_atomic_state *state);
36 struct drm_connector_state *
37 intel_digital_connector_duplicate_state(struct drm_connector *connector);
38 bool intel_connector_needs_modeset(struct intel_atomic_state *state,
39 				   struct drm_connector *connector);
40 bool intel_any_crtc_needs_modeset(struct intel_atomic_state *state);
41 struct intel_digital_connector_state *
42 intel_atomic_get_digital_connector_state(struct intel_atomic_state *state,
43 					 struct intel_connector *connector);
44 
45 struct drm_crtc_state *intel_crtc_duplicate_state(struct drm_crtc *crtc);
46 void intel_crtc_destroy_state(struct drm_crtc *crtc,
47 			       struct drm_crtc_state *state);
48 void intel_crtc_free_hw_state(struct intel_crtc_state *crtc_state);
49 struct drm_atomic_state *intel_atomic_state_alloc(struct drm_device *dev);
50 void intel_atomic_state_free(struct drm_atomic_state *state);
51 void intel_atomic_state_clear(struct drm_atomic_state *state);
52 
53 struct intel_crtc_state *
54 intel_atomic_get_crtc_state(struct drm_atomic_state *state,
55 			    struct intel_crtc *crtc);
56 
57 #endif /* __INTEL_ATOMIC_H__ */
58