summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/host/scale3d.h
blob: 4aa84a8086bf15dcd89f1286670c41333b9eecd6 (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
/*
 * drivers/video/tegra/host/gr3d/scale3d.h
 *
 * Tegra Graphics Host 3D Clock Scaling
 *
 * Copyright (c) 2010-2014, NVIDIA Corporation. All rights reserved.
 *
 * 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 NVHOST_T30_SCALE3D_H
#define NVHOST_T30_SCALE3D_H

struct nvhost_device_profile;
struct platform_device;
struct device;
struct dentry;
struct clk;

struct nvhost_emc_params {
	long				emc_slope;
	long				emc_offset;
	long				emc_dip_slope;
	long				emc_dip_offset;
	long				emc_xmid;
	bool				linear;
};

/* Suspend is called when powering down module */
void nvhost_scale3d_suspend(struct device *);

/* Initialization and de-initialization for module */
void nvhost_scale3d_init(struct platform_device *pdev);
void nvhost_scale3d_deinit(struct platform_device *pdev);

/* Callback for generic profile. The callback handles setting
 * the frequencies of EMC and the second 3d unit (if available) */
void nvhost_scale3d_callback(struct nvhost_device_profile *profile,
			     unsigned long freq);

void nvhost_scale3d_calibrate_emc(struct nvhost_emc_params *emc_params,
				  struct clk *clk_3d, struct clk *clk_3d_emc,
				  bool linear_emc);
long nvhost_scale3d_get_emc_rate(struct nvhost_emc_params *emc_params,
				 long freq);
#endif