Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: MIT */
0002 /*
0003  * Copyright © 2019 Intel Corporation
0004  */
0005 
0006 #ifndef __INTEL_SPRITE_H__
0007 #define __INTEL_SPRITE_H__
0008 
0009 #include <linux/types.h>
0010 
0011 #include "intel_display.h"
0012 
0013 struct drm_device;
0014 struct drm_display_mode;
0015 struct drm_file;
0016 struct drm_i915_private;
0017 struct intel_crtc_state;
0018 struct intel_plane_state;
0019 
0020 /*
0021  * FIXME: We should instead only take spinlocks once for the entire update
0022  * instead of once per mmio.
0023  */
0024 #if IS_ENABLED(CONFIG_PROVE_LOCKING)
0025 #define VBLANK_EVASION_TIME_US 250
0026 #else
0027 #define VBLANK_EVASION_TIME_US 100
0028 #endif
0029 
0030 struct intel_plane *intel_sprite_plane_create(struct drm_i915_private *dev_priv,
0031                           enum pipe pipe, int plane);
0032 int intel_sprite_set_colorkey_ioctl(struct drm_device *dev, void *data,
0033                     struct drm_file *file_priv);
0034 int intel_plane_check_src_coordinates(struct intel_plane_state *plane_state);
0035 int chv_plane_check_rotation(const struct intel_plane_state *plane_state);
0036 
0037 static inline u8 icl_hdr_plane_mask(void)
0038 {
0039     return BIT(PLANE_PRIMARY) |
0040         BIT(PLANE_SPRITE0) | BIT(PLANE_SPRITE1);
0041 }
0042 
0043 int ivb_plane_min_cdclk(const struct intel_crtc_state *crtc_state,
0044             const struct intel_plane_state *plane_state);
0045 int hsw_plane_min_cdclk(const struct intel_crtc_state *crtc_state,
0046             const struct intel_plane_state *plane_state);
0047 int vlv_plane_min_cdclk(const struct intel_crtc_state *crtc_state,
0048             const struct intel_plane_state *plane_state);
0049 
0050 #endif /* __INTEL_SPRITE_H__ */