1 /* SPDX-License-Identifier: MIT */
3 * Copyright © 2019 Intel Corporation
6 #ifndef __INTEL_SPRITE_H__
7 #define __INTEL_SPRITE_H__
9 #include <linux/types.h>
11 #include "intel_display.h"
14 struct drm_display_mode;
16 struct drm_i915_private;
17 struct intel_crtc_state;
18 struct intel_plane_state;
21 * FIXME: We should instead only take spinlocks once for the entire update
22 * instead of once per mmio.
24 #if IS_ENABLED(CONFIG_PROVE_LOCKING)
25 #define VBLANK_EVASION_TIME_US 250
27 #define VBLANK_EVASION_TIME_US 100
30 int intel_usecs_to_scanlines(const struct drm_display_mode *adjusted_mode,
32 struct intel_plane *intel_sprite_plane_create(struct drm_i915_private *dev_priv,
33 enum pipe pipe, int plane);
34 int intel_sprite_set_colorkey_ioctl(struct drm_device *dev, void *data,
35 struct drm_file *file_priv);
36 void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state);
37 void intel_pipe_update_end(struct intel_crtc_state *new_crtc_state);
38 int intel_plane_check_src_coordinates(struct intel_plane_state *plane_state);
39 int chv_plane_check_rotation(const struct intel_plane_state *plane_state);
41 static inline u8 icl_hdr_plane_mask(void)
43 return BIT(PLANE_PRIMARY) |
44 BIT(PLANE_SPRITE0) | BIT(PLANE_SPRITE1);
47 int ivb_plane_min_cdclk(const struct intel_crtc_state *crtc_state,
48 const struct intel_plane_state *plane_state);
49 int hsw_plane_min_cdclk(const struct intel_crtc_state *crtc_state,
50 const struct intel_plane_state *plane_state);
51 int vlv_plane_min_cdclk(const struct intel_crtc_state *crtc_state,
52 const struct intel_plane_state *plane_state);
54 #endif /* __INTEL_SPRITE_H__ */