blob: e8eaac2cb7b85043c19ba7b9bfc42f7377e01eb1 [file] [log] [blame]
Thomas Gleixner2874c5f2019-05-27 08:55:01 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Tomi Valkeinen559d6702009-11-03 11:23:50 +02002/*
Peter Ujfalusi62d9e442016-05-31 11:43:12 +03003 * Copyright (C) 2016 Texas Instruments, Inc.
Tomi Valkeinen559d6702009-11-03 11:23:50 +02004 */
5
Peter Ujfalusi62d9e442016-05-31 11:43:12 +03006#ifndef __OMAPFB_DSS_H
7#define __OMAPFB_DSS_H
Tomi Valkeinen559d6702009-11-03 11:23:50 +02008
9#include <linux/list.h>
10#include <linux/kobject.h>
11#include <linux/device.h>
Tomi Valkeinen348be692012-11-07 18:17:35 +020012#include <linux/interrupt.h>
Peter Ujfalusi62d9e442016-05-31 11:43:12 +030013#include <linux/platform_data/omapdss.h>
Tomi Valkeinen559d6702009-11-03 11:23:50 +020014
Tomi Valkeinen6fcd4852013-05-10 13:02:32 +030015#include <video/videomode.h>
16
Tomi Valkeinen559d6702009-11-03 11:23:50 +020017#define DISPC_IRQ_FRAMEDONE (1 << 0)
18#define DISPC_IRQ_VSYNC (1 << 1)
19#define DISPC_IRQ_EVSYNC_EVEN (1 << 2)
20#define DISPC_IRQ_EVSYNC_ODD (1 << 3)
21#define DISPC_IRQ_ACBIAS_COUNT_STAT (1 << 4)
22#define DISPC_IRQ_PROG_LINE_NUM (1 << 5)
23#define DISPC_IRQ_GFX_FIFO_UNDERFLOW (1 << 6)
24#define DISPC_IRQ_GFX_END_WIN (1 << 7)
25#define DISPC_IRQ_PAL_GAMMA_MASK (1 << 8)
26#define DISPC_IRQ_OCP_ERR (1 << 9)
27#define DISPC_IRQ_VID1_FIFO_UNDERFLOW (1 << 10)
28#define DISPC_IRQ_VID1_END_WIN (1 << 11)
29#define DISPC_IRQ_VID2_FIFO_UNDERFLOW (1 << 12)
30#define DISPC_IRQ_VID2_END_WIN (1 << 13)
31#define DISPC_IRQ_SYNC_LOST (1 << 14)
32#define DISPC_IRQ_SYNC_LOST_DIGIT (1 << 15)
33#define DISPC_IRQ_WAKEUP (1 << 16)
Sumit Semwal2a205f32010-12-02 11:27:12 +000034#define DISPC_IRQ_SYNC_LOST2 (1 << 17)
35#define DISPC_IRQ_VSYNC2 (1 << 18)
Archit Tanejab8c095b2011-09-13 18:20:33 +053036#define DISPC_IRQ_VID3_END_WIN (1 << 19)
37#define DISPC_IRQ_VID3_FIFO_UNDERFLOW (1 << 20)
Sumit Semwal2a205f32010-12-02 11:27:12 +000038#define DISPC_IRQ_ACBIAS_COUNT_STAT2 (1 << 21)
39#define DISPC_IRQ_FRAMEDONE2 (1 << 22)
Tomi Valkeinen7f6f3c42011-08-31 13:39:03 +030040#define DISPC_IRQ_FRAMEDONEWB (1 << 23)
41#define DISPC_IRQ_FRAMEDONETV (1 << 24)
42#define DISPC_IRQ_WBBUFFEROVERFLOW (1 << 25)
Tomi Valkeinen5bcbab12015-11-04 17:10:40 +020043#define DISPC_IRQ_WBUNCOMPLETEERROR (1 << 26)
Chandrabhanu Mahapatra14d33d32012-08-27 14:23:19 +053044#define DISPC_IRQ_SYNC_LOST3 (1 << 27)
45#define DISPC_IRQ_VSYNC3 (1 << 28)
46#define DISPC_IRQ_ACBIAS_COUNT_STAT3 (1 << 29)
47#define DISPC_IRQ_FRAMEDONE3 (1 << 30)
Tomi Valkeinen559d6702009-11-03 11:23:50 +020048
49struct omap_dss_device;
50struct omap_overlay_manager;
Tomi Valkeinena97a9632012-10-24 13:52:40 +030051struct dss_lcd_mgr_config;
Ricardo Neri9c0b8422012-03-06 18:20:37 -060052struct snd_aes_iec958;
53struct snd_cea_861_aud_if;
Tomi Valkeinen8c071ca2014-06-18 12:04:29 +030054struct hdmi_avi_infoframe;
Tomi Valkeinen559d6702009-11-03 11:23:50 +020055
56enum omap_display_type {
57 OMAP_DISPLAY_TYPE_NONE = 0,
58 OMAP_DISPLAY_TYPE_DPI = 1 << 0,
59 OMAP_DISPLAY_TYPE_DBI = 1 << 1,
60 OMAP_DISPLAY_TYPE_SDI = 1 << 2,
61 OMAP_DISPLAY_TYPE_DSI = 1 << 3,
62 OMAP_DISPLAY_TYPE_VENC = 1 << 4,
Mythri P Kb1196012011-03-08 17:15:54 +053063 OMAP_DISPLAY_TYPE_HDMI = 1 << 5,
Tomi Valkeinenbc24b8b2013-05-13 13:40:33 +030064 OMAP_DISPLAY_TYPE_DVI = 1 << 6,
Tomi Valkeinen559d6702009-11-03 11:23:50 +020065};
66
67enum omap_plane {
68 OMAP_DSS_GFX = 0,
69 OMAP_DSS_VIDEO1 = 1,
Archit Tanejab8c095b2011-09-13 18:20:33 +053070 OMAP_DSS_VIDEO2 = 2,
71 OMAP_DSS_VIDEO3 = 3,
Tomi Valkeinen66a0f9e2012-08-22 16:57:02 +030072 OMAP_DSS_WB = 4,
Tomi Valkeinen559d6702009-11-03 11:23:50 +020073};
74
75enum omap_channel {
76 OMAP_DSS_CHANNEL_LCD = 0,
77 OMAP_DSS_CHANNEL_DIGIT = 1,
Sumit Semwal8613b002010-12-02 11:27:09 +000078 OMAP_DSS_CHANNEL_LCD2 = 2,
Chandrabhanu Mahapatraff6331e2012-06-19 15:08:16 +053079 OMAP_DSS_CHANNEL_LCD3 = 3,
Tomi Valkeinen249ad8a2015-11-04 17:10:45 +020080 OMAP_DSS_CHANNEL_WB = 4,
Tomi Valkeinen559d6702009-11-03 11:23:50 +020081};
82
83enum omap_color_mode {
84 OMAP_DSS_COLOR_CLUT1 = 1 << 0, /* BITMAP 1 */
85 OMAP_DSS_COLOR_CLUT2 = 1 << 1, /* BITMAP 2 */
86 OMAP_DSS_COLOR_CLUT4 = 1 << 2, /* BITMAP 4 */
87 OMAP_DSS_COLOR_CLUT8 = 1 << 3, /* BITMAP 8 */
88 OMAP_DSS_COLOR_RGB12U = 1 << 4, /* RGB12, 16-bit container */
89 OMAP_DSS_COLOR_ARGB16 = 1 << 5, /* ARGB16 */
90 OMAP_DSS_COLOR_RGB16 = 1 << 6, /* RGB16 */
91 OMAP_DSS_COLOR_RGB24U = 1 << 7, /* RGB24, 32-bit container */
92 OMAP_DSS_COLOR_RGB24P = 1 << 8, /* RGB24, 24-bit container */
93 OMAP_DSS_COLOR_YUV2 = 1 << 9, /* YUV2 4:2:2 co-sited */
94 OMAP_DSS_COLOR_UYVY = 1 << 10, /* UYVY 4:2:2 co-sited */
95 OMAP_DSS_COLOR_ARGB32 = 1 << 11, /* ARGB32 */
96 OMAP_DSS_COLOR_RGBA32 = 1 << 12, /* RGBA32 */
97 OMAP_DSS_COLOR_RGBX32 = 1 << 13, /* RGBx32 */
Amber Jainf20e4222011-05-19 19:47:50 +053098 OMAP_DSS_COLOR_NV12 = 1 << 14, /* NV12 format: YUV 4:2:0 */
99 OMAP_DSS_COLOR_RGBA16 = 1 << 15, /* RGBA16 - 4444 */
100 OMAP_DSS_COLOR_RGBX16 = 1 << 16, /* RGBx16 - 4444 */
101 OMAP_DSS_COLOR_ARGB16_1555 = 1 << 17, /* ARGB16 - 1555 */
102 OMAP_DSS_COLOR_XRGB16_1555 = 1 << 18, /* xRGB16 - 1555 */
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200103};
104
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200105enum omap_dss_load_mode {
106 OMAP_DSS_LOAD_CLUT_AND_FRAME = 0,
107 OMAP_DSS_LOAD_CLUT_ONLY = 1,
108 OMAP_DSS_LOAD_FRAME_ONLY = 2,
109 OMAP_DSS_LOAD_CLUT_ONCE_FRAME = 3,
110};
111
112enum omap_dss_trans_key_type {
113 OMAP_DSS_COLOR_KEY_GFX_DST = 0,
114 OMAP_DSS_COLOR_KEY_VID_SRC = 1,
115};
116
Archit Tanejaa8d5e412012-06-25 12:26:38 +0530117enum omap_dss_signal_level {
Tomi Valkeinen7ad582b2014-10-02 17:58:50 +0000118 OMAPDSS_SIG_ACTIVE_LOW,
119 OMAPDSS_SIG_ACTIVE_HIGH,
Archit Tanejaa8d5e412012-06-25 12:26:38 +0530120};
121
122enum omap_dss_signal_edge {
Archit Tanejaa8d5e412012-06-25 12:26:38 +0530123 OMAPDSS_DRIVE_SIG_FALLING_EDGE,
Tomi Valkeinen7ad582b2014-10-02 17:58:50 +0000124 OMAPDSS_DRIVE_SIG_RISING_EDGE,
Archit Tanejaa8d5e412012-06-25 12:26:38 +0530125};
126
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200127enum omap_dss_venc_type {
128 OMAP_DSS_VENC_TYPE_COMPOSITE,
129 OMAP_DSS_VENC_TYPE_SVIDEO,
130};
131
Archit Tanejaa3b3cc22011-09-08 18:42:16 +0530132enum omap_dss_dsi_pixel_format {
133 OMAP_DSS_DSI_FMT_RGB888,
134 OMAP_DSS_DSI_FMT_RGB666,
135 OMAP_DSS_DSI_FMT_RGB666_PACKED,
136 OMAP_DSS_DSI_FMT_RGB565,
137};
138
Archit Taneja7e951ee2011-07-22 12:45:04 +0530139enum omap_dss_dsi_mode {
140 OMAP_DSS_DSI_CMD_MODE = 0,
141 OMAP_DSS_DSI_VIDEO_MODE,
142};
143
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200144enum omap_display_caps {
145 OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE = 1 << 0,
146 OMAP_DSS_DISPLAY_CAP_TEAR_ELIM = 1 << 1,
147};
148
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200149enum omap_dss_display_state {
150 OMAP_DSS_DISPLAY_DISABLED = 0,
151 OMAP_DSS_DISPLAY_ACTIVE,
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200152};
153
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200154enum omap_dss_rotation_type {
Chandrabhanu Mahapatra65e006f2012-05-11 19:19:55 +0530155 OMAP_DSS_ROT_DMA = 1 << 0,
156 OMAP_DSS_ROT_VRFB = 1 << 1,
157 OMAP_DSS_ROT_TILER = 1 << 2,
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200158};
159
160/* clockwise rotation angle */
161enum omap_dss_rotation_angle {
162 OMAP_DSS_ROT_0 = 0,
163 OMAP_DSS_ROT_90 = 1,
164 OMAP_DSS_ROT_180 = 2,
165 OMAP_DSS_ROT_270 = 3,
166};
167
168enum omap_overlay_caps {
169 OMAP_DSS_OVL_CAP_SCALE = 1 << 0,
Tomi Valkeinenf6dc8152011-08-15 15:18:20 +0300170 OMAP_DSS_OVL_CAP_GLOBAL_ALPHA = 1 << 1,
171 OMAP_DSS_OVL_CAP_PRE_MULT_ALPHA = 1 << 2,
Archit Taneja11354dd2011-09-26 11:47:29 +0530172 OMAP_DSS_OVL_CAP_ZORDER = 1 << 3,
Archit Tanejad79db852012-09-22 12:30:17 +0530173 OMAP_DSS_OVL_CAP_POS = 1 << 4,
174 OMAP_DSS_OVL_CAP_REPLICATION = 1 << 5,
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200175};
176
Archit Taneja484dc402012-09-07 17:38:00 +0530177enum omap_dss_output_id {
178 OMAP_DSS_OUTPUT_DPI = 1 << 0,
179 OMAP_DSS_OUTPUT_DBI = 1 << 1,
180 OMAP_DSS_OUTPUT_SDI = 1 << 2,
181 OMAP_DSS_OUTPUT_DSI1 = 1 << 3,
182 OMAP_DSS_OUTPUT_DSI2 = 1 << 4,
183 OMAP_DSS_OUTPUT_VENC = 1 << 5,
184 OMAP_DSS_OUTPUT_HDMI = 1 << 6,
185};
186
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200187/* DSI */
Archit Taneja8af6ff02011-09-05 16:48:27 +0530188
Tomi Valkeinen478d7df2013-03-05 16:29:36 +0200189enum omap_dss_dsi_trans_mode {
190 /* Sync Pulses: both sync start and end packets sent */
191 OMAP_DSS_DSI_PULSE_MODE,
192 /* Sync Events: only sync start packets sent */
193 OMAP_DSS_DSI_EVENT_MODE,
194 /* Burst: only sync start packets sent, pixels are time compressed */
195 OMAP_DSS_DSI_BURST_MODE,
196};
197
Archit Taneja6b8493752012-08-13 22:12:24 +0530198struct omap_dss_dsi_videomode_timings {
Tomi Valkeinenf1e00012013-03-05 17:21:35 +0200199 unsigned long hsclk;
200
201 unsigned ndl;
202 unsigned bitspp;
203
204 /* pixels */
205 u16 hact;
206 /* lines */
207 u16 vact;
208
Archit Taneja8af6ff02011-09-05 16:48:27 +0530209 /* DSI video mode blanking data */
210 /* Unit: byte clock cycles */
Tomi Valkeinenf1e00012013-03-05 17:21:35 +0200211 u16 hss;
Archit Taneja8af6ff02011-09-05 16:48:27 +0530212 u16 hsa;
Tomi Valkeinenf1e00012013-03-05 17:21:35 +0200213 u16 hse;
Archit Taneja8af6ff02011-09-05 16:48:27 +0530214 u16 hfp;
215 u16 hbp;
216 /* Unit: line clocks */
217 u16 vsa;
218 u16 vfp;
219 u16 vbp;
220
221 /* DSI blanking modes */
222 int blanking_mode;
223 int hsa_blanking_mode;
224 int hbp_blanking_mode;
225 int hfp_blanking_mode;
226
Tomi Valkeinen478d7df2013-03-05 16:29:36 +0200227 enum omap_dss_dsi_trans_mode trans_mode;
Archit Taneja8af6ff02011-09-05 16:48:27 +0530228
229 bool ddr_clk_always_on;
230 int window_sync;
231};
232
Tomi Valkeinen777f05c2013-03-06 11:10:29 +0200233struct omap_dss_dsi_config {
234 enum omap_dss_dsi_mode mode;
235 enum omap_dss_dsi_pixel_format pixel_format;
236 const struct omap_video_timings *timings;
Tomi Valkeinen777f05c2013-03-06 11:10:29 +0200237
Tomi Valkeinenf1e00012013-03-05 17:21:35 +0200238 unsigned long hs_clk_min, hs_clk_max;
239 unsigned long lp_clk_min, lp_clk_max;
240
241 bool ddr_clk_always_on;
242 enum omap_dss_dsi_trans_mode trans_mode;
Tomi Valkeinen777f05c2013-03-06 11:10:29 +0200243};
244
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200245struct omap_video_timings {
246 /* Unit: pixels */
247 u16 x_res;
248 /* Unit: pixels */
249 u16 y_res;
Tomi Valkeinend8d789412013-04-10 14:12:14 +0300250 /* Unit: Hz */
251 u32 pixelclock;
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200252 /* Unit: pixel clocks */
253 u16 hsw; /* Horizontal synchronization pulse width */
254 /* Unit: pixel clocks */
255 u16 hfp; /* Horizontal front porch */
256 /* Unit: pixel clocks */
257 u16 hbp; /* Horizontal back porch */
258 /* Unit: line clocks */
259 u16 vsw; /* Vertical synchronization pulse width */
260 /* Unit: line clocks */
261 u16 vfp; /* Vertical front porch */
262 /* Unit: line clocks */
263 u16 vbp; /* Vertical back porch */
Archit Tanejaa8d5e412012-06-25 12:26:38 +0530264
265 /* Vsync logic level */
266 enum omap_dss_signal_level vsync_level;
267 /* Hsync logic level */
268 enum omap_dss_signal_level hsync_level;
Archit Taneja23c8f882012-06-28 11:15:51 +0530269 /* Interlaced or Progressive timings */
270 bool interlace;
Archit Tanejaa8d5e412012-06-25 12:26:38 +0530271 /* Pixel clock edge to drive LCD data */
272 enum omap_dss_signal_edge data_pclk_edge;
273 /* Data enable logic level */
274 enum omap_dss_signal_level de_level;
275 /* Pixel clock edges to drive HSYNC and VSYNC signals */
276 enum omap_dss_signal_edge sync_pclk_edge;
Tomi Valkeinen3a38ed532016-01-13 18:41:31 +0200277
278 bool double_pixel;
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200279};
280
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200281/* Hardcoded timings for tv modes. Venc only uses these to
282 * identify the mode, and does not actually use the configs
283 * itself. However, the configs should be something that
284 * a normal monitor can also show */
Tobias Klauser5a1819e2010-05-20 17:12:52 +0200285extern const struct omap_video_timings omap_dss_pal_timings;
286extern const struct omap_video_timings omap_dss_ntsc_timings;
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200287
Tomi Valkeinen3c07cae2011-06-21 09:34:30 +0300288struct omap_dss_cpr_coefs {
289 s16 rr, rg, rb;
290 s16 gr, gg, gb;
291 s16 br, bg, bb;
292};
293
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200294struct omap_overlay_info {
Arnd Bergmann24f13a62014-04-24 13:28:18 +0100295 dma_addr_t paddr;
296 dma_addr_t p_uv_addr; /* for NV12 format */
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200297 u16 screen_width;
298 u16 width;
299 u16 height;
300 enum omap_color_mode color_mode;
301 u8 rotation;
302 enum omap_dss_rotation_type rotation_type;
303 bool mirror;
304
305 u16 pos_x;
306 u16 pos_y;
307 u16 out_width; /* if 0, out_width == width */
308 u16 out_height; /* if 0, out_height == height */
309 u8 global_alpha;
Rajkumar Nfd28a392010-11-04 12:28:42 +0100310 u8 pre_mult_alpha;
Archit Taneja54128702011-09-08 11:29:17 +0530311 u8 zorder;
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200312};
313
314struct omap_overlay {
315 struct kobject kobj;
316 struct list_head list;
317
318 /* static fields */
319 const char *name;
Tomi Valkeinen4a9e78a2011-08-15 11:22:21 +0300320 enum omap_plane id;
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200321 enum omap_color_mode supported_modes;
322 enum omap_overlay_caps caps;
323
324 /* dynamic fields */
325 struct omap_overlay_manager *manager;
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200326
Tomi Valkeinen9d11c322011-11-18 12:38:38 +0200327 /*
328 * The following functions do not block:
329 *
330 * is_enabled
331 * set_overlay_info
332 * get_overlay_info
333 *
334 * The rest of the functions may block and cannot be called from
335 * interrupt context
336 */
337
Tomi Valkeinenaaa874a2011-11-15 16:37:53 +0200338 int (*enable)(struct omap_overlay *ovl);
339 int (*disable)(struct omap_overlay *ovl);
340 bool (*is_enabled)(struct omap_overlay *ovl);
341
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200342 int (*set_manager)(struct omap_overlay *ovl,
343 struct omap_overlay_manager *mgr);
344 int (*unset_manager)(struct omap_overlay *ovl);
345
346 int (*set_overlay_info)(struct omap_overlay *ovl,
347 struct omap_overlay_info *info);
348 void (*get_overlay_info)(struct omap_overlay *ovl,
349 struct omap_overlay_info *info);
350
351 int (*wait_for_go)(struct omap_overlay *ovl);
Archit Taneja794bc4e2012-09-07 17:44:51 +0530352
353 struct omap_dss_device *(*get_device)(struct omap_overlay *ovl);
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200354};
355
356struct omap_overlay_manager_info {
357 u32 default_color;
358
359 enum omap_dss_trans_key_type trans_key_type;
360 u32 trans_key;
361 bool trans_enabled;
362
Archit Taneja11354dd2011-09-26 11:47:29 +0530363 bool partial_alpha_enabled;
Tomi Valkeinen3c07cae2011-06-21 09:34:30 +0300364
365 bool cpr_enable;
366 struct omap_dss_cpr_coefs cpr_coefs;
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200367};
368
369struct omap_overlay_manager {
370 struct kobject kobj;
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200371
372 /* static fields */
373 const char *name;
Tomi Valkeinen4a9e78a2011-08-15 11:22:21 +0300374 enum omap_channel id;
Tomi Valkeinen07e327c2011-11-05 10:59:59 +0200375 struct list_head overlays;
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200376 enum omap_display_type supported_displays;
Archit Taneja97f01b32012-09-26 16:42:39 +0530377 enum omap_dss_output_id supported_outputs;
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200378
379 /* dynamic fields */
Tomi Valkeinen1f68d9c2013-04-19 15:09:34 +0300380 struct omap_dss_device *output;
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200381
Tomi Valkeinen9d11c322011-11-18 12:38:38 +0200382 /*
383 * The following functions do not block:
384 *
385 * set_manager_info
386 * get_manager_info
387 * apply
388 *
389 * The rest of the functions may block and cannot be called from
390 * interrupt context
391 */
392
Archit Taneja97f01b32012-09-26 16:42:39 +0530393 int (*set_output)(struct omap_overlay_manager *mgr,
Tomi Valkeinen1f68d9c2013-04-19 15:09:34 +0300394 struct omap_dss_device *output);
Archit Taneja97f01b32012-09-26 16:42:39 +0530395 int (*unset_output)(struct omap_overlay_manager *mgr);
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200396
397 int (*set_manager_info)(struct omap_overlay_manager *mgr,
398 struct omap_overlay_manager_info *info);
399 void (*get_manager_info)(struct omap_overlay_manager *mgr,
400 struct omap_overlay_manager_info *info);
401
402 int (*apply)(struct omap_overlay_manager *mgr);
403 int (*wait_for_go)(struct omap_overlay_manager *mgr);
Tomi Valkeinen3f71cbe2010-01-08 17:06:04 +0200404 int (*wait_for_vsync)(struct omap_overlay_manager *mgr);
Archit Taneja794bc4e2012-09-07 17:44:51 +0530405
406 struct omap_dss_device *(*get_device)(struct omap_overlay_manager *mgr);
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200407};
408
Tomi Valkeinene4a9e942012-03-28 15:58:56 +0300409/* 22 pins means 1 clk lane and 10 data lanes */
410#define OMAP_DSS_MAX_DSI_PINS 22
411
412struct omap_dsi_pin_config {
413 int num_pins;
414 /*
415 * pin numbers in the following order:
416 * clk+, clk-
417 * data1+, data1-
418 * data2+, data2-
419 * ...
420 */
421 int pins[OMAP_DSS_MAX_DSI_PINS];
422};
423
Archit Taneja749feff2012-08-31 12:32:52 +0530424struct omap_dss_writeback_info {
425 u32 paddr;
426 u32 p_uv_addr;
427 u16 buf_width;
428 u16 width;
429 u16 height;
430 enum omap_color_mode color_mode;
431 u8 rotation;
432 enum omap_dss_rotation_type rotation_type;
433 bool mirror;
434 u8 pre_mult_alpha;
435};
436
Tomi Valkeinen0b24edb2013-05-24 13:18:52 +0300437struct omapdss_dpi_ops {
438 int (*connect)(struct omap_dss_device *dssdev,
439 struct omap_dss_device *dst);
440 void (*disconnect)(struct omap_dss_device *dssdev,
441 struct omap_dss_device *dst);
442
443 int (*enable)(struct omap_dss_device *dssdev);
444 void (*disable)(struct omap_dss_device *dssdev);
445
446 int (*check_timings)(struct omap_dss_device *dssdev,
447 struct omap_video_timings *timings);
448 void (*set_timings)(struct omap_dss_device *dssdev,
449 struct omap_video_timings *timings);
450 void (*get_timings)(struct omap_dss_device *dssdev,
451 struct omap_video_timings *timings);
452
453 void (*set_data_lines)(struct omap_dss_device *dssdev, int data_lines);
454};
455
Tomi Valkeinenb1082df2013-05-24 13:19:14 +0300456struct omapdss_sdi_ops {
457 int (*connect)(struct omap_dss_device *dssdev,
458 struct omap_dss_device *dst);
459 void (*disconnect)(struct omap_dss_device *dssdev,
460 struct omap_dss_device *dst);
461
462 int (*enable)(struct omap_dss_device *dssdev);
463 void (*disable)(struct omap_dss_device *dssdev);
464
465 int (*check_timings)(struct omap_dss_device *dssdev,
466 struct omap_video_timings *timings);
467 void (*set_timings)(struct omap_dss_device *dssdev,
468 struct omap_video_timings *timings);
469 void (*get_timings)(struct omap_dss_device *dssdev,
470 struct omap_video_timings *timings);
471
472 void (*set_datapairs)(struct omap_dss_device *dssdev, int datapairs);
473};
474
Tomi Valkeinen7700c2d2013-05-24 13:19:30 +0300475struct omapdss_dvi_ops {
476 int (*connect)(struct omap_dss_device *dssdev,
477 struct omap_dss_device *dst);
478 void (*disconnect)(struct omap_dss_device *dssdev,
479 struct omap_dss_device *dst);
480
481 int (*enable)(struct omap_dss_device *dssdev);
482 void (*disable)(struct omap_dss_device *dssdev);
483
484 int (*check_timings)(struct omap_dss_device *dssdev,
485 struct omap_video_timings *timings);
486 void (*set_timings)(struct omap_dss_device *dssdev,
487 struct omap_video_timings *timings);
488 void (*get_timings)(struct omap_dss_device *dssdev,
489 struct omap_video_timings *timings);
490};
491
Tomi Valkeinenfb8efa42013-05-24 13:19:50 +0300492struct omapdss_atv_ops {
493 int (*connect)(struct omap_dss_device *dssdev,
494 struct omap_dss_device *dst);
495 void (*disconnect)(struct omap_dss_device *dssdev,
496 struct omap_dss_device *dst);
497
498 int (*enable)(struct omap_dss_device *dssdev);
499 void (*disable)(struct omap_dss_device *dssdev);
500
501 int (*check_timings)(struct omap_dss_device *dssdev,
502 struct omap_video_timings *timings);
503 void (*set_timings)(struct omap_dss_device *dssdev,
504 struct omap_video_timings *timings);
505 void (*get_timings)(struct omap_dss_device *dssdev,
506 struct omap_video_timings *timings);
507
508 void (*set_type)(struct omap_dss_device *dssdev,
509 enum omap_dss_venc_type type);
510 void (*invert_vid_out_polarity)(struct omap_dss_device *dssdev,
511 bool invert_polarity);
512
513 int (*set_wss)(struct omap_dss_device *dssdev, u32 wss);
514 u32 (*get_wss)(struct omap_dss_device *dssdev);
515};
516
Tomi Valkeinen0b450c32013-05-24 13:20:17 +0300517struct omapdss_hdmi_ops {
518 int (*connect)(struct omap_dss_device *dssdev,
519 struct omap_dss_device *dst);
520 void (*disconnect)(struct omap_dss_device *dssdev,
521 struct omap_dss_device *dst);
522
523 int (*enable)(struct omap_dss_device *dssdev);
524 void (*disable)(struct omap_dss_device *dssdev);
525
526 int (*check_timings)(struct omap_dss_device *dssdev,
527 struct omap_video_timings *timings);
528 void (*set_timings)(struct omap_dss_device *dssdev,
529 struct omap_video_timings *timings);
530 void (*get_timings)(struct omap_dss_device *dssdev,
531 struct omap_video_timings *timings);
532
533 int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len);
534 bool (*detect)(struct omap_dss_device *dssdev);
535
Tomi Valkeinen8c071ca2014-06-18 12:04:29 +0300536 int (*set_hdmi_mode)(struct omap_dss_device *dssdev, bool hdmi_mode);
537 int (*set_infoframe)(struct omap_dss_device *dssdev,
538 const struct hdmi_avi_infoframe *avi);
Tomi Valkeinen0b450c32013-05-24 13:20:17 +0300539};
540
Tomi Valkeinendeb16df2013-05-24 13:20:27 +0300541struct omapdss_dsi_ops {
542 int (*connect)(struct omap_dss_device *dssdev,
543 struct omap_dss_device *dst);
544 void (*disconnect)(struct omap_dss_device *dssdev,
545 struct omap_dss_device *dst);
546
547 int (*enable)(struct omap_dss_device *dssdev);
548 void (*disable)(struct omap_dss_device *dssdev, bool disconnect_lanes,
549 bool enter_ulps);
550
551 /* bus configuration */
552 int (*set_config)(struct omap_dss_device *dssdev,
553 const struct omap_dss_dsi_config *cfg);
554 int (*configure_pins)(struct omap_dss_device *dssdev,
555 const struct omap_dsi_pin_config *pin_cfg);
556
557 void (*enable_hs)(struct omap_dss_device *dssdev, int channel,
558 bool enable);
559 int (*enable_te)(struct omap_dss_device *dssdev, bool enable);
560
561 int (*update)(struct omap_dss_device *dssdev, int channel,
562 void (*callback)(int, void *), void *data);
563
564 void (*bus_lock)(struct omap_dss_device *dssdev);
565 void (*bus_unlock)(struct omap_dss_device *dssdev);
566
567 int (*enable_video_output)(struct omap_dss_device *dssdev, int channel);
568 void (*disable_video_output)(struct omap_dss_device *dssdev,
569 int channel);
570
571 int (*request_vc)(struct omap_dss_device *dssdev, int *channel);
572 int (*set_vc_id)(struct omap_dss_device *dssdev, int channel,
573 int vc_id);
574 void (*release_vc)(struct omap_dss_device *dssdev, int channel);
575
576 /* data transfer */
577 int (*dcs_write)(struct omap_dss_device *dssdev, int channel,
578 u8 *data, int len);
579 int (*dcs_write_nosync)(struct omap_dss_device *dssdev, int channel,
580 u8 *data, int len);
581 int (*dcs_read)(struct omap_dss_device *dssdev, int channel, u8 dcs_cmd,
582 u8 *data, int len);
583
584 int (*gen_write)(struct omap_dss_device *dssdev, int channel,
585 u8 *data, int len);
586 int (*gen_write_nosync)(struct omap_dss_device *dssdev, int channel,
587 u8 *data, int len);
588 int (*gen_read)(struct omap_dss_device *dssdev, int channel,
589 u8 *reqdata, int reqlen,
590 u8 *data, int len);
591
592 int (*bta_sync)(struct omap_dss_device *dssdev, int channel);
593
594 int (*set_max_rx_packet_size)(struct omap_dss_device *dssdev,
595 int channel, u16 plen);
596};
597
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200598struct omap_dss_device {
Tomi Valkeinena38bb792015-02-25 10:23:58 +0200599 struct kobject kobj;
Tomi Valkeinenecc8b372013-02-14 14:17:28 +0200600 struct device *dev;
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200601
Tomi Valkeinen4f3e44e2013-05-03 11:35:43 +0300602 struct module *owner;
603
Tomi Valkeinen2e7e3dc2012-11-16 15:45:26 +0200604 struct list_head panel_list;
605
606 /* alias in the form of "display%d" */
607 char alias[16];
608
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200609 enum omap_display_type type;
Tomi Valkeinen1f68d9c2013-04-19 15:09:34 +0300610 enum omap_display_type output_type;
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200611
612 union {
613 struct {
614 u8 data_lines;
615 } dpi;
616
617 struct {
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200618 u8 datapairs;
619 } sdi;
620
621 struct {
Archit Tanejaa72b64b2011-05-12 17:26:26 +0530622 int module;
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200623 } dsi;
624
625 struct {
626 enum omap_dss_venc_type type;
627 bool invert_polarity;
628 } venc;
629 } phy;
630
631 struct {
632 struct omap_video_timings timings;
633
Archit Tanejaa3b3cc22011-09-08 18:42:16 +0530634 enum omap_dss_dsi_pixel_format dsi_pix_fmt;
Archit Taneja7e951ee2011-07-22 12:45:04 +0530635 enum omap_dss_dsi_mode dsi_mode;
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200636 } panel;
637
638 struct {
639 u8 pixel_size;
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200640 } ctrl;
641
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200642 const char *name;
643
644 /* used to match device to driver */
645 const char *driver_name;
646
647 void *data;
648
649 struct omap_dss_driver *driver;
650
Tomi Valkeinen0b24edb2013-05-24 13:18:52 +0300651 union {
652 const struct omapdss_dpi_ops *dpi;
Tomi Valkeinenb1082df2013-05-24 13:19:14 +0300653 const struct omapdss_sdi_ops *sdi;
Tomi Valkeinen7700c2d2013-05-24 13:19:30 +0300654 const struct omapdss_dvi_ops *dvi;
Tomi Valkeinen0b450c32013-05-24 13:20:17 +0300655 const struct omapdss_hdmi_ops *hdmi;
Tomi Valkeinenfb8efa42013-05-24 13:19:50 +0300656 const struct omapdss_atv_ops *atv;
Tomi Valkeinendeb16df2013-05-24 13:20:27 +0300657 const struct omapdss_dsi_ops *dsi;
Tomi Valkeinen0b24edb2013-05-24 13:18:52 +0300658 } ops;
659
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200660 /* helper variable for driver suspend/resume */
661 bool activate_after_resume;
662
663 enum omap_display_caps caps;
664
Tomi Valkeinena73fdc62013-07-24 13:01:34 +0300665 struct omap_dss_device *src;
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200666
667 enum omap_dss_display_state state;
668
Tomi Valkeinen1f68d9c2013-04-19 15:09:34 +0300669 /* OMAP DSS output specific fields */
670
671 struct list_head list;
672
673 /* DISPC channel for this output */
674 enum omap_channel dispc_channel;
Tomi Valkeinen49239502015-11-05 09:34:31 +0200675 bool dispc_channel_connected;
Tomi Valkeinen1f68d9c2013-04-19 15:09:34 +0300676
677 /* output instance */
678 enum omap_dss_output_id id;
679
Archit Tanejaef691ff2014-04-22 17:43:48 +0530680 /* the port number in the DT node */
681 int port_num;
682
Tomi Valkeinen1f68d9c2013-04-19 15:09:34 +0300683 /* dynamic fields */
684 struct omap_overlay_manager *manager;
685
Tomi Valkeinen9560dc102013-07-24 13:06:54 +0300686 struct omap_dss_device *dst;
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200687};
688
689struct omap_dss_driver {
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200690 int (*probe)(struct omap_dss_device *);
691 void (*remove)(struct omap_dss_device *);
692
Tomi Valkeinena7e71e72013-05-08 16:23:32 +0300693 int (*connect)(struct omap_dss_device *dssdev);
694 void (*disconnect)(struct omap_dss_device *dssdev);
695
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200696 int (*enable)(struct omap_dss_device *display);
697 void (*disable)(struct omap_dss_device *display);
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200698 int (*run_test)(struct omap_dss_device *display, int test);
699
Tomi Valkeinen18946f62010-01-12 14:16:41 +0200700 int (*update)(struct omap_dss_device *dssdev,
701 u16 x, u16 y, u16 w, u16 h);
702 int (*sync)(struct omap_dss_device *dssdev);
703
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200704 int (*enable_te)(struct omap_dss_device *dssdev, bool enable);
Tomi Valkeinen225b6502010-01-11 15:11:01 +0200705 int (*get_te)(struct omap_dss_device *dssdev);
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200706
707 u8 (*get_rotate)(struct omap_dss_device *dssdev);
708 int (*set_rotate)(struct omap_dss_device *dssdev, u8 rotate);
709
710 bool (*get_mirror)(struct omap_dss_device *dssdev);
711 int (*set_mirror)(struct omap_dss_device *dssdev, bool enable);
712
713 int (*memory_read)(struct omap_dss_device *dssdev,
714 void *buf, size_t size,
715 u16 x, u16 y, u16 w, u16 h);
Tomi Valkeinen96adcec2010-01-11 13:54:33 +0200716
717 void (*get_resolution)(struct omap_dss_device *dssdev,
718 u16 *xres, u16 *yres);
Jani Nikula7a0987b2010-06-16 15:26:36 +0300719 void (*get_dimensions)(struct omap_dss_device *dssdev,
720 u32 *width, u32 *height);
Tomi Valkeinena2699502010-01-11 14:33:40 +0200721 int (*get_recommended_bpp)(struct omap_dss_device *dssdev);
Tomi Valkeinen36511312010-01-19 15:53:16 +0200722
Tomi Valkeinen69b20482010-01-20 12:11:25 +0200723 int (*check_timings)(struct omap_dss_device *dssdev,
724 struct omap_video_timings *timings);
725 void (*set_timings)(struct omap_dss_device *dssdev,
726 struct omap_video_timings *timings);
727 void (*get_timings)(struct omap_dss_device *dssdev,
728 struct omap_video_timings *timings);
729
Tomi Valkeinen36511312010-01-19 15:53:16 +0200730 int (*set_wss)(struct omap_dss_device *dssdev, u32 wss);
731 u32 (*get_wss)(struct omap_dss_device *dssdev);
Tomi Valkeinen3d5e0ef2011-08-25 17:10:41 +0300732
733 int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len);
Tomi Valkeinendf4769c2011-08-29 17:26:01 +0300734 bool (*detect)(struct omap_dss_device *dssdev);
Ricardo Neri9c0b8422012-03-06 18:20:37 -0600735
Tomi Valkeinen8c071ca2014-06-18 12:04:29 +0300736 int (*set_hdmi_mode)(struct omap_dss_device *dssdev, bool hdmi_mode);
737 int (*set_hdmi_infoframe)(struct omap_dss_device *dssdev,
738 const struct hdmi_avi_infoframe *avi);
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200739};
740
Mauro Carvalho Chehab771f7be2018-04-20 13:42:51 -0400741#define for_each_dss_dev(d) while ((d = omap_dss_get_next_device(d)) != NULL)
742
743typedef void (*omap_dispc_isr_t) (void *arg, u32 mask);
744
Mauro Carvalho Chehabf10379a2018-05-04 16:49:32 -0400745#if IS_ENABLED(CONFIG_FB_OMAP2)
Mauro Carvalho Chehab771f7be2018-04-20 13:42:51 -0400746
Tomi Valkeinenb2c7d542012-10-18 13:46:29 +0300747enum omapdss_version omapdss_get_version(void);
Tomi Valkeinen591a0ac2013-05-23 12:07:50 +0300748bool omapdss_is_initialized(void);
Tomi Valkeinenb2c7d542012-10-18 13:46:29 +0300749
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200750int omap_dss_register_driver(struct omap_dss_driver *);
751void omap_dss_unregister_driver(struct omap_dss_driver *);
752
Tomi Valkeinen2e7e3dc2012-11-16 15:45:26 +0200753int omapdss_register_display(struct omap_dss_device *dssdev);
754void omapdss_unregister_display(struct omap_dss_device *dssdev);
755
Tomi Valkeinend35317a2013-05-03 11:40:54 +0300756struct omap_dss_device *omap_dss_get_device(struct omap_dss_device *dssdev);
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200757void omap_dss_put_device(struct omap_dss_device *dssdev);
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200758struct omap_dss_device *omap_dss_get_next_device(struct omap_dss_device *from);
759struct omap_dss_device *omap_dss_find_device(void *data,
760 int (*match)(struct omap_dss_device *dssdev, void *data));
Tomi Valkeinen2bbcce52012-10-29 12:40:46 +0200761const char *omapdss_get_default_display_name(void);
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200762
Tomi Valkeinen6fcd4852013-05-10 13:02:32 +0300763void videomode_to_omap_video_timings(const struct videomode *vm,
764 struct omap_video_timings *ovt);
765void omap_video_timings_to_videomode(const struct omap_video_timings *ovt,
766 struct videomode *vm);
767
Tomi Valkeineneda34272012-11-07 16:26:11 +0200768int dss_feat_get_num_mgrs(void);
769int dss_feat_get_num_ovls(void);
Tomi Valkeineneda34272012-11-07 16:26:11 +0200770enum omap_color_mode dss_feat_get_supported_color_modes(enum omap_plane plane);
771
772
773
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200774int omap_dss_get_num_overlay_managers(void);
775struct omap_overlay_manager *omap_dss_get_overlay_manager(int num);
776
777int omap_dss_get_num_overlays(void);
778struct omap_overlay *omap_dss_get_overlay(int num);
779
Tomi Valkeinen5d47dbc2013-04-24 13:32:51 +0300780int omapdss_register_output(struct omap_dss_device *output);
781void omapdss_unregister_output(struct omap_dss_device *output);
Tomi Valkeinen1f68d9c2013-04-19 15:09:34 +0300782struct omap_dss_device *omap_dss_get_output(enum omap_dss_output_id id);
783struct omap_dss_device *omap_dss_find_output(const char *name);
Archit Tanejaef691ff2014-04-22 17:43:48 +0530784struct omap_dss_device *omap_dss_find_output_by_port_node(struct device_node *port);
Tomi Valkeinen1f68d9c2013-04-19 15:09:34 +0300785int omapdss_output_set_device(struct omap_dss_device *out,
Archit Taneja6d71b922012-08-29 13:30:15 +0530786 struct omap_dss_device *dssdev);
Tomi Valkeinen1f68d9c2013-04-19 15:09:34 +0300787int omapdss_output_unset_device(struct omap_dss_device *out);
Archit Taneja484dc402012-09-07 17:38:00 +0530788
Tomi Valkeinen1f68d9c2013-04-19 15:09:34 +0300789struct omap_dss_device *omapdss_find_output_from_display(struct omap_dss_device *dssdev);
Tomi Valkeinenbe8e8e12013-04-23 15:35:35 +0300790struct omap_overlay_manager *omapdss_find_mgr_from_display(struct omap_dss_device *dssdev);
791
Tomi Valkeinen96adcec2010-01-11 13:54:33 +0200792void omapdss_default_get_resolution(struct omap_dss_device *dssdev,
793 u16 *xres, u16 *yres);
Tomi Valkeinena2699502010-01-11 14:33:40 +0200794int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev);
Grazvydas Ignotas4b6430f2012-03-15 20:00:23 +0200795void omapdss_default_get_timings(struct omap_dss_device *dssdev,
796 struct omap_video_timings *timings);
Tomi Valkeinena2699502010-01-11 14:33:40 +0200797
Tomi Valkeinen559d6702009-11-03 11:23:50 +0200798int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask);
799int omap_dispc_unregister_isr(omap_dispc_isr_t isr, void *arg, u32 mask);
800
Tomi Valkeinen8dd24912012-10-10 10:26:45 +0300801int omapdss_compat_init(void);
802void omapdss_compat_uninit(void);
803
Tomi Valkeinena7e71e72013-05-08 16:23:32 +0300804static inline bool omapdss_device_is_connected(struct omap_dss_device *dssdev)
805{
Tomi Valkeinena73fdc62013-07-24 13:01:34 +0300806 return dssdev->src;
Tomi Valkeinena7e71e72013-05-08 16:23:32 +0300807}
808
809static inline bool omapdss_device_is_enabled(struct omap_dss_device *dssdev)
810{
811 return dssdev->state == OMAP_DSS_DISPLAY_ACTIVE;
812}
813
Tomi Valkeinen4e7470d2013-12-03 16:57:40 +0200814struct device_node *
815omapdss_of_get_next_port(const struct device_node *parent,
816 struct device_node *prev);
817
818struct device_node *
819omapdss_of_get_next_endpoint(const struct device_node *parent,
820 struct device_node *prev);
821
822struct device_node *
823omapdss_of_get_first_endpoint(const struct device_node *parent);
824
825struct omap_dss_device *
826omapdss_of_find_source_for_first_ep(struct device_node *node);
Mauro Carvalho Chehab771f7be2018-04-20 13:42:51 -0400827#else
828
829static inline enum omapdss_version omapdss_get_version(void)
830{ return OMAPDSS_VER_UNKNOWN; };
831
832static inline bool omapdss_is_initialized(void)
833{ return false; };
834
835static inline int omap_dispc_register_isr(omap_dispc_isr_t isr,
836 void *arg, u32 mask)
837{ return 0; };
838
839static inline int omap_dispc_unregister_isr(omap_dispc_isr_t isr,
840 void *arg, u32 mask)
841{ return 0; };
842
843static inline struct omap_dss_device
844*omap_dss_get_device(struct omap_dss_device *dssdev)
845{ return NULL; };
846
847static inline struct omap_dss_device
848*omap_dss_get_next_device(struct omap_dss_device *from)
849{return NULL; };
850
851static inline void omap_dss_put_device(struct omap_dss_device *dssdev) {};
852
853static inline int omapdss_compat_init(void)
854{ return 0; };
855
856static inline void omapdss_compat_uninit(void) {};
857
858static inline int omap_dss_get_num_overlay_managers(void)
859{ return 0; };
860
861static inline struct omap_overlay_manager *omap_dss_get_overlay_manager(int num)
862{ return NULL; };
863
864static inline int omap_dss_get_num_overlays(void)
865{ return 0; };
866
867static inline struct omap_overlay *omap_dss_get_overlay(int num)
868{ return NULL; };
869
870
871#endif /* FB_OMAP2 */
872
Tomi Valkeinen4e7470d2013-12-03 16:57:40 +0200873
Peter Ujfalusi62d9e442016-05-31 11:43:12 +0300874#endif /* __OMAPFB_DSS_H */