1 /*	$NetBSD: intel_atomic.h,v 1.3 2021/12/19 11:56:08 riastradh Exp $	*/
2 
3 /* SPDX-License-Identifier: MIT */
4 /*
5  * Copyright © 2019 Intel Corporation
6  */
7 
8 #ifndef __INTEL_ATOMIC_H__
9 #define __INTEL_ATOMIC_H__
10 
11 #include <linux/types.h>
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 struct intel_digital_connector_state *
41 intel_atomic_get_digital_connector_state(struct intel_atomic_state *state,
42 					 struct intel_connector *connector);
43 
44 struct drm_crtc_state *intel_crtc_duplicate_state(struct drm_crtc *crtc);
45 void intel_crtc_destroy_state(struct drm_crtc *crtc,
46 			       struct drm_crtc_state *state);
47 void intel_crtc_free_hw_state(struct intel_crtc_state *crtc_state);
48 void intel_crtc_copy_color_blobs(struct intel_crtc_state *crtc_state);
49 struct drm_atomic_state *intel_atomic_state_alloc(struct drm_device *dev);
50 void intel_atomic_state_clear(struct drm_atomic_state *state);
51 
52 struct intel_crtc_state *
53 intel_atomic_get_crtc_state(struct drm_atomic_state *state,
54 			    struct intel_crtc *crtc);
55 
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);
59 
60 int intel_atomic_lock_global_state(struct intel_atomic_state *state);
61 
62 int intel_atomic_serialize_global_state(struct intel_atomic_state *state);
63 
64 #include "i915_sw_fence.h"
65 int __i915_sw_fence_call
66 intel_atomic_commit_ready(struct i915_sw_fence *fence,
67 			  enum i915_sw_fence_notify notify);
68 
69 #endif /* __INTEL_ATOMIC_H__ */
70