summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/tegra_adf.h
blob: 5173bcf058d02d616359d5ef9cb46eca416b57a5 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
 * Copyright (C) 2013 Google, Inc.
 * Copyright (c) 2014, NVIDIA CORPORATION, All rights reserved.
 *
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
 * may be copied, distributed, and modified under those terms.
 *
 * This program is distributed in the hope that 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.
 *
 */

#ifndef __TEGRA_ADF_H_
#define __TEGRA_ADF_H_

#include <linux/platform_device.h>
#include <video/tegra_adf.h>
#include <mach/dc.h>

struct tegra_adf_info;

#ifdef CONFIG_ADF_TEGRA
int tegra_adf_process_hotplug_connected(struct tegra_adf_info *adf_info,
		struct fb_monspecs *specs);
void tegra_adf_process_hotplug_disconnected(struct tegra_adf_info *adf_info);
void tegra_adf_process_vblank(struct tegra_adf_info *adf_info,
		ktime_t timestamp);
int tegra_adf_process_bandwidth_renegotiate(struct tegra_adf_info *adf_info,
		struct tegra_dc_bw_data *bw);

struct tegra_adf_info *tegra_adf_init(struct platform_device *ndev,
		struct tegra_dc *dc, struct tegra_fb_data *fb_data);
void tegra_adf_unregister(struct tegra_adf_info *adf_info);
#else
static inline int tegra_adf_process_hotplug_connected(
		struct tegra_adf_info *adf_info, struct fb_monspecs *specs)
{
	return -ENOENT;
}

static inline void tegra_adf_process_hotplug_disconnected(
		struct tegra_adf_info *adf_info)
{
}

static inline void tegra_adf_process_vblank(struct tegra_adf_info *adf_info,
		ktime_t timestamp)
{
}

static inline struct tegra_adf_info *tegra_adf_init(
		struct platform_device *ndev, struct tegra_dc *dc,
		struct tegra_fb_data *fb_data)
{
	return ERR_PTR(-ENOENT);
}

static inline int tegra_adf_process_bandwidth_renegotiate(
		struct tegra_adf_info *adf_info, struct tegra_dc_bw_data *bw)
{
	return -ENOENT;
}

static inline void tegra_adf_unregister(struct tegra_adf_info *adf_info)
{
}
#endif /* CONFIG_ADF_TEGRA */

#endif /* __TEGRA_ADF_H_ */