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 | #include <linux/types.h> |
10 | |
11 | struct drm_device; |
12 | struct drm_i915_private; |
13 | struct intel_fbdev; |
14 | struct intel_framebuffer; |
15 | |
16 | #ifdef CONFIG_DRM_FBDEV_EMULATION |
17 | int intel_fbdev_init(struct drm_device *dev); |
18 | void intel_fbdev_initial_config_async(struct drm_i915_private *dev_priv); |
19 | void intel_fbdev_unregister(struct drm_i915_private *dev_priv); |
20 | void intel_fbdev_fini(struct drm_i915_private *dev_priv); |
21 | void intel_fbdev_set_suspend(struct drm_device *dev, int state, bool synchronous); |
22 | void intel_fbdev_output_poll_changed(struct drm_device *dev); |
23 | void intel_fbdev_restore_mode(struct drm_i915_private *dev_priv); |
24 | struct intel_framebuffer *intel_fbdev_framebuffer(struct intel_fbdev *fbdev); |
25 | #else |
26 | static inline int intel_fbdev_init(struct drm_device *dev) |
27 | { |
28 | return 0; |
29 | } |
30 | |
31 | static inline void intel_fbdev_initial_config_async(struct drm_i915_private *dev_priv) |
32 | { |
33 | } |
34 | |
35 | static inline void intel_fbdev_unregister(struct drm_i915_private *dev_priv) |
36 | { |
37 | } |
38 | |
39 | static inline void intel_fbdev_fini(struct drm_i915_private *dev_priv) |
40 | { |
41 | } |
42 | |
43 | static inline void intel_fbdev_set_suspend(struct drm_device *dev, int state, bool synchronous) |
44 | { |
45 | } |
46 | |
47 | static inline void intel_fbdev_output_poll_changed(struct drm_device *dev) |
48 | { |
49 | } |
50 | |
51 | static inline void intel_fbdev_restore_mode(struct drm_i915_private *i915) |
52 | { |
53 | } |
54 | static inline struct intel_framebuffer *intel_fbdev_framebuffer(struct intel_fbdev *fbdev) |
55 | { |
56 | return NULL; |
57 | } |
58 | #endif |
59 | |
60 | #endif /* __INTEL_FBDEV_H__ */ |
61 | |