1 /* SPDX-License-Identifier: MIT */
3 * Copyright © 2019 Intel Corporation
6 #ifndef __INTEL_ATOMIC_H__
7 #define __INTEL_ATOMIC_H__
9 #include <linux/types.h>
11 struct drm_atomic_state
;
13 struct drm_connector_state
;
15 struct drm_crtc_state
;
17 struct drm_i915_private
;
19 struct intel_atomic_state
;
20 struct intel_connector
;
22 struct intel_crtc_state
;
24 int intel_digital_connector_atomic_get_property(struct drm_connector
*connector
,
25 const struct drm_connector_state
*state
,
26 struct drm_property
*property
,
28 int intel_digital_connector_atomic_set_property(struct drm_connector
*connector
,
29 struct drm_connector_state
*state
,
30 struct drm_property
*property
,
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
);
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 const struct intel_crtc_state
*from_crtc_state
);
48 struct drm_atomic_state
*intel_atomic_state_alloc(struct drm_device
*dev
);
49 void intel_atomic_state_free(struct drm_atomic_state
*state
);
50 void intel_atomic_state_clear(struct drm_atomic_state
*state
);
52 struct intel_crtc_state
*
53 intel_atomic_get_crtc_state(struct drm_atomic_state
*state
,
54 struct intel_crtc
*crtc
);
56 int intel_atomic_setup_scalers(struct drm_i915_private
*dev_priv
,
57 struct intel_crtc
*intel_crtc
,
58 struct intel_crtc_state
*crtc_state
);
60 #endif /* __INTEL_ATOMIC_H__ */