at master 1.3 kB view raw
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 11struct drm_fb_helper; 12struct drm_fb_helper_surface_size; 13struct intel_display; 14struct intel_fbdev; 15struct intel_framebuffer; 16struct iosys_map; 17 18#ifdef CONFIG_DRM_FBDEV_EMULATION 19int intel_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper, 20 struct drm_fb_helper_surface_size *sizes); 21#define INTEL_FBDEV_DRIVER_OPS \ 22 .fbdev_probe = intel_fbdev_driver_fbdev_probe 23void intel_fbdev_setup(struct intel_display *display); 24struct intel_framebuffer *intel_fbdev_framebuffer(struct intel_fbdev *fbdev); 25struct i915_vma *intel_fbdev_vma_pointer(struct intel_fbdev *fbdev); 26void intel_fbdev_get_map(struct intel_fbdev *fbdev, struct iosys_map *map); 27#else 28#define INTEL_FBDEV_DRIVER_OPS \ 29 .fbdev_probe = NULL 30static inline void intel_fbdev_setup(struct intel_display *display) 31{ 32} 33static inline struct intel_framebuffer *intel_fbdev_framebuffer(struct intel_fbdev *fbdev) 34{ 35 return NULL; 36} 37 38static inline struct i915_vma *intel_fbdev_vma_pointer(struct intel_fbdev *fbdev) 39{ 40 return NULL; 41} 42 43static inline void intel_fbdev_get_map(struct intel_fbdev *fbdev, struct iosys_map *map) 44{ 45} 46#endif 47 48#endif /* __INTEL_FBDEV_H__ */