xref: /linux/drivers/gpu/drm/i915/display/intel_fbdev.h (revision ce801e5d6c1bac228bf10f75e8bede4285c58282)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2019 Intel Corporation
4  */
5 
6 #ifndef __INTEL_FBDEV_H__
7 #define __INTEL_FBDEV_H__
8 
9 struct drm_fb_helper;
10 struct drm_fb_helper_surface_size;
11 struct drm_i915_private;
12 struct intel_fbdev;
13 struct intel_framebuffer;
14 
15 #ifdef CONFIG_DRM_FBDEV_EMULATION
16 int intel_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper,
17 				   struct drm_fb_helper_surface_size *sizes);
18 #define INTEL_FBDEV_DRIVER_OPS \
19 	.fbdev_probe = intel_fbdev_driver_fbdev_probe
20 void intel_fbdev_setup(struct drm_i915_private *dev_priv);
21 struct intel_framebuffer *intel_fbdev_framebuffer(struct intel_fbdev *fbdev);
22 struct i915_vma *intel_fbdev_vma_pointer(struct intel_fbdev *fbdev);
23 
24 #else
25 #define INTEL_FBDEV_DRIVER_OPS \
26 	.fbdev_probe = NULL
27 static inline void intel_fbdev_setup(struct drm_i915_private *dev_priv)
28 {
29 }
30 static inline struct intel_framebuffer *intel_fbdev_framebuffer(struct intel_fbdev *fbdev)
31 {
32 	return NULL;
33 }
34 
35 static inline struct i915_vma *intel_fbdev_vma_pointer(struct intel_fbdev *fbdev)
36 {
37 	return NULL;
38 }
39 
40 #endif
41 
42 #endif /* __INTEL_FBDEV_H__ */
43