xref: /linux/drivers/gpu/drm/i915/display/intel_fb_pin.h (revision fe7fad476ec8153a8b8767a08114e3e4a58a837e)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2021 Intel Corporation
4  */
5 
6 #ifndef __INTEL_FB_PIN_H__
7 #define __INTEL_FB_PIN_H__
8 
9 #include <linux/types.h>
10 
11 struct drm_framebuffer;
12 struct i915_vma;
13 struct intel_plane_state;
14 struct i915_gtt_view;
15 
16 struct i915_vma *
17 intel_fb_pin_to_ggtt(const struct drm_framebuffer *fb,
18 		     const struct i915_gtt_view *view,
19 		     unsigned int alignment,
20 		     unsigned int phys_alignment,
21 		     unsigned int vtd_guard,
22 		     bool uses_fence,
23 		     unsigned long *out_flags);
24 
25 void intel_fb_unpin_vma(struct i915_vma *vma, unsigned long flags);
26 
27 int intel_plane_pin_fb(struct intel_plane_state *new_plane_state,
28 		       const struct intel_plane_state *old_plane_state);
29 void intel_plane_unpin_fb(struct intel_plane_state *old_plane_state);
30 
31 #endif
32