mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
Implement new API nvgpu_prof_ioctl_exec_reg_ops() to support regops on new profiler objects. Add two new staging buffers to hold regops copied from userspace, and to convert and execute regops in common code. Buffers are allocated and released along with the profiler object. New API will implements this : - copy regops data in chunks of 4K from userspace - store them in staging buffer - convert the new regop struct into common regop struct and also copy the content into second staging buffer - trigger gops.regops.exec_regops() with second staging buffer as operation pointer - convert common regop struct back into new regop struct and copy back to userspace Export bunch of helper functions from ioctl_dbg.h. e.g. nvgpu_get_regops_op_values_common() Update regop execution code to skip regop execution if regop status is not valid. This is only possible when userspace requests for CONTINUE_ON_ERROR mode. Add more documentation to some of the fields in UAPI header. Note that maximum atomic operations reported by new API are same as legacy API and are incorrect. This will be fixed up in upcoming patches. Bug 2510974 Jira NVGPU-5360 Change-Id: I9f82052b22143aec33f6e778c0784386744b699e Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2394208 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
44 lines
1.6 KiB
C
44 lines
1.6 KiB
C
/*
|
|
* Tegra GK20A GPU Debugger Driver
|
|
*
|
|
* Copyright (c) 2017-2018, 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 DBG_GPU_IOCTL_GK20A_H
|
|
#define DBG_GPU_IOCTL_GK20A_H
|
|
|
|
struct inode;
|
|
struct file;
|
|
typedef struct poll_table_struct poll_table;
|
|
|
|
/* NVGPU_DBG_GPU_IOCTL_REG_OPS: the upper limit for the number
|
|
* of regops */
|
|
#define NVGPU_IOCTL_DBG_REG_OPS_LIMIT 1024
|
|
|
|
/* module debug driver interface */
|
|
int gk20a_dbg_gpu_dev_release(struct inode *inode, struct file *filp);
|
|
int gk20a_dbg_gpu_dev_open(struct inode *inode, struct file *filp);
|
|
long gk20a_dbg_gpu_dev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
|
|
unsigned int gk20a_dbg_gpu_dev_poll(struct file *filep, poll_table *wait);
|
|
|
|
/* used by profiler driver interface */
|
|
int gk20a_prof_gpu_dev_open(struct inode *inode, struct file *filp);
|
|
|
|
u32 nvgpu_get_regops_op_values_common(u32 regops_op);
|
|
u32 nvgpu_get_regops_status_values_common(u32 regops_status);
|
|
u32 nvgpu_get_regops_op_values_linux(u32 regops_op);
|
|
u32 nvgpu_get_regops_status_values_linux(u32 regops_status);
|
|
|
|
#endif
|