1 /* 2 * SPDX-FileCopyrightText: Copyright (c) 2009-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 * SPDX-License-Identifier: MIT 4 * 5 * Permission is hereby granted, free of charge, to any person obtaining a 6 * copy of this software and associated documentation files (the "Software"), 7 * to deal in the Software without restriction, including without limitation 8 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 * and/or sell copies of the Software, and to permit persons to whom the 10 * Software is furnished to do so, subject to the following conditions: 11 * 12 * The above copyright notice and this permission notice shall be included in 13 * all copies or substantial portions of the Software. 14 * 15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 * DEALINGS IN THE SOFTWARE. 22 */ 23 24 #pragma once 25 26 #include <nvtypes.h> 27 28 // 29 // This file was generated with FINN, an NVIDIA coding tool. 30 // Source file: ctrl/ctrl0073/ctrl0073event.finn 31 // 32 33 #include "ctrl/ctrl0073/ctrl0073base.h" 34 35 /* NV04_DISPLAY_COMMON event-related control commands and parameters */ 36 37 /* 38 * NV0073_CTRL_CMD_EVENT_SET_NOTIFICATION 39 * 40 * This command sets event notification state for the associated display 41 * object. This command requires that an instance of NV01_EVENT has been 42 * previously bound to the associated display object. 43 * 44 * subDeviceInstance 45 * This parameter specifies the subdevice instance within the 46 * NV04_DISPLAY_COMMON parent device to which the operation should be 47 * directed. This parameter must specify a value between zero and the 48 * total number of subdevices within the parent device. This parameter 49 * should be set to zero for default behavior. 50 * hEvent 51 * This parameter specifies the handle of the NV01_EVENT instance 52 * to be bound to the given subDeviceInstance. 53 * event 54 * This parameter specifies the type of event to which the specified 55 * action is to be applied. This parameter must specify a valid 56 * NV0073_NOTIFIERS value (see cl0073.h for more details) and should 57 * not exceed one less NV0073_NOTIFIERS_MAXCOUNT. 58 * action 59 * This parameter specifies the desired event notification action. 60 * Valid notification actions include: 61 * NV0073_CTRL_SET_EVENT_NOTIFICATION_DISABLE 62 * This action disables event notification for the specified 63 * event for the associated subdevice object. 64 * NV0073_CTRL_SET_EVENT_NOTIFICATION_SINGLE 65 * This action enables single-shot event notification for the 66 * specified event for the associated subdevice object. 67 * NV0073_CTRL_SET_EVENT_NOTIFICATION_REPEAT 68 * This action enables repeated event notification for the specified 69 * event for the associated system controller object. 70 * 71 * Possible status values returned are: 72 * NV_OK 73 * NV_ERR_INVALID_PARAM_STRUCT 74 * NV_ERR_INVALID_ARGUMENT 75 * NV_ERR_INVALID_STATE 76 */ 77 #define NV0073_CTRL_CMD_EVENT_SET_NOTIFICATION (0x730301U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_EVENT_INTERFACE_ID << 8) | NV0073_CTRL_EVENT_SET_NOTIFICATION_PARAMS_MESSAGE_ID" */ 78 79 #define NV0073_CTRL_EVENT_SET_NOTIFICATION_PARAMS_MESSAGE_ID (0x1U) 80 81 typedef struct NV0073_CTRL_EVENT_SET_NOTIFICATION_PARAMS { 82 NvU32 subDeviceInstance; 83 NvHandle hEvent; 84 NvU32 event; 85 NvU32 action; 86 } NV0073_CTRL_EVENT_SET_NOTIFICATION_PARAMS; 87 88 /* valid action values */ 89 #define NV0073_CTRL_EVENT_SET_NOTIFICATION_ACTION_DISABLE (0x00000000U) 90 #define NV0073_CTRL_EVENT_SET_NOTIFICATION_ACTION_SINGLE (0x00000001U) 91 #define NV0073_CTRL_EVENT_SET_NOTIFICATION_ACTION_REPEAT (0x00000002U) 92 93 /* 94 * NV0073_CTRL_CMD_EVENT_SET_NOTIFIER_MEMORY 95 * 96 * hMemory 97 * This parameter specifies the handle of the memory object 98 * that identifies the memory address translation for this 99 * subdevice instance's notification(s). The beginning of the 100 * translation points to an array of notification data structures. 101 * The size of the translation must be at least large enough to hold the 102 * maximum number of notification data structures identified by 103 * the NV0073_MAX_NOTIFIERS value. 104 * Legal argument values must be instances of the following classes: 105 * NV01_NULL 106 * NV04_MEMORY 107 * When hMemory specifies the NV01_NULL_OBJECT value then any existing 108 * memory translation connection is cleared. There must not be any 109 * pending notifications when this command is issued. 110 * 111 * Possible status values returned are: 112 * NV_OK 113 * NV_ERR_INVALID_PARAM_STRUCT 114 * NV_ERR_INVALID_ARGUMENT 115 * NV_ERR_INVALID_STATE 116 */ 117 #define NV0073_CTRL_CMD_EVENT_SET_MEMORY_NOTIFIES (0x730303U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_EVENT_INTERFACE_ID << 8) | NV0073_CTRL_EVENT_SET_MEMORY_NOTIFIES_PARAMS_MESSAGE_ID" */ 118 119 #define NV0073_CTRL_EVENT_SET_MEMORY_NOTIFIES_PARAMS_MESSAGE_ID (0x3U) 120 121 typedef struct NV0073_CTRL_EVENT_SET_MEMORY_NOTIFIES_PARAMS { 122 NvU32 subDeviceInstance; 123 NvHandle hMemory; 124 } NV0073_CTRL_EVENT_SET_MEMORY_NOTIFIES_PARAMS; 125 126 #define NV0073_EVENT_MEMORY_NOTIFIES_STATUS_NOTIFIED 0U 127 #define NV0073_EVENT_MEMORY_NOTIFIES_STATUS_PENDING 1U 128 #define NV0073_EVENT_MEMORY_NOTIFIES_STATUS_ERROR 2U 129 130 /* _ctrl0073event_h_ */ 131