2 * Copyright (C) 2013 Google, Inc.
4 * This software is licensed under the terms of the GNU General Public
5 * License version 2, as published by the Free Software Foundation, and
6 * may be copied, distributed, and modified under those terms.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
15 #ifndef _VIDEO_ADF_FBDEV_H_
16 #define _VIDEO_ADF_FBDEV_H_
19 #include <linux/mutex.h>
20 #include <video/adf.h>
23 struct adf_interface *intf;
24 struct adf_overlay_engine *eng;
26 u32 pseudo_palette[16];
28 unsigned int refcount;
29 struct mutex refcount_lock;
31 struct dma_buf *dma_buf;
37 u16 default_xres_virtual;
38 u16 default_yres_virtual;
42 void adf_modeinfo_to_fb_videomode(const struct drm_mode_modeinfo *mode,
43 struct fb_videomode *vmode);
44 void adf_modeinfo_from_fb_videomode(const struct fb_videomode *vmode,
45 struct drm_mode_modeinfo *mode);
47 int adf_fbdev_init(struct adf_fbdev *fbdev, struct adf_interface *interface,
48 struct adf_overlay_engine *eng,
49 u16 xres_virtual, u16 yres_virtual, u32 format,
50 struct fb_ops *fbops, const char *fmt, ...);
51 void adf_fbdev_destroy(struct adf_fbdev *fbdev);
53 int adf_fbdev_open(struct fb_info *info, int user);
54 int adf_fbdev_release(struct fb_info *info, int user);
55 int adf_fbdev_check_var(struct fb_var_screeninfo *var, struct fb_info *info);
56 int adf_fbdev_set_par(struct fb_info *info);
57 int adf_fbdev_blank(int blank, struct fb_info *info);
58 int adf_fbdev_pan_display(struct fb_var_screeninfo *var, struct fb_info *info);
59 int adf_fbdev_mmap(struct fb_info *info, struct vm_area_struct *vma);
61 #endif /* _VIDEO_ADF_FBDEV_H_ */