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