aboutsummaryrefslogtreecommitdiff
path: root/src/soc/nvidia/tegra132/include/soc/display.h
blob: 3378a4f2d2869aa82321bd34b7f9ac9858d6d99c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
 * Copyright 2014 Google Inc.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms and conditions of the GNU General Public License,
 * version 2, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef __SOC_NVIDIA_TEGRA132_INCLUDE_SOC_DISPLAY_H__
#define __SOC_NVIDIA_TEGRA132_INCLUDE_SOC_DISPLAY_H__

#define COLOR_WHITE	0xFFFFFF
#define COLOR_BLACK	0x000000

#define hsync_start(mode)	\
	(mode->xres + mode->hfront_porch)

#define hsync_end(mode)	\
	(mode->xres + mode->hfront_porch + mode->hsync_width)

#define htotal(mode)	\
	(mode->xres + mode->hfront_porch + \
	mode->hsync_width + mode->hback_porch)

#define vtotal(mode)	\
	(mode->yres + mode->vfront_porch + \
	mode->vsync_width + mode->vback_porch)

struct soc_nvidia_tegra132_config;	/* forward declaration */

int dsi_enable(struct soc_nvidia_tegra132_config *config);

#endif /* __SOC_NVIDIA_TEGRA132_INCLUDE_SOC_DISPLAY_H__ */