summaryrefslogtreecommitdiffstats
path: root/include/linux/platform/tegra/bwmgr_mc.h
blob: 2aa7f8a720b53615df7bf72bf0eb06a8ab63ab0d (plain) (blame)
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
/**
 * Copyright (c) 2015-2018, NVIDIA CORPORATION. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * 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 __BWMGR_MC_H
#define __BWMGR_MC_H

#include <linux/types.h>
#include <linux/platform/tegra/iso_client.h>

unsigned long bwmgr_apply_efficiency(
		unsigned long bw, unsigned long iso_bw,
		unsigned long emc_max, u64 usage_flags,
		unsigned long *iso_bw_min, unsigned long iso_bw_nvdis,
		unsigned long iso_bw_vi);

void bwmgr_eff_init(void);

unsigned long bwmgr_freq_to_bw(unsigned long freq);
unsigned long bwmgr_bw_to_freq(unsigned long bw);
unsigned long bwmgr_get_lowest_iso_emc_freq(long iso_bw,
		long iso_bw_nvdis, long iso_bw_vi);
u32 tegra_bwmgr_get_max_iso_bw(enum tegra_iso_client);

u32 bwmgr_dvfs_latency(u32 ufreq);
int bwmgr_iso_bw_percentage_max(void);
int bwmgr_get_emc_to_dram_freq_factor(void);
#endif /* __BWMGR_MC_H */