2 * drivers/video/tegra/dc/dc_priv.h
4 * Copyright (C) 2010 Google, Inc.
5 * Author: Erik Gilling <konkers@android.com>
7 * Copyright (c) 2010-2015, NVIDIA CORPORATION, All rights reserved.
9 * This software is licensed under the terms of the GNU General Public
10 * License version 2, as published by the Free Software Foundation, and
11 * may be copied, distributed, and modified under those terms.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
20 #ifndef __DRIVERS_VIDEO_TEGRA_DC_DC_PRIV_H
21 #define __DRIVERS_VIDEO_TEGRA_DC_DC_PRIV_H
23 #include "dc_priv_defs.h"
24 #ifndef CREATE_TRACE_POINTS
25 # include <trace/events/display.h>
26 #define WIN_IS_BLOCKLINEAR(win) ((win)->flags & TEGRA_WIN_FLAG_BLOCKLINEAR)
28 #include <linux/tegra-powergate.h>
29 #include <video/tegra_dc_ext.h>
32 #define WIN_IS_TILED(win) ((win)->flags & TEGRA_WIN_FLAG_TILED)
33 #define WIN_IS_ENABLED(win) ((win)->flags & TEGRA_WIN_FLAG_ENABLED)
34 #define WIN_IS_FB(win) ((win)->flags & TEGRA_WIN_FLAG_FB)
36 #define WIN_IS_INTERLACE(win) ((win)->flags & TEGRA_WIN_FLAG_INTERLACE)
38 #if defined(CONFIG_ARCH_TEGRA_14x_SOC)
39 #define WIN_ALL_ACT_REQ (WIN_A_ACT_REQ | WIN_B_ACT_REQ | WIN_C_ACT_REQ | \
40 WIN_D_ACT_REQ | WIN_H_ACT_REQ)
42 #define WIN_ALL_ACT_REQ (WIN_A_ACT_REQ | WIN_B_ACT_REQ | WIN_C_ACT_REQ)
46 * Second definition is needed to prevent inadvertent sanity failures
49 #ifndef CONFIG_ARCH_TEGRA_VCM30T124
50 #define tegra_dc_hotplug_supported(dc) (dc && dc->out ? \
51 (dc->out->hotplug_gpio >= 0 && \
52 !(dc->out->type == TEGRA_DC_OUT_DP && \
53 !tegra_dc_is_ext_dp_panel(dc))) : 0)
55 #define tegra_dc_hotplug_supported(dc) (dc && dc->out ? \
56 (dc->out->hotplug_gpio >= 0 || \
57 dc->out->type == TEGRA_DC_OUT_DP) : 0)
60 static inline int tegra_dc_io_start(struct tegra_dc *dc)
63 ret = nvhost_module_busy_ext(dc->ndev);
65 dev_warn(&dc->ndev->dev,
66 "Host1x powerup failed with err=%d\n", ret);
71 static inline void tegra_dc_io_end(struct tegra_dc *dc)
73 nvhost_module_idle_ext(dc->ndev);
76 static inline unsigned long tegra_dc_readl(struct tegra_dc *dc,
81 if (likely(tegra_platform_is_silicon())) {
82 BUG_ON(!nvhost_module_powered_ext(dc->ndev));
83 if (WARN(!tegra_is_clk_enabled(dc->clk),
84 "DC is clock-gated.\n") ||
85 WARN(!tegra_powergate_is_powered(
86 dc->powergate_id), "DC is power-gated.\n"))
90 ret = readl(dc->base + reg * 4);
91 trace_display_readl(dc, ret, dc->base + reg * 4);
95 static inline void tegra_dc_writel(struct tegra_dc *dc, unsigned long val,
98 if (likely(tegra_platform_is_silicon())) {
99 BUG_ON(!nvhost_module_powered_ext(dc->ndev));
100 if (WARN(!tegra_is_clk_enabled(dc->clk),
101 "DC is clock-gated.\n") ||
102 WARN(!tegra_powergate_is_powered(
103 dc->powergate_id), "DC is power-gated.\n"))
107 trace_display_writel(dc, val, dc->base + reg * 4);
108 writel(val, dc->base + reg * 4);
111 static inline void tegra_dc_power_on(struct tegra_dc *dc)
113 tegra_dc_writel(dc, PW0_ENABLE | PW1_ENABLE | PW2_ENABLE | PW3_ENABLE |
114 PW4_ENABLE | PM0_ENABLE | PM1_ENABLE,
115 DC_CMD_DISPLAY_POWER_CONTROL);
118 static inline void _tegra_dc_write_table(struct tegra_dc *dc, const u32 *table,
123 for (i = 0; i < len; i++)
124 tegra_dc_writel(dc, table[i * 2 + 1], table[i * 2]);
127 #define tegra_dc_write_table(dc, table) \
128 _tegra_dc_write_table(dc, table, ARRAY_SIZE(table) / 2)
130 static inline void tegra_dc_set_outdata(struct tegra_dc *dc, void *data)
135 static inline void *tegra_dc_get_outdata(struct tegra_dc *dc)
140 static inline unsigned long tegra_dc_get_default_emc_clk_rate(
143 return dc->pdata->emc_clk_rate ? dc->pdata->emc_clk_rate : ULONG_MAX;
146 /* return the color format field */
147 static inline int tegra_dc_fmt(int fmt)
149 return (fmt & TEGRA_DC_EXT_FMT_MASK) >> TEGRA_DC_EXT_FMT_SHIFT;
152 /* return the byte swap field */
153 static inline int tegra_dc_fmt_byteorder(int fmt)
155 return (fmt & TEGRA_DC_EXT_FMT_BYTEORDER_MASK) >>
156 TEGRA_DC_EXT_FMT_BYTEORDER_SHIFT;
159 static inline int tegra_dc_fmt_bpp(int fmt)
161 switch (tegra_dc_fmt(fmt)) {
162 case TEGRA_WIN_FMT_P1:
165 case TEGRA_WIN_FMT_P2:
168 case TEGRA_WIN_FMT_P4:
171 case TEGRA_WIN_FMT_P8:
174 case TEGRA_WIN_FMT_B4G4R4A4:
175 case TEGRA_WIN_FMT_B5G5R5A:
176 case TEGRA_WIN_FMT_B5G6R5:
177 case TEGRA_WIN_FMT_AB5G5R5:
178 case TEGRA_WIN_FMT_T_R4G4B4A4:
181 case TEGRA_WIN_FMT_B8G8R8A8:
182 case TEGRA_WIN_FMT_R8G8B8A8:
183 case TEGRA_WIN_FMT_B6x2G6x2R6x2A8:
184 case TEGRA_WIN_FMT_R6x2G6x2B6x2A8:
185 case TEGRA_WIN_FMT_T_A2R10G10B10:
186 case TEGRA_WIN_FMT_T_A2B10G10R10:
187 case TEGRA_WIN_FMT_T_X2BL10GL10RL10_XRBIAS:
188 case TEGRA_WIN_FMT_T_X2BL10GL10RL10_XVYCC:
191 /* for planar formats, size of the Y plane, 8bit */
192 case TEGRA_WIN_FMT_YCbCr420P:
193 case TEGRA_WIN_FMT_YUV420P:
194 case TEGRA_WIN_FMT_YCbCr422P:
195 case TEGRA_WIN_FMT_YUV422P:
196 case TEGRA_WIN_FMT_YCbCr422R:
197 case TEGRA_WIN_FMT_YUV422R:
198 case TEGRA_WIN_FMT_YCbCr422RA:
199 case TEGRA_WIN_FMT_YUV422RA:
200 case TEGRA_WIN_FMT_YCbCr444P:
201 case TEGRA_WIN_FMT_YUV444P:
202 case TEGRA_WIN_FMT_YUV422SP:
203 case TEGRA_WIN_FMT_YUV420SP:
204 case TEGRA_WIN_FMT_YCbCr420SP:
205 case TEGRA_WIN_FMT_YCbCr422SP:
206 case TEGRA_WIN_FMT_T_Y10___U10___V10_N420:
207 case TEGRA_WIN_FMT_T_Y10___U10___V10_N444:
208 case TEGRA_WIN_FMT_T_Y10___V10U10_N420:
209 case TEGRA_WIN_FMT_T_Y10___U10V10_N422:
210 case TEGRA_WIN_FMT_T_Y10___U10V10_N422R:
211 case TEGRA_WIN_FMT_T_Y10___U10V10_N444:
212 case TEGRA_WIN_FMT_T_Y12___U12___V12_N420:
213 case TEGRA_WIN_FMT_T_Y12___U12___V12_N444:
214 case TEGRA_WIN_FMT_T_Y12___V12U12_N420:
215 case TEGRA_WIN_FMT_T_Y12___U12V12_N422:
216 case TEGRA_WIN_FMT_T_Y12___U12V12_N422R:
217 case TEGRA_WIN_FMT_T_Y12___U12V12_N444:
220 /* YUV packed into 32-bits */
221 case TEGRA_WIN_FMT_YCbCr422:
222 case TEGRA_WIN_FMT_YUV422:
225 /* RGB with 64-bits size */
226 case TEGRA_WIN_FMT_T_R16_G16_B16_A16:
233 static inline bool tegra_dc_is_yuv(int fmt)
235 switch (tegra_dc_fmt(fmt)) {
236 case TEGRA_WIN_FMT_YUV420P:
237 case TEGRA_WIN_FMT_YCbCr420P:
238 case TEGRA_WIN_FMT_YCbCr422P:
239 case TEGRA_WIN_FMT_YUV422P:
240 case TEGRA_WIN_FMT_YCbCr422:
241 case TEGRA_WIN_FMT_YUV422:
242 case TEGRA_WIN_FMT_YCbCr422R:
243 case TEGRA_WIN_FMT_YUV422R:
244 case TEGRA_WIN_FMT_YCbCr422RA:
245 case TEGRA_WIN_FMT_YUV422RA:
246 case TEGRA_WIN_FMT_YCbCr444P:
247 case TEGRA_WIN_FMT_YUV444P:
248 case TEGRA_WIN_FMT_YUV422SP:
249 case TEGRA_WIN_FMT_YCbCr422SP:
250 case TEGRA_WIN_FMT_YCbCr420SP:
251 case TEGRA_WIN_FMT_YUV420SP:
253 case TEGRA_WIN_FMT_T_Y10___U10___V10_N420:
254 case TEGRA_WIN_FMT_T_Y10___U10___V10_N444:
255 case TEGRA_WIN_FMT_T_Y10___V10U10_N420:
256 case TEGRA_WIN_FMT_T_Y10___U10V10_N422:
257 case TEGRA_WIN_FMT_T_Y10___U10V10_N422R:
258 case TEGRA_WIN_FMT_T_Y10___U10V10_N444:
259 case TEGRA_WIN_FMT_T_Y12___U12___V12_N420:
260 case TEGRA_WIN_FMT_T_Y12___U12___V12_N444:
261 case TEGRA_WIN_FMT_T_Y12___V12U12_N420:
262 case TEGRA_WIN_FMT_T_Y12___U12V12_N422:
263 case TEGRA_WIN_FMT_T_Y12___U12V12_N422R:
264 case TEGRA_WIN_FMT_T_Y12___U12V12_N444:
271 static inline bool tegra_dc_is_yuv_planar(int fmt)
273 switch (tegra_dc_fmt(fmt)) {
274 case TEGRA_WIN_FMT_YUV420P:
275 case TEGRA_WIN_FMT_YCbCr420P:
276 case TEGRA_WIN_FMT_YCbCr422P:
277 case TEGRA_WIN_FMT_YUV422P:
278 case TEGRA_WIN_FMT_YCbCr422R:
279 case TEGRA_WIN_FMT_YUV422R:
280 case TEGRA_WIN_FMT_YCbCr422RA:
281 case TEGRA_WIN_FMT_YUV422RA:
282 case TEGRA_WIN_FMT_YCbCr444P:
283 case TEGRA_WIN_FMT_YUV444P:
284 case TEGRA_WIN_FMT_T_Y10___U10___V10_N420:
285 case TEGRA_WIN_FMT_T_Y10___U10___V10_N444:
286 case TEGRA_WIN_FMT_T_Y10___V10U10_N420:
287 case TEGRA_WIN_FMT_T_Y10___U10V10_N422:
288 case TEGRA_WIN_FMT_T_Y10___U10V10_N422R:
289 case TEGRA_WIN_FMT_T_Y10___U10V10_N444:
290 case TEGRA_WIN_FMT_T_Y12___U12___V12_N420:
291 case TEGRA_WIN_FMT_T_Y12___U12___V12_N444:
292 case TEGRA_WIN_FMT_T_Y12___V12U12_N420:
293 case TEGRA_WIN_FMT_T_Y12___U12V12_N422:
294 case TEGRA_WIN_FMT_T_Y12___U12V12_N422R:
295 case TEGRA_WIN_FMT_T_Y12___U12V12_N444:
301 static inline bool tegra_dc_is_yuv_full_planar(int fmt)
304 case TEGRA_WIN_FMT_YCbCr444P:
305 case TEGRA_WIN_FMT_YUV444P:
306 case TEGRA_WIN_FMT_T_Y10___U10___V10_N420:
307 case TEGRA_WIN_FMT_T_Y10___U10___V10_N444:
308 case TEGRA_WIN_FMT_T_Y12___U12___V12_N420:
309 case TEGRA_WIN_FMT_T_Y12___U12___V12_N444:
315 static inline bool tegra_dc_is_yuv_semi_planar(int fmt)
318 case TEGRA_WIN_FMT_YUV420SP:
319 case TEGRA_WIN_FMT_YCbCr420SP:
320 case TEGRA_WIN_FMT_YCbCr422SP:
321 case TEGRA_WIN_FMT_YUV422SP:
322 case TEGRA_WIN_FMT_T_Y10___V10U10_N420:
323 case TEGRA_WIN_FMT_T_Y10___U10V10_N422:
324 case TEGRA_WIN_FMT_T_Y10___U10V10_N422R:
325 case TEGRA_WIN_FMT_T_Y10___U10V10_N444:
326 case TEGRA_WIN_FMT_T_Y12___V12U12_N420:
327 case TEGRA_WIN_FMT_T_Y12___U12V12_N422:
328 case TEGRA_WIN_FMT_T_Y12___U12V12_N422R:
329 case TEGRA_WIN_FMT_T_Y12___U12V12_N444:
335 static inline u32 tegra_dc_unmask_interrupt(struct tegra_dc *dc, u32 int_val)
339 val = tegra_dc_readl(dc, DC_CMD_INT_MASK);
340 tegra_dc_writel(dc, val | int_val, DC_CMD_INT_MASK);
344 static inline u32 tegra_dc_flush_interrupt(struct tegra_dc *dc, u32 val)
348 local_irq_save(flag);
350 tegra_dc_writel(dc, val, DC_CMD_INT_STATUS);
352 local_irq_restore(flag);
357 static inline u32 tegra_dc_mask_interrupt(struct tegra_dc *dc, u32 int_val)
361 val = tegra_dc_readl(dc, DC_CMD_INT_MASK);
362 tegra_dc_writel(dc, val & ~int_val, DC_CMD_INT_MASK);
366 static inline void tegra_dc_restore_interrupt(struct tegra_dc *dc, u32 val)
368 tegra_dc_writel(dc, val, DC_CMD_INT_MASK);
371 static inline unsigned long tegra_dc_clk_get_rate(struct tegra_dc *dc)
373 if (!tegra_platform_is_silicon())
374 return dc->mode.pclk;
376 return clk_get_rate(dc->clk);
379 #if !defined(CONFIG_ARCH_TEGRA_2x_SOC) && !defined(CONFIG_ARCH_TEGRA_3x_SOC)
380 static inline void tegra_dc_powergate_locked(struct tegra_dc *dc)
382 tegra_powergate_partition(dc->powergate_id);
385 static inline void tegra_dc_unpowergate_locked(struct tegra_dc *dc)
388 ret = tegra_unpowergate_partition(dc->powergate_id);
390 dev_err(&dc->ndev->dev, "%s: could not unpowergate %d\n",
394 static inline bool tegra_dc_is_powered(struct tegra_dc *dc)
396 return tegra_powergate_is_powered(dc->powergate_id);
399 static inline void tegra_dc_set_edid(struct tegra_dc *dc,
400 struct tegra_edid *edid)
405 void tegra_dc_powergate_locked(struct tegra_dc *dc);
406 void tegra_dc_unpowergate_locked(struct tegra_dc *dc);
408 static inline void tegra_dc_powergate_locked(struct tegra_dc *dc) { }
409 static inline void tegra_dc_unpowergate_locked(struct tegra_dc *dc) { }
410 static inline bool tegra_dc_is_powered(struct tegra_dc *dc)
416 #ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
417 static inline u32 tegra_dc_reg_l32(dma_addr_t v)
419 return v & 0xffffffff;
422 static inline u32 tegra_dc_reg_h32(dma_addr_t v)
427 static inline u32 tegra_dc_reg_l32(dma_addr_t v)
432 static inline u32 tegra_dc_reg_h32(dma_addr_t v)
437 extern struct tegra_dc_out_ops tegra_dc_rgb_ops;
438 extern struct tegra_dc_out_ops tegra_dc_dsi_ops;
440 #if defined(CONFIG_TEGRA_HDMI2_0)
441 extern struct tegra_dc_out_ops tegra_dc_hdmi2_0_ops;
442 #elif defined(CONFIG_TEGRA_HDMI)
443 extern struct tegra_dc_out_ops tegra_dc_hdmi_ops;
446 #ifdef CONFIG_TEGRA_DP
447 extern struct tegra_dc_out_ops tegra_dc_dp_ops;
449 #ifdef CONFIG_TEGRA_LVDS
450 extern struct tegra_dc_out_ops tegra_dc_lvds_ops;
452 #ifdef CONFIG_TEGRA_NVSR
453 extern struct tegra_dc_out_ops tegra_dc_nvsr_ops;
456 extern struct tegra_dc_out_ops tegra_dc_null_ops;
458 /* defined in dc_sysfs.c, used by dc.c */
459 void tegra_dc_remove_sysfs(struct device *dev);
460 void tegra_dc_create_sysfs(struct device *dev);
462 /* defined in dc.c, used by dc_sysfs.c */
463 void tegra_dc_stats_enable(struct tegra_dc *dc, bool enable);
464 bool tegra_dc_stats_get(struct tegra_dc *dc);
466 /* defined in dc.c, used by dc_sysfs.c */
467 u32 tegra_dc_read_checksum_latched(struct tegra_dc *dc);
468 void tegra_dc_enable_crc(struct tegra_dc *dc);
469 void tegra_dc_disable_crc(struct tegra_dc *dc);
471 void tegra_dc_set_out_pin_polars(struct tegra_dc *dc,
472 const struct tegra_dc_out_pin *pins,
473 const unsigned int n_pins);
474 /* defined in dc.c, used in bandwidth.c and ext/dev.c */
475 unsigned int tegra_dc_has_multiple_dc(void);
477 /* defined in dc.c, used in hdmihdcp.c */
478 int tegra_dc_ddc_enable(struct tegra_dc *dc, bool enabled);
480 /* defined in dc.c, used in dsi.c */
481 void tegra_dc_clk_enable(struct tegra_dc *dc);
482 void tegra_dc_clk_disable(struct tegra_dc *dc);
484 /* defined in dc.c, used in nvsd.c and dsi.c */
485 void tegra_dc_get(struct tegra_dc *dc);
486 void tegra_dc_put(struct tegra_dc *dc);
488 /* defined in dc.c, used in tegra_adf.c */
489 void tegra_dc_hold_dc_out(struct tegra_dc *dc);
490 void tegra_dc_release_dc_out(struct tegra_dc *dc);
492 /* defined in dc.c, used in ext/dev.c */
493 void tegra_dc_call_flip_callback(void);
495 /* defined in dc.c, used in sor.c */
496 unsigned long tegra_dc_poll_register(struct tegra_dc *dc,
497 u32 reg, u32 mask, u32 exp_val, u32 poll_interval_us,
499 void tegra_dc_enable_general_act(struct tegra_dc *dc);
501 /* defined in dc.c, used by ext/dev.c */
504 /* defined in dc.c, used in ext/dev.c */
505 int tegra_dc_config_frame_end_intr(struct tegra_dc *dc, bool enable);
507 /* defined in dc.c, used in dsi.c */
508 int _tegra_dc_wait_for_frame_end(struct tegra_dc *dc,
511 /* defined in bandwidth.c, used in dc.c */
512 void tegra_dc_clear_bandwidth(struct tegra_dc *dc);
513 void tegra_dc_program_bandwidth(struct tegra_dc *dc, bool use_new);
514 int tegra_dc_set_dynamic_emc(struct tegra_dc *dc);
515 #ifdef CONFIG_TEGRA_ISOMGR
516 int tegra_dc_bandwidth_negotiate_bw(struct tegra_dc *dc,
517 struct tegra_dc_win *windows[], int n);
518 void tegra_dc_bandwidth_renegotiate(void *p, u32 avail_bw);
520 unsigned long tegra_dc_get_bandwidth(struct tegra_dc_win *windows[], int n);
521 long tegra_dc_calc_min_bandwidth(struct tegra_dc *dc);
523 /* defined in mode.c, used in dc.c, window.c and hdmi2.0.c */
524 int tegra_dc_program_mode(struct tegra_dc *dc, struct tegra_dc_mode *mode);
525 int tegra_dc_calc_refresh(const struct tegra_dc_mode *m);
526 int tegra_dc_calc_fb_refresh(const struct fb_videomode *fbmode);
527 int tegra_dc_update_mode(struct tegra_dc *dc);
528 u32 tegra_dc_get_aspect_ratio(struct tegra_dc *dc);
530 /* defined in clock.c, used in dc.c, rgb.c, dsi.c and hdmi.c */
531 void tegra_dc_setup_clk(struct tegra_dc *dc, struct clk *clk);
532 unsigned long tegra_dc_pclk_round_rate(struct tegra_dc *dc, int pclk);
533 unsigned long tegra_dc_pclk_predict_rate(
534 int out_type, struct clk *parent, int pclk);
536 /* defined in lut.c, used in dc.c */
537 void tegra_dc_init_lut_defaults(struct tegra_dc_lut *lut);
538 void tegra_dc_set_lut(struct tegra_dc *dc, struct tegra_dc_win *win);
540 /* defined in csc.c, used in dc.c */
541 void tegra_dc_init_csc_defaults(struct tegra_dc_csc *csc);
542 void tegra_dc_set_csc(struct tegra_dc *dc, struct tegra_dc_csc *csc);
544 /* defined in window.c, used in dc.c */
545 void tegra_dc_trigger_windows(struct tegra_dc *dc);
547 void tegra_dc_set_color_control(struct tegra_dc *dc);
548 #ifdef CONFIG_TEGRA_DC_CMU
549 void tegra_dc_cmu_enable(struct tegra_dc *dc, bool cmu_enable);
550 int tegra_dc_update_cmu(struct tegra_dc *dc, struct tegra_dc_cmu *cmu);
551 int tegra_dc_update_cmu_aligned(struct tegra_dc *dc, struct tegra_dc_cmu *cmu);
554 struct device_node *tegra_get_panel_node_out_type_check
555 (struct tegra_dc *dc, u32 out_type);
557 struct tegra_dc_platform_data
558 *of_dc_parse_platform_data(struct platform_device *ndev);
560 /* defined in dc.c, used in dc.c and dev.c */
561 void tegra_dc_set_act_vfp(struct tegra_dc *dc, int vfp);
563 /* defined in dc.c, used in dc.c and window.c */
564 bool tegra_dc_windows_are_dirty(struct tegra_dc *dc, u32 win_act_req_mask);
565 int tegra_dc_get_v_count(struct tegra_dc *dc);
567 /* defined in dc.c, used in vrr.c */
568 s32 tegra_dc_calc_v_front_porch(struct tegra_dc_mode *mode,
571 /* defined in cursor.c, used in dc.c and ext/cursor.c */
572 int tegra_dc_cursor_image(struct tegra_dc *dc,
573 enum tegra_dc_cursor_format format, enum tegra_dc_cursor_size size,
574 u32 fg, u32 bg, dma_addr_t phys_addr);
575 int tegra_dc_cursor_set(struct tegra_dc *dc, bool enable, int x, int y);
576 int tegra_dc_cursor_clip(struct tegra_dc *dc, unsigned clip);
577 int tegra_dc_cursor_suspend(struct tegra_dc *dc);
578 int tegra_dc_cursor_resume(struct tegra_dc *dc);
579 void tegra_dc_win_partial_update(struct tegra_dc *dc, struct tegra_dc_win *win,
580 unsigned int xoff, unsigned int yoff, unsigned int width,
581 unsigned int height);
582 int tegra_dc_slgc_disp0(struct notifier_block *nb, unsigned long unused0,
585 #ifdef CONFIG_TEGRA_NVDISPLAY
586 int tegra_nvdisp_init(struct tegra_dc *dc);
587 int tegra_nvdisp_update_windows(struct tegra_dc *dc,
588 struct tegra_dc_win *windows[], int n,
589 u16 *dirty_rect, bool wait_for_vblank);
590 int tegra_nvdisp_head_enable(struct tegra_dc *dc);
591 int tegra_nvdisp_head_disable(struct tegra_dc *dc);
592 int tegra_nvdisp_get_linestride(struct tegra_dc *dc, int win);
593 void tegra_nvdisp_enable_crc(struct tegra_dc *dc);
594 void tegra_nvdisp_disable_crc(struct tegra_dc *dc);
595 u32 tegra_nvdisp_read_rg_crc(struct tegra_dc *dc);
596 int tegra_nvdisp_program_mode(struct tegra_dc *dc,
597 struct tegra_dc_mode *mode);
599 struct tegra_fb_info *tegra_nvdisp_fb_register(struct platform_device *ndev,
600 struct tegra_dc *dc, struct tegra_fb_data *fb_data,
601 struct resource *fb_mem);
603 void nvdisp_dc_feature_register(struct tegra_dc *dc);
604 int nvdisp_set_cursor_position(struct tegra_dc *dc, s16 x, s16 y);