mirror of
https://github.com/NVIDIA/open-gpu-kernel-modules.git
synced 2026-02-09 17:50:00 +00:00
545.29.06
This commit is contained in:
57
src/nvidia/inc/kernel/gpu/subdevice/subdevice_ctrl_event.h
Normal file
57
src/nvidia/inc/kernel/gpu/subdevice/subdevice_ctrl_event.h
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2019-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
RMCTRL_EXPORT(NV2080_CTRL_CMD_EVENT_SET_TRIGGER,
|
||||
RMCTRL_FLAGS(NON_PRIVILEGED))
|
||||
NV_STATUS subdeviceCtrlCmdEventSetTrigger(Subdevice *pSubdevice);
|
||||
|
||||
RMCTRL_EXPORT(NV2080_CTRL_CMD_EVENT_SET_TRIGGER_FIFO,
|
||||
RMCTRL_FLAGS(NO_GPUS_LOCK, NON_PRIVILEGED))
|
||||
NV_STATUS subdeviceCtrlCmdEventSetTriggerFifo(Subdevice *pSubdevice,
|
||||
NV2080_CTRL_EVENT_SET_TRIGGER_FIFO_PARAMS *pTriggerFifoParams);
|
||||
|
||||
RMCTRL_EXPORT(NV2080_CTRL_CMD_EVENT_SET_NOTIFICATION,
|
||||
RMCTRL_FLAGS(NON_PRIVILEGED, API_LOCK_READONLY, GPU_LOCK_DEVICE_ONLY))
|
||||
NV_STATUS subdeviceCtrlCmdEventSetNotification(Subdevice *pSubdevice,
|
||||
NV2080_CTRL_EVENT_SET_NOTIFICATION_PARAMS *pSetEventParams);
|
||||
|
||||
RMCTRL_EXPORT(NV2080_CTRL_CMD_EVENT_SET_MEMORY_NOTIFIES,
|
||||
RMCTRL_FLAGS(NON_PRIVILEGED))
|
||||
NV_STATUS subdeviceCtrlCmdEventSetMemoryNotifies(Subdevice *pSubdevice,
|
||||
NV2080_CTRL_EVENT_SET_MEMORY_NOTIFIES_PARAMS *pSetMemoryNotifiesParams);
|
||||
|
||||
RMCTRL_EXPORT(NV2080_CTRL_CMD_EVENT_SET_SEMAPHORE_MEMORY,
|
||||
RMCTRL_FLAGS(NON_PRIVILEGED))
|
||||
NV_STATUS subdeviceCtrlCmdEventSetSemaphoreMemory(Subdevice *pSubdevice,
|
||||
NV2080_CTRL_EVENT_SET_SEMAPHORE_MEMORY_PARAMS *pSetSemMemoryParams);
|
||||
|
||||
RMCTRL_EXPORT(NV2080_CTRL_CMD_EVENT_SET_SEMA_MEM_VALIDATION,
|
||||
RMCTRL_FLAGS(NON_PRIVILEGED))
|
||||
NV_STATUS subdeviceCtrlCmdEventSetSemaMemValidation(Subdevice *pSubdevice,
|
||||
NV2080_CTRL_EVENT_SET_SEMA_MEM_VALIDATION_PARAMS *pSetSemaMemValidationParams);
|
||||
|
||||
RMCTRL_EXPORT(NV2080_CTRL_CMD_EVENT_VIDEO_BIND_EVTBUF,
|
||||
RMCTRL_FLAGS(NON_PRIVILEGED, API_LOCK_READONLY, GPU_LOCK_DEVICE_ONLY))
|
||||
NV_STATUS subdeviceCtrlCmdEventVideoBindEvtbuf(Subdevice *pSubdevice,
|
||||
NV2080_CTRL_EVENT_VIDEO_BIND_EVTBUF_PARAMS *pBindParams);
|
||||
|
||||
91
src/nvidia/inc/kernel/gpuvideo/videoeventlist.h
Normal file
91
src/nvidia/inc/kernel/gpuvideo/videoeventlist.h
Normal file
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2020-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "g_videoeventlist_nvoc.h"
|
||||
|
||||
#ifndef VIDEO_EVENT_LIST_H
|
||||
#define VIDEO_EVENT_LIST_H
|
||||
|
||||
/*!
|
||||
* @file videoeventlist.h
|
||||
* @brief Provides definition for video tracelog callback on EventBuffer, as well as a list holding the subscribers to the event
|
||||
*/
|
||||
|
||||
#include "core/core.h"
|
||||
#include "containers/multimap.h"
|
||||
#include "resserv/resserv.h"
|
||||
#include "kernel/gpu/eng_desc.h"
|
||||
|
||||
#include "class/cl90cdvideo.h"
|
||||
#include "ctrl/ctrl2080/ctrl2080event.h"
|
||||
|
||||
class EventBuffer;
|
||||
class KernelChannel;
|
||||
typedef struct
|
||||
{
|
||||
EventBuffer *pEventBuffer;
|
||||
NvHandle hClient;
|
||||
NvHandle hNotifier;
|
||||
NvHandle hEventBuffer;
|
||||
|
||||
NvU64 pUserInfo;
|
||||
|
||||
NvBool bAdmin;
|
||||
NvBool bKernel;
|
||||
NvBool eventMask;
|
||||
} NV_EVENT_BUFFER_BIND_POINT_VIDEO;
|
||||
MAKE_MULTIMAP(VideoEventBufferBindMultiMap, NV_EVENT_BUFFER_BIND_POINT_VIDEO);
|
||||
|
||||
/*!
|
||||
* Data-structure for notify video events.
|
||||
*/
|
||||
typedef struct {
|
||||
#if PORT_IS_MODULE_SUPPORTED(crypto)
|
||||
PORT_CRYPTO_PRNG *pVideoLogPrng;
|
||||
#endif
|
||||
NvU64 noisyTimestampStart;
|
||||
void *pEventData;
|
||||
} NOTIFY_VIDEO_EVENT;
|
||||
|
||||
NV_STATUS videoAddBindpoint
|
||||
(
|
||||
OBJGPU *pGpu,
|
||||
RsClient *pClient,
|
||||
RsResourceRef *pEventBufferRef,
|
||||
NvHandle hNotifier,
|
||||
NvBool bAllUsers,
|
||||
NV2080_CTRL_EVENT_VIDEO_BIND_EVTBUF_LOD levelOfDetail,
|
||||
NvU32 eventFilter
|
||||
);
|
||||
|
||||
void videoBufferTeardown(OBJGPU *pGpu);
|
||||
void videoRemoveAllBindpoints(EventBuffer *pEventBuffer);
|
||||
void videoRemoveBindpoint(OBJGPU *pGpu, NvU64 uid, NV_EVENT_BUFFER_BIND_POINT_VIDEO *pBind);
|
||||
void videoRemoveAllBindpointsForGpu(OBJGPU *pGpu);
|
||||
|
||||
/* The callback function that transfers video tracelog buffer entries to user eventbuffers */
|
||||
void nvEventBufferVideoCallback(OBJGPU *pGpu, void *pArgs);
|
||||
|
||||
NV_STATUS videoEventTraceCtxInit(OBJGPU *pGpu, KernelChannel *pKernelChannel, ENGDESCRIPTOR engDesc);
|
||||
|
||||
#endif // VIDEO_EVENT_LIST_H
|
||||
Reference in New Issue
Block a user