Files
linux-nvgpu/drivers/gpu/nvgpu/clk/clk_mclk.h
David Nieto 1cf7baa7fd nvgpu: gpu: Use pstates for MCLK range
JIRA DNVGPU-168

Change-Id: I7ac05dca745b22b411fc0aa797969b97536dd2e6
Signed-off-by: David Nieto <dmartineznie@nvidia.com>
Reviewed-on: http://git-master/r/1239466
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-on: http://git-master/r/1267121
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2016-12-27 15:26:52 +05:30

53 lines
1.1 KiB
C

/*
* Copyright (c) 2016, 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.
*/
#ifndef _CLKMCLK_H_
#define _CLKMCLK_H_
#include <linux/mutex.h>
enum gk20a_mclk_speed {
gk20a_mclk_low_speed,
gk20a_mclk_mid_speed,
gk20a_mclk_high_speed,
};
struct clk_mclk_state {
enum gk20a_mclk_speed speed;
struct mutex mclk_lock;
struct mutex data_lock;
u16 p5_min;
u16 p0_min;
void *vreg_buf;
bool init;
/* function pointers */
int (*change)(struct gk20a *g, u16 val);
#ifdef CONFIG_DEBUG_FS
s64 switch_max;
s64 switch_min;
u64 switch_num;
s64 switch_avg;
s64 switch_std;
bool debugfs_set;
#endif
};
int clk_mclkseq_init_mclk_gddr5(struct gk20a *g);
int clk_mclkseq_change_mclk_gddr5(struct gk20a *g, u16 val);
#endif