1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2019 Intel Corporation
4  */
5 
6 #ifndef __INTEL_SPRITE_H__
7 #define __INTEL_SPRITE_H__
8 
9 #include <linux/types.h>
10 
11 struct drm_device;
12 struct drm_display_mode;
13 struct drm_file;
14 struct drm_i915_private;
15 struct intel_crtc_state;
16 struct intel_plane_state;
17 enum pipe;
18 
19 /*
20  * FIXME: We should instead only take spinlocks once for the entire update
21  * instead of once per mmio.
22  */
23 #if IS_ENABLED(CONFIG_PROVE_LOCKING)
24 #define VBLANK_EVASION_TIME_US 250
25 #else
26 #define VBLANK_EVASION_TIME_US 100
27 #endif
28 
29 struct intel_plane *intel_sprite_plane_create(struct drm_i915_private *dev_priv,
30 					      enum pipe pipe, int plane);
31 int intel_sprite_set_colorkey_ioctl(struct drm_device *dev, void *data,
32 				    struct drm_file *file_priv);
33 int intel_plane_check_src_coordinates(struct intel_plane_state *plane_state);
34 int chv_plane_check_rotation(const struct intel_plane_state *plane_state);
35 
36 int ivb_plane_min_cdclk(const struct intel_crtc_state *crtc_state,
37 			const struct intel_plane_state *plane_state);
38 int hsw_plane_min_cdclk(const struct intel_crtc_state *crtc_state,
39 			const struct intel_plane_state *plane_state);
40 int vlv_plane_min_cdclk(const struct intel_crtc_state *crtc_state,
41 			const struct intel_plane_state *plane_state);
42 
43 #endif /* __INTEL_SPRITE_H__ */
44