mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
gpu: nvgpu: add field in characteristics struct for max gpfifo entries
Expose max gpfifo entries supported by nvgpu-rm. This limit will then be propagated to application by nvrm_gpu. Jira NVGPU-5846 Change-Id: Ibbbed9e1929c3bcc4eaaec9636d76e9e115e0c0c Signed-off-by: shashank singh <shashsingh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2482936 (cherry picked from commit b099a700aa055a5864ddb65cb546c9294c02b2b9) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2497486 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
cc34df76f9
commit
46cdc4d5ca
@@ -493,6 +493,9 @@ static long gk20a_ctrl_ioctl_gpu_characteristics(
|
||||
gpu.gpu_instance_id = gpu_instance->gpu_instance_id;
|
||||
gpu.gr_instance_id = gpu_instance->gr_syspipe.gr_syspipe_id;
|
||||
|
||||
gpu.max_gpfifo_entries = rounddown_pow_of_two(U32_MAX /
|
||||
nvgpu_get_gpfifo_entry_size());
|
||||
|
||||
if (request->gpu_characteristics_buf_size > 0) {
|
||||
size_t write_size = sizeof(gpu);
|
||||
|
||||
|
||||
@@ -318,7 +318,9 @@ struct nvgpu_gpu_characteristics {
|
||||
__u32 gpu_instance_id;
|
||||
|
||||
__u32 gr_instance_id;
|
||||
__u32 reserved4;
|
||||
|
||||
/** Max gpfifo entries allowed by nvgpu-rm. */
|
||||
__u32 max_gpfifo_entries;
|
||||
|
||||
/* Notes:
|
||||
- This struct can be safely appended with new fields. However, always
|
||||
|
||||
Reference in New Issue
Block a user