video: adf: fbdev: add stubs for kernels without ADF_FBDEV
Change-Id: I42e087cddc29f6b93749791606e80dbd3e6f59ce Signed-off-by: Greg Hackmann <ghackmann@google.com>
This commit is contained in:
parent
8e5174c52b
commit
efc4bbe21c
1 changed files with 63 additions and 0 deletions
|
@ -39,6 +39,7 @@ struct adf_fbdev {
|
|||
u32 default_format;
|
||||
};
|
||||
|
||||
#if IS_ENABLED(CONFIG_ADF_FBDEV)
|
||||
void adf_modeinfo_to_fb_videomode(const struct drm_mode_modeinfo *mode,
|
||||
struct fb_videomode *vmode);
|
||||
void adf_modeinfo_from_fb_videomode(const struct fb_videomode *vmode,
|
||||
|
@ -57,5 +58,67 @@ int adf_fbdev_set_par(struct fb_info *info);
|
|||
int adf_fbdev_blank(int blank, struct fb_info *info);
|
||||
int adf_fbdev_pan_display(struct fb_var_screeninfo *var, struct fb_info *info);
|
||||
int adf_fbdev_mmap(struct fb_info *info, struct vm_area_struct *vma);
|
||||
#else
|
||||
static inline void adf_modeinfo_to_fb_videomode(const struct drm_mode_modeinfo *mode,
|
||||
struct fb_videomode *vmode)
|
||||
{
|
||||
WARN_ONCE(1, "%s: CONFIG_ADF_FBDEV is disabled\n", __func__);
|
||||
}
|
||||
|
||||
static inline void adf_modeinfo_from_fb_videomode(const struct fb_videomode *vmode,
|
||||
struct drm_mode_modeinfo *mode)
|
||||
{
|
||||
WARN_ONCE(1, "%s: CONFIG_ADF_FBDEV is disabled\n", __func__);
|
||||
}
|
||||
|
||||
static inline int adf_fbdev_init(struct adf_fbdev *fbdev,
|
||||
struct adf_interface *interface,
|
||||
struct adf_overlay_engine *eng,
|
||||
u16 xres_virtual, u16 yres_virtual, u32 format,
|
||||
struct fb_ops *fbops, const char *fmt, ...)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline void adf_fbdev_destroy(struct adf_fbdev *fbdev) { }
|
||||
|
||||
static inline int adf_fbdev_open(struct fb_info *info, int user)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline int adf_fbdev_release(struct fb_info *info, int user)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline int adf_fbdev_check_var(struct fb_var_screeninfo *var,
|
||||
struct fb_info *info)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline int adf_fbdev_set_par(struct fb_info *info)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline int adf_fbdev_blank(int blank, struct fb_info *info)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline int adf_fbdev_pan_display(struct fb_var_screeninfo *var,
|
||||
struct fb_info *info)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline int adf_fbdev_mmap(struct fb_info *info,
|
||||
struct vm_area_struct *vma)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _VIDEO_ADF_FBDEV_H_ */
|
||||
|
|
Loading…
Add table
Reference in a new issue