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