xref: /openbmc/linux/drivers/video/fbdev/mmp/fb/mmpfb.h (revision 9cfc5c90)
1 /*
2  * linux/drivers/video/mmp/fb/mmpfb.h
3  * Framebuffer driver for Marvell Display controller.
4  *
5  * Copyright (C) 2012 Marvell Technology Group Ltd.
6  * Authors: Zhou Zhu <zzhu3@marvell.com>
7  *
8  * This program is free software; you can redistribute it and/or modify it
9  * under the terms of the GNU General Public License as published by the
10  * Free Software Foundation; either version 2 of the License, or (at your
11  * option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful, but WITHOUT
14  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
16  * more details.
17  *
18  * You should have received a copy of the GNU General Public License along with
19  * this program.  If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 #ifndef _MMP_FB_H_
24 #define _MMP_FB_H_
25 
26 #include <video/mmp_disp.h>
27 #include <linux/fb.h>
28 
29 /* LCD controller private state. */
30 struct mmpfb_info {
31 	struct device	*dev;
32 	int	id;
33 	const char	*name;
34 
35 	struct fb_info	*fb_info;
36 	/* basicaly videomode is for output */
37 	struct fb_videomode	mode;
38 	int	pix_fmt;
39 
40 	void	*fb_start;
41 	int	fb_size;
42 	dma_addr_t	fb_start_dma;
43 
44 	struct mmp_overlay	*overlay;
45 	struct mmp_path	*path;
46 
47 	struct mutex	access_ok;
48 
49 	unsigned int		pseudo_palette[16];
50 	int output_fmt;
51 };
52 
53 #define MMPFB_DEFAULT_SIZE (PAGE_ALIGN(1920 * 1080 * 4 * 2))
54 #endif /* _MMP_FB_H_ */
55