mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: create device/context profiler dev nodes
Create new dev nodes for device and context profilers. Example of dev nodes on iGPU /dev/nvhost-prof-dev-gpu - device scope profiler /dev/nvhost-prof-ctx-gpu - context scope profiler Add below APIs to open/close above dev nodes : nvgpu_prof_dev_fops_open() nvgpu_prof_ctx_fops_open() nvgpu_prof_fops_release() Add common API nvgpu_prof_fops_ioctl() to handle IOCTL call on these dev nodes. Add IOCTL NVGPU_PROFILER_IOCTL_BIND_CONTEXT to bind the TSG to profiler objects. Add nvgpu_tsg_get_from_file() to retrieve TSG struct pointer from file descriptor. Also store profiler object pointer into TSG struct. Enable NVGPU_SUPPORT_PROFILER_V2_DEVICE capability on gv11b and tu104. Note that this is not yet enabled for vGPU. Keep NVGPU_SUPPORT_PROFILER_V2_CONTEXT capabiity disabled since this will take longer to support. Add new IOCTL NVGPU_PROFILER_IOCTL_UNBIND_CONTEXT so that userspace can explicitly unbind the context and release the resources before closing the profiler descriptor. Add context_init flag to profiler object for book keeping. Bug 2510974 Jira NVGPU-5360 Change-Id: Ie07e0cfd5a9da9d80008f79c955c7ef93b4bc60f Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2384354 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Alex Waterman
parent
fb95b7efa7
commit
969b901999
@@ -411,6 +411,7 @@ gk20a_ctrl_ioctl_gpu_characteristics(
|
||||
gpu.as_ioctl_nr_last = NVGPU_AS_IOCTL_LAST;
|
||||
gpu.event_ioctl_nr_last = NVGPU_EVENT_IOCTL_LAST;
|
||||
gpu.ctxsw_ioctl_nr_last = NVGPU_CTXSW_IOCTL_LAST;
|
||||
gpu.prof_ioctl_nr_last = NVGPU_PROFILER_IOCTL_LAST;
|
||||
gpu.gpu_va_bit_count = 40;
|
||||
|
||||
strlcpy(gpu.chipname, g->name, sizeof(gpu.chipname));
|
||||
|
||||
Reference in New Issue
Block a user