1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
2bbfce37bSArnd Bergmann #ifndef __PLATFORM_DATA_VIDEO_S3C
3bbfce37bSArnd Bergmann #define __PLATFORM_DATA_VIDEO_S3C
4bbfce37bSArnd Bergmann 
5bbfce37bSArnd Bergmann /* S3C_FB_MAX_WIN
6bbfce37bSArnd Bergmann  * Set to the maximum number of windows that any of the supported hardware
7bbfce37bSArnd Bergmann  * can use. Since the platform data uses this for an array size, having it
8bbfce37bSArnd Bergmann  * set to the maximum of any version of the hardware can do is safe.
9bbfce37bSArnd Bergmann  */
10bbfce37bSArnd Bergmann #define S3C_FB_MAX_WIN	(5)
11bbfce37bSArnd Bergmann 
12bbfce37bSArnd Bergmann /**
13bbfce37bSArnd Bergmann  * struct s3c_fb_pd_win - per window setup data
14bbfce37bSArnd Bergmann  * @xres     : The window X size.
15bbfce37bSArnd Bergmann  * @yres     : The window Y size.
16bbfce37bSArnd Bergmann  * @virtual_x: The virtual X size.
17bbfce37bSArnd Bergmann  * @virtual_y: The virtual Y size.
18bbfce37bSArnd Bergmann  */
19bbfce37bSArnd Bergmann struct s3c_fb_pd_win {
20bbfce37bSArnd Bergmann 	unsigned short		default_bpp;
21bbfce37bSArnd Bergmann 	unsigned short		max_bpp;
22bbfce37bSArnd Bergmann 	unsigned short		xres;
23bbfce37bSArnd Bergmann 	unsigned short		yres;
24bbfce37bSArnd Bergmann 	unsigned short		virtual_x;
25bbfce37bSArnd Bergmann 	unsigned short		virtual_y;
26bbfce37bSArnd Bergmann };
27bbfce37bSArnd Bergmann 
28bbfce37bSArnd Bergmann /**
29bbfce37bSArnd Bergmann  * struct s3c_fb_platdata -  S3C driver platform specific information
30bbfce37bSArnd Bergmann  * @setup_gpio: Setup the external GPIO pins to the right state to transfer
31bbfce37bSArnd Bergmann  *		the data from the display system to the connected display
32bbfce37bSArnd Bergmann  *		device.
33bbfce37bSArnd Bergmann  * @vidcon0: The base vidcon0 values to control the panel data format.
34bbfce37bSArnd Bergmann  * @vidcon1: The base vidcon1 values to control the panel data output.
35bbfce37bSArnd Bergmann  * @vtiming: Video timing when connected to a RGB type panel.
36bbfce37bSArnd Bergmann  * @win: The setup data for each hardware window, or NULL for unused.
37bbfce37bSArnd Bergmann  * @display_mode: The LCD output display mode.
38bbfce37bSArnd Bergmann  *
39bbfce37bSArnd Bergmann  * The platform data supplies the video driver with all the information
40bbfce37bSArnd Bergmann  * it requires to work with the display(s) attached to the machine. It
41bbfce37bSArnd Bergmann  * controls the initial mode, the number of display windows (0 is always
42bbfce37bSArnd Bergmann  * the base framebuffer) that are initialised etc.
43bbfce37bSArnd Bergmann  *
44bbfce37bSArnd Bergmann  */
45bbfce37bSArnd Bergmann struct s3c_fb_platdata {
46bbfce37bSArnd Bergmann 	void	(*setup_gpio)(void);
47bbfce37bSArnd Bergmann 
48bbfce37bSArnd Bergmann 	struct s3c_fb_pd_win	*win[S3C_FB_MAX_WIN];
49bbfce37bSArnd Bergmann 	struct fb_videomode     *vtiming;
50bbfce37bSArnd Bergmann 
51bbfce37bSArnd Bergmann 	u32			 vidcon0;
52bbfce37bSArnd Bergmann 	u32			 vidcon1;
53bbfce37bSArnd Bergmann };
54bbfce37bSArnd Bergmann 
55bbfce37bSArnd Bergmann #endif
56