Files
linux-nvgpu/drivers/gpu/nvgpu/common/vgpu/ltc/ltc_vgpu.h
Richard Zhao a884bd3537 gpu: nvgpu: vgpu: add L2 sector promotion support
- added new IVC command for setting L2 sector promotion policy.
- init according HAL for ga10b VGPU.

Jira GVSCI-10901

Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Change-Id: Ibd206d26cbe72dd37f541eb0a8fb177c195567ab
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2560575
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2021-07-19 16:13:34 -07:00

43 lines
1.6 KiB
C

/*
* Copyright (c) 2017-2021, NVIDIA CORPORATION. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#ifndef NVGPU_LTC_VGPU_H
#define NVGPU_LTC_VGPU_H
struct gk20a;
struct gr_gk20a;
u64 vgpu_determine_L2_size_bytes(struct gk20a *g);
void vgpu_ltc_init_fs_state(struct gk20a *g);
#ifdef CONFIG_NVGPU_DEBUGGER
int vgpu_ltc_get_max_ways_evict_last(struct gk20a *g, struct nvgpu_tsg *tsg,
u32 *num_ways);
int vgpu_ltc_set_max_ways_evict_last(struct gk20a *g, struct nvgpu_tsg *tsg,
u32 num_ways);
#endif
int vgpu_ltc_set_sector_promotion(struct gk20a *g, struct nvgpu_tsg *tsg,
u32 policy);
#endif /* NVGPU_LTC_VGPU_H */