Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
video-msm_fb.h
Go to the documentation of this file.
1 /* arch/arm/mach-msm/include/mach/msm_fb.h
2  *
3  * Internal shared definitions for various MSM framebuffer parts.
4  *
5  * Copyright (C) 2007 Google Incorporated
6  *
7  * This software is licensed under the terms of the GNU General Public
8  * License version 2, as published by the Free Software Foundation, and
9  * may be copied, distributed, and modified under those terms.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  */
16 
17 #ifndef _MSM_FB_H_
18 #define _MSM_FB_H_
19 
20 #include <linux/device.h>
21 
22 struct mddi_info;
23 
24 struct msm_fb_data {
25  int xres; /* x resolution in pixels */
26  int yres; /* y resolution in pixels */
27  int width; /* disply width in mm */
28  int height; /* display height in mm */
29  unsigned output_format;
30 };
31 
33  void (*func)(struct msmfb_callback *);
34 };
35 
36 enum {
40 };
41 
42 #define MSMFB_CAP_PARTIAL_UPDATES (1 << 0)
43 
45  /* turns off the fb memory */
46  int (*suspend)(struct msm_panel_data *);
47  /* turns on the fb memory */
48  int (*resume)(struct msm_panel_data *);
49  /* turns off the panel */
50  int (*blank)(struct msm_panel_data *);
51  /* turns on the panel */
52  int (*unblank)(struct msm_panel_data *);
56  /* from the enum above */
57  unsigned interface_type;
58  /* data to be passed to the fb driver */
60 
61  /* capabilities supported by the panel */
63 };
64 
70  uint32_t reg);
73  /* custom data that needs to be passed from the board file to a
74  * particular client */
77  /* from the list above */
78  unsigned interface_type;
79 };
80 
82  unsigned int clk_rate;
83  void (*power_client)(struct msm_mddi_client_data *, int on);
84 
85  /* fixup the mfr name, product id */
87 
88  struct resource *fb_resource; /*optional*/
89  /* number of clients in the list that follows */
91  /* array of client information of clients */
92  struct {
93  unsigned product_id; /* mfr id in top 16 bits, product id
94  * in lower 16 bits
95  */
96  char *name; /* the device name will be the platform
97  * device name registered for the client,
98  * it should match the name of the associated
99  * driver
100  */
101  unsigned id; /* id for mddi client device node, will also
102  * be used as device id of panel devices, if
103  * the client device will have multiple panels
104  * space must be left here for them
105  */
106  void *client_data; /* required private client data */
107  unsigned int clk_rate; /* optional: if the client requires a
108  * different mddi clk rate
109  */
111 };
112 
113 struct mdp_blit_req;
114 struct fb_info;
115 struct mdp_device {
116  struct device dev;
117  void (*dma)(struct mdp_device *mpd, uint32_t addr,
118  uint32_t stride, uint32_t w, uint32_t h, uint32_t x,
119  uint32_t y, struct msmfb_callback *callback, int interface);
121  int (*blit)(struct mdp_device *mdp, struct fb_info *fb,
122  struct mdp_blit_req *req);
123  void (*set_grp_disp)(struct mdp_device *mdp, uint32_t disp_id);
124 };
125 
126 struct class_interface;
127 int register_mdp_client(struct class_interface *class_intf);
128 
129 /**** private client data structs go below this line ***/
130 
132  /* from board file */
134  struct msm_mddi_client_data *);
136  struct msm_mddi_client_data *);
137  /* passed to panel for use by the fb driver */
139  struct msm_mddi_client_data *);
141  struct msm_mddi_client_data *);
143 };
144 
145 
146 
147 #endif