Files
linux-nvgpu/drivers/gpu/nvgpu/os/linux/driver_common.h
shaochunk d28dda7149 gpu: nvgpu: configure nvgpu lpwr with module parameters
Support nvgpu lpwr configuration with module
parameter, setting for each lpwr feature
would be profiled with bit operation.

module parameter: lpwr_enable
┌───────┬───────┬───────────────────────────────────────────┐
│  Bit  │ Reset │ Description                               │
╞═══════╪═══════╪═══════════════════════════════════════════╡
│ 0:1   │ 0x0   │ BLCG enablement.                          │
│       │       │ 0b00, 0b01: default platform configuration│
│       │       │ 0b10: disable feature                     │
│       │       │ 0b11: enable feature                      │
├───────┼───────┼───────────────────────────────────────────┤
│ 2:3   │ 0x0   │ ELCG enablement                           │
│       │       │ 0b00, 0b01: default platform configuration│
│       │       │ 0b10: disable feature                     │
│       │       │ 0b11: enable feature                      │
├───────┼───────┼───────────────────────────────────────────┤
│ 4:5   │ 0x0   │ ELPG enablement.                          │
│       │       │ 0b00, 0b01: default platform configuration│
│       │       │ 0b10: disable feature                     │
│       │       │ 0b11: enable feature                      │
├───────┼───────┼───────────────────────────────────────────┤
│ 6:7   │ 0x0   │ FLCG enablement.                          │
│       │       │ 0b00, 0b01: default platform configuration│
│       │       │ 0b10: disable feature                     │
│       │       │ 0b11: enable feature                      │
├───────┼───────┼───────────────────────────────────────────┤
│ 8:9   │ 0x0   │ SLCG enalement.                           │
│       │       │ 0b00, 0b01: default platform configuration│
│       │       │ 0b10: disable feature                     │
│       │       │ 0b11: enable feature                      │
├───────┼───────┼───────────────────────────────────────────┤
│ 10:11 │ 0x0   │ AELPG enablement.                         │
│       │       │ 0b00, 0b01: default platform configuration│
│       │       │ 0b10: disable feature                     │
│       │       │ 0b11: enable feature                      │
├───────┼───────┼───────────────────────────────────────────┤
│ 12:13 │ 0x0   │ MSCG enablement.                          │
│       │       │ 0b00, 0b01: default platform configuration│
│       │       │ 0b10: disable feature                     │
│       │       │ 0b11: enable feature                      │
└───────┴───────┴───────────────────────────────────────────┘

Bug 4084478

Change-Id: I7f1e506fec3196d3b4f90006dc2f4162da6c4990
Signed-off-by: shaochunk <shaochunk@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2978579
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: Divya Singhatwaria <dsinghatwari@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-10-23 05:09:32 -07:00

32 lines
1003 B
C

/*
* Copyright (c) 2016-2023, 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 NVGPU_LINUX_DRIVER_COMMON
#define NVGPU_LINUX_DRIVER_COMMON
extern int nvgpu_lpwr_enable;
struct gk20a;
int nvgpu_probe(struct gk20a *g,
const char *debugfs_symlink);
void nvgpu_init_gk20a(struct gk20a *g);
void nvgpu_read_support_gpu_tools(struct gk20a *g);
void nvgpu_read_devfreq_timer(struct gk20a *g);
#endif