Lines Matching refs:MsgFunction
193 pub(crate) enum MsgFunction { enum
226 impl fmt::Display for MsgFunction { implementation
230 MsgFunction::Nop => write!(f, "NOP"), in fmt()
231 MsgFunction::SetGuestSystemInfo => write!(f, "SET_GUEST_SYSTEM_INFO"), in fmt()
232 MsgFunction::AllocRoot => write!(f, "ALLOC_ROOT"), in fmt()
233 MsgFunction::AllocDevice => write!(f, "ALLOC_DEVICE"), in fmt()
234 MsgFunction::AllocMemory => write!(f, "ALLOC_MEMORY"), in fmt()
235 MsgFunction::AllocCtxDma => write!(f, "ALLOC_CTX_DMA"), in fmt()
236 MsgFunction::AllocChannelDma => write!(f, "ALLOC_CHANNEL_DMA"), in fmt()
237 MsgFunction::MapMemory => write!(f, "MAP_MEMORY"), in fmt()
238 MsgFunction::BindCtxDma => write!(f, "BIND_CTX_DMA"), in fmt()
239 MsgFunction::AllocObject => write!(f, "ALLOC_OBJECT"), in fmt()
240 MsgFunction::Free => write!(f, "FREE"), in fmt()
241 MsgFunction::Log => write!(f, "LOG"), in fmt()
242 MsgFunction::GetGspStaticInfo => write!(f, "GET_GSP_STATIC_INFO"), in fmt()
243 MsgFunction::SetRegistry => write!(f, "SET_REGISTRY"), in fmt()
244 MsgFunction::GspSetSystemInfo => write!(f, "GSP_SET_SYSTEM_INFO"), in fmt()
245 MsgFunction::GspInitPostObjGpu => write!(f, "GSP_INIT_POST_OBJGPU"), in fmt()
246 MsgFunction::GspRmControl => write!(f, "GSP_RM_CONTROL"), in fmt()
247 MsgFunction::GetStaticInfo => write!(f, "GET_STATIC_INFO"), in fmt()
250 MsgFunction::GspInitDone => write!(f, "INIT_DONE"), in fmt()
251 MsgFunction::GspRunCpuSequencer => write!(f, "RUN_CPU_SEQUENCER"), in fmt()
252 MsgFunction::PostEvent => write!(f, "POST_EVENT"), in fmt()
253 MsgFunction::RcTriggered => write!(f, "RC_TRIGGERED"), in fmt()
254 MsgFunction::MmuFaultQueued => write!(f, "MMU_FAULT_QUEUED"), in fmt()
255 MsgFunction::OsErrorLog => write!(f, "OS_ERROR_LOG"), in fmt()
256 MsgFunction::GspPostNoCat => write!(f, "NOCAT"), in fmt()
257 MsgFunction::GspLockdownNotice => write!(f, "LOCKDOWN_NOTICE"), in fmt()
258 MsgFunction::UcodeLibOsPrint => write!(f, "LIBOS_PRINT"), in fmt()
263 impl TryFrom<u32> for MsgFunction { implementation
266 fn try_from(value: u32) -> Result<MsgFunction> { in try_from() argument
268 bindings::NV_VGPU_MSG_FUNCTION_NOP => Ok(MsgFunction::Nop), in try_from()
270 Ok(MsgFunction::SetGuestSystemInfo) in try_from()
272 bindings::NV_VGPU_MSG_FUNCTION_ALLOC_ROOT => Ok(MsgFunction::AllocRoot), in try_from()
273 bindings::NV_VGPU_MSG_FUNCTION_ALLOC_DEVICE => Ok(MsgFunction::AllocDevice), in try_from()
274 bindings::NV_VGPU_MSG_FUNCTION_ALLOC_MEMORY => Ok(MsgFunction::AllocMemory), in try_from()
275 bindings::NV_VGPU_MSG_FUNCTION_ALLOC_CTX_DMA => Ok(MsgFunction::AllocCtxDma), in try_from()
276 bindings::NV_VGPU_MSG_FUNCTION_ALLOC_CHANNEL_DMA => Ok(MsgFunction::AllocChannelDma), in try_from()
277 bindings::NV_VGPU_MSG_FUNCTION_MAP_MEMORY => Ok(MsgFunction::MapMemory), in try_from()
278 bindings::NV_VGPU_MSG_FUNCTION_BIND_CTX_DMA => Ok(MsgFunction::BindCtxDma), in try_from()
279 bindings::NV_VGPU_MSG_FUNCTION_ALLOC_OBJECT => Ok(MsgFunction::AllocObject), in try_from()
280 bindings::NV_VGPU_MSG_FUNCTION_FREE => Ok(MsgFunction::Free), in try_from()
281 bindings::NV_VGPU_MSG_FUNCTION_LOG => Ok(MsgFunction::Log), in try_from()
282 bindings::NV_VGPU_MSG_FUNCTION_GET_GSP_STATIC_INFO => Ok(MsgFunction::GetGspStaticInfo), in try_from()
283 bindings::NV_VGPU_MSG_FUNCTION_SET_REGISTRY => Ok(MsgFunction::SetRegistry), in try_from()
284 bindings::NV_VGPU_MSG_FUNCTION_GSP_SET_SYSTEM_INFO => Ok(MsgFunction::GspSetSystemInfo), in try_from()
286 Ok(MsgFunction::GspInitPostObjGpu) in try_from()
288 bindings::NV_VGPU_MSG_FUNCTION_GSP_RM_CONTROL => Ok(MsgFunction::GspRmControl), in try_from()
289 bindings::NV_VGPU_MSG_FUNCTION_GET_STATIC_INFO => Ok(MsgFunction::GetStaticInfo), in try_from()
290 bindings::NV_VGPU_MSG_EVENT_GSP_INIT_DONE => Ok(MsgFunction::GspInitDone), in try_from()
292 Ok(MsgFunction::GspRunCpuSequencer) in try_from()
294 bindings::NV_VGPU_MSG_EVENT_POST_EVENT => Ok(MsgFunction::PostEvent), in try_from()
295 bindings::NV_VGPU_MSG_EVENT_RC_TRIGGERED => Ok(MsgFunction::RcTriggered), in try_from()
296 bindings::NV_VGPU_MSG_EVENT_MMU_FAULT_QUEUED => Ok(MsgFunction::MmuFaultQueued), in try_from()
297 bindings::NV_VGPU_MSG_EVENT_OS_ERROR_LOG => Ok(MsgFunction::OsErrorLog), in try_from()
298 bindings::NV_VGPU_MSG_EVENT_GSP_POST_NOCAT_RECORD => Ok(MsgFunction::GspPostNoCat), in try_from()
299 bindings::NV_VGPU_MSG_EVENT_GSP_LOCKDOWN_NOTICE => Ok(MsgFunction::GspLockdownNotice), in try_from()
300 bindings::NV_VGPU_MSG_EVENT_UCODE_LIBOS_PRINT => Ok(MsgFunction::UcodeLibOsPrint), in try_from()
306 impl From<MsgFunction> for u32 {
307 fn from(value: MsgFunction) -> Self { in from()
782 fn init(cmd_size: usize, function: MsgFunction) -> impl Init<Self, Error> { in init()
820 function: MsgFunction, in init() argument
868 pub(crate) fn function(&self) -> Result<MsgFunction, u32> { in function() argument