Switch 2: GSV services: Difference between revisions
Created page with "= (S2) GraphicsSupervisor = This is a TIPC interface so the command numbers are subtracted by 16. {| class="wikitable" border="1" |- ! Cmd || Name |- | 1 || #InitializeGraphicsWithTransferMemory |- | 4 || #InitializeGraphics |- | 11 || #SetCurrentProcessHandle |- | 12 || |- | 101 || #StartGraphics |- | 111 || |- | 112 || |- | 114 || |- | 115 || |- | 187 || |- | 201 || |- | 301 || |- | 303 || |- | 311 || |- | 312 || |- | 314 || |- | 315 ||..." |
|||
| (10 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
= | = UserSession = | ||
This is a TIPC interface so the command numbers are subtracted by 16. | This is a TIPC interface so the command numbers are subtracted by 16. | ||
This multiplexes several interfaces into a single session that can be acquired through [[Applet_Manager_services|am]]. | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! Cmd || Name | ! Cmd || Interface || Name | ||
|- | |||
| 1 || Gsv || [[#BootWithTransferMemory|BootWithTransferMemory]] | |||
|- | |||
| 4 || Gsv || [[#BootWithRemoteMemory|BootWithRemoteMemory]] | |||
|- | |||
| 11 || || [[#SetCurrentProcessHandle|SetCurrentProcessHandle]] | |||
|- | |||
| 12 || || | |||
|- | |||
| 101 || || [[#CreateContext|CreateContext]] | |||
|- | |||
| 111 || NativeMemory || CreateNativeMemory | |||
|- | |||
| 112 || NativeMemory || DestroyNativeMemory | |||
|- | |||
| 113 || NativeMemory || CreateNativeMemoryBlockByTransferMemory | |||
|- | |||
| 114 || NativeMemory || CreateNativeMemoryBlock | |||
|- | |||
| 115 || NativeMemory || BootNativeMemoryManagement | |||
|- | |||
| 187 || NativeMemory || QueryNativeMemoryNvsNvRmMemIdForDebug | |||
|- | |||
| 201 || Syncpt || CreateSyncptContext | |||
|- | |||
| 202 || Syncpt || InitializeSyncptContext | |||
|- | |||
| 211 || Syncpt || CreateDebugSyncDevice | |||
|- | |||
| 213 || Syncpt || CreateDebugSyncCounter | |||
|- | |||
| 214 || Syncpt || DestroyDebugSyncCounter | |||
|- | |||
| 215 || Syncpt || ReportDebugSyncCounterValue | |||
|- | |||
| 301 || Display || CreateDisplayContext | |||
|- | |||
| 303 || Display || DestroyDisplayContext | |||
|- | |||
| 305 || Display || InitializeDisplayContext | |||
|- | |||
| 311 || Display || | |||
|- | |||
| 312 || Display || | |||
|- | |||
| 314 || Display || | |||
|- | |||
| 315 || Display || | |||
|- | |||
| 321 || Display || | |||
|- | |||
| 327 || Display || | |||
|- | |||
| 391 || Display || CalculateRequiredBufferMemory | |||
|- | |||
| 401 || Gpu || [[#CreateGpuContext|CreateGpuContext]] | |||
|- | |||
| 402 || Gpu || [[#InitializeGpuContext|InitializeGpuContext]] | |||
|- | |||
| 423 || Gpu || | |||
|- | |||
| 426 || Gpu || MapNativeImage | |||
|- | |||
| 427 || Gpu || UnmapNativeImage | |||
|- | |||
| 428 || Gpu || [[#QueryNativeImage|QueryNativeImage]] | |||
|- | |||
| 429 || Gpu || [[#CreateNativeImage|CreateNativeImage]] | |||
|- | |||
| 430 || Gpu || DestroyNativeImage | |||
|- | |||
| 434 || Gpu || ExistsAddressSpace | |||
|- | |||
| 435 || Gpu || [[#CalculateNativeImageSize|CalculateNativeImageSize]] | |||
|- | |||
| 437 || Gpu || CreateNativeMemoryWithGpukMemHandle | |||
|- | |||
| 493 || Gpu || CreateUserlandDebuggerSession | |||
|- | |||
| 494 || Gpu || | |||
|- | |||
| 496 || Gpu || [[#CreateGpuManagerSessionWithTransferMemory|CreateGpuManagerSessionWithTransferMemory]] | |||
|- | |||
| 497 || Gpu || [[#CreateGpuManagerSessionWithRemoteMemory|CreateGpuManagerSessionWithRemoteMemory]] | |||
|- | |||
| 498 || Gpu || TryQueryDonatedTransferMemoryUsage | |||
|- | |||
| 601 || Camera || CreateCameraContext | |||
|- | |||
| 602 || Camera || InitializeCameraContext | |||
|- | |||
| 603 || Camera || DestroyCameraContext | |||
|- | |||
| 612 || Camera || DestroyOutputBufferPool | |||
|- | |||
| 613 || Camera || CreateAliasOutputBufferPool | |||
|- | |||
| 614 || Camera || DestroyAliasOutputBufferPool | |||
|- | |||
| 615 || Camera || CreateOutputBufferPool | |||
|- | |||
| 616 || Camera || ReadFrameDataAsync | |||
|- | |||
| 620 || Camera || InitializeB | |||
|- | |||
| 621 || Camera || FinalizeB | |||
|- | |||
| 622 || Camera || ListCameras | |||
|- | |||
| 623 || Camera || OpenCamera | |||
|- | |||
| 624 || Camera || CloseCamera | |||
|- | |||
| 626 || Camera || ListSensorMode | |||
|- | |||
| 627 || Camera || SetSensorMode | |||
|- | |||
| 628 || Camera || GetAvailableStreams | |||
|- | |||
| 629 || Camera || GetRequiredWorkBufferSize | |||
|- | |||
| 630 || Camera || CreateStream | |||
|- | |||
| 632 || Camera || GetReadDoneEvent | |||
|- | |||
| 633 || Camera || GetStreamOutputSize | |||
|- | |||
| 634 || Camera || DestroyStream | |||
|- | |||
| 636 || Camera || ReadFrameDataAsync | |||
|- | |||
| 637 || Camera || GetAttachedEvent | |||
|- | |||
| 638 || Camera || GetDetachedEvent | |||
|- | |||
| 639 || Camera || GetFrameInfo | |||
|- | |||
| 640 || Camera || GetFrameInfo2 | |||
|- | |||
| 641 || Camera || GetConnectionChangedEvent | |||
|- | |||
| 650 || Camera || SetPictureQualityConfig | |||
|- | |||
| 651 || Camera || GetPictureQualityConfig | |||
|- | |||
| 652 || Camera || SetDigitalWindow | |||
|- | |||
| 653 || Camera || GetDigitalWindow | |||
|- | |||
| 654 || Camera || GetDigitalWindowCapability | |||
|- | |||
| 655 || Camera || GetSupportedFunctions | |||
|- | |||
| 656 || Camera || GetSupportedDebugFunctions | |||
|- | |- | ||
| | | 657 || Camera || GetCameraPrivacyCoverStatus | ||
|- | |- | ||
| | | 658 || Camera || GetCameraDeviceTemperature | ||
|- | |- | ||
| | | 659 || Camera || GetDeviceUniqueId | ||
|- | |- | ||
| | | 660 || Camera || GetSensorMode | ||
|- | |- | ||
| | | 661 || Camera || GetStride | ||
|- | |- | ||
| | | 662 || Camera || UnlinkSensor | ||
|- | |- | ||
| | | 663 || Camera || GetDeviceModel | ||
|- | |- | ||
| | | 664 || Camera || SetRawSensorMode | ||
|- | |- | ||
| | | 665 || Camera || GetAccessAllowed | ||
|- | |- | ||
| | | 666 || Camera || GetHostDrivenAeRegion | ||
|- | |- | ||
| | | 667 || Camera || SetHostDrivenAeRegion | ||
|- | |- | ||
| | | 691 || Camera || CalculateImageArraySize | ||
|- | |- | ||
| | | 901 || VideoDecoder || CreateVideoDecoderContext | ||
|- | |- | ||
| | | 902 || VideoDecoder || InitializeVideoDecoderContext | ||
|- | |- | ||
| | | 903 || VideoDecoder || DestroyVideoDecoderContext | ||
|- | |- | ||
| | | 904 || VideoDecoder || InitializeVideoDecoderContextForSystem | ||
|- | |- | ||
| | | 905 || VideoDecoder || | ||
|- | |- | ||
| | | 911 || VideoDecoder || InitializeDecoderImagePool | ||
|- | |- | ||
| | | 912 || VideoDecoder || FinalizeDecoderImagePool | ||
|- | |- | ||
| | | 921 || VideoDecoderForSystem || InitializeDecoderAliasImagePool | ||
|- | |- | ||
| | | 922 || VideoDecoderForSystem || FinalizeDecoderAliasImagePool | ||
|- | |- | ||
| | | 961 || VideoDecoderForSystem || ReadDecoderOutput | ||
|- | |- | ||
| | | 991 || VideoDecoderForSystem || CalculateDecoderImagePoolBuffer | ||
|- | |- | ||
| | | 1001 || VideoEncoder || CreateVideoEncoderContext | ||
|- | |- | ||
| | | 1002 || VideoEncoder || InitializeVideoEncoderContext | ||
|- | |- | ||
| | | 1003 || VideoEncoder || DestroyVideoEncoderContext | ||
|- | |- | ||
| | | 1004 || VideoEncoder || InitializeVideoEncoderContextForSystem | ||
|- | |- | ||
| | | 1011 || VideoEncoder || InitializeEncoderImagePool | ||
|- | |- | ||
| | | 1012 || VideoEncoder || FinalizeEncoderImagePool | ||
|- | |- | ||
| | | 1021 || VideoEncoderForSystem || InitializeEncoderAliasImagePool | ||
|- | |- | ||
| | | 1022 || VideoEncoderForSystem || FinalizeEncoderAliasImagePool | ||
|- | |- | ||
| | | 1061 || VideoEncoderForSystem || WriteEncoderInput | ||
|- | |- | ||
| | | 1091 || VideoEncoderForSystem || CalculateEncoderImagePoolBuffer | ||
|- | |- | ||
| | | 1101 || GraphicsFrame || CreateGraphicsFrameContext | ||
|- | |- | ||
| | | 1102 || GraphicsFrame || InitializeGraphicsFrameContext | ||
|- | |- | ||
| | | 1111 || GraphicsFrame || SetGraphicsFrameLengthMode | ||
|- | |- | ||
| | | 1112 || GraphicsFrame || SetGraphicsFrameRestartMode | ||
|- | |- | ||
| | | 1113 || GraphicsFrame || SetGraphicsFrameGpuTimesliceMode | ||
|- | |- | ||
| | | 1201 || Chat || CreateChatContext | ||
|- | |- | ||
| | | 1202 || Chat || InitializeChatContext | ||
|- | |- | ||
| | | 1203 || Chat || DestroyChatContext | ||
|- | |- | ||
| | | 1211 || Chat || CreateImagePool | ||
|- | |- | ||
| | | 1212 || Chat || DestroyImagePool | ||
|- | |- | ||
| | | 1291 || Chat || CalculateRequiredBufferMemory | ||
|- | |- | ||
| 1301 || [[# | | 1301 || Adraw || [[#CreateAdrawContext|CreateAdrawContext]] | ||
|- | |- | ||
| 1302 || [[# | | 1302 || Adraw || [[#InitializeAdrawContext|InitializeAdrawContext]] | ||
|- | |- | ||
| 1325 || [[#GetAdrawFrameBufferHandle]] | | 1325 || Adraw || [[#GetAdrawFrameBufferHandle|GetAdrawFrameBufferHandle]] | ||
|- | |- | ||
| 1326 || [[#GetAdrawImageHandle]] | | 1326 || Adraw || [[#GetAdrawImageHandle|GetAdrawImageHandle]] | ||
|- | |- | ||
| 1401 || [[#CreateNvDrv2UserSessionWithTransferMemory]] | | 1401 || NvDrv || [[#CreateNvDrv2UserSessionWithTransferMemory|CreateNvDrv2UserSessionWithTransferMemory]] | ||
|- | |- | ||
| 1402 || [[# | | 1402 || NvDrv || [[#CreateNvDrv2UserSessionWithRemoteMemory|CreateNvDrv2UserSessionWithRemoteMemory]] | ||
|- | |- | ||
| 1411 || [[#GetNvDrv2UserTransferMemoryUsage]] | | 1411 || NvDrv || [[#GetNvDrv2UserTransferMemoryUsage|GetNvDrv2UserTransferMemoryUsage]] | ||
|- | |- | ||
| 1501 || | | 1501 || InterModuleImage || CreateInterModuleImageContext | ||
|- | |- | ||
| 1502 || | | 1502 || InterModuleImage || InitializeInterModuleImageContext | ||
|- | |- | ||
| 1601 || | | 1601 || || | ||
|- | |- | ||
| 1602 || | | 1602 || || | ||
|- | |- | ||
| 1603 || | | 1603 || || | ||
|- | |- | ||
| 1611 || | | 1611 || || | ||
|- | |- | ||
| 1612 || | | 1612 || || | ||
|- | |- | ||
| 1691 || | | 1691 || || | ||
|} | |} | ||
== | == BootWithTransferMemory == | ||
Unofficial name. | Unofficial name. | ||
Takes a TransferMemory handle, an input [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]] and an input u64 '''TransferMemorySize'''. No output. | Takes a TransferMemory handle, an input [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]] and an input u64 '''TransferMemorySize'''. No output. | ||
== | == BootWithRemoteMemory == | ||
Unofficial name. | Unofficial name. | ||
| Line 142: | Line 298: | ||
Takes a Process handle. No output. | Takes a Process handle. No output. | ||
Called directly after [[# | Called directly after [[#BootWithTransferMemory]] or [[#BootWithRemoteMemory]]. | ||
== | == CreateContext == | ||
Unofficial name. | Unofficial name. | ||
| Line 151: | Line 307: | ||
Called directly after [[#SetCurrentProcessHandle]]. | Called directly after [[#SetCurrentProcessHandle]]. | ||
== | == CreateGpuContext == | ||
Unofficial name. | Unofficial name. | ||
No input/output. | No input/output. | ||
Called directly after [[#CreateGpuManagerSessionWithTransferMemory]] or [[# | Called directly after [[#CreateGpuManagerSessionWithTransferMemory]] or [[#CreateGpuManagerSessionWithRemoteMemory]]. | ||
== | == InitializeGpuContext == | ||
Unofficial name. | Unofficial name. | ||
No input/output. | No input/output. | ||
Called directly after [[# | Called directly after [[#CreateGpuContext]]. | ||
== GetImageInfo == | == GetImageInfo == | ||
| Line 177: | Line 333: | ||
[19.0.0] '''Version''' must be 2. | [19.0.0] '''Version''' must be 2. | ||
== | == CreateGpuManagerSessionWithRemoteMemory == | ||
Unofficial name. | Unofficial name. | ||
| Line 184: | Line 340: | ||
[19.0.0] '''Version''' must be 2. | [19.0.0] '''Version''' must be 2. | ||
== | == CreateAdrawContext == | ||
Unofficial name. | Unofficial name. | ||
No input/output. | No input/output. | ||
== | == InitializeAdrawContext == | ||
Unofficial name. | Unofficial name. | ||
No input/output. | No input/output. | ||
Called directly after [[# | Called directly after [[#CreateAdrawContext]]. | ||
== GetAdrawFrameBufferHandle == | == GetAdrawFrameBufferHandle == | ||
| Line 215: | Line 371: | ||
Takes a TransferMemory handle, an input u64 '''TransferMemorySize''' and an input u8. Returns an [[NV_services#(S2)_INvDrv2User|INvDrv2User]]. | Takes a TransferMemory handle, an input u64 '''TransferMemorySize''' and an input u8. Returns an [[NV_services#(S2)_INvDrv2User|INvDrv2User]]. | ||
== | == CreateNvDrv2UserSessionWithRemoteMemory == | ||
Unofficial name. | Unofficial name. | ||
| Line 234: | Line 390: | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| 11 || [[#GetEventIdRange]] | | 11 || [[#GetEventIdRange|GetEventIdRange]] | ||
|- | |- | ||
| 12 || [[#CreateEvent]] | | 12 || [[#CreateEvent|CreateEvent]] | ||
|- | |- | ||
| 21 || [[# | | 21 || [[#RequestKUserWorkerSession|RequestKUserWorkerSession]] | ||
|- | |- | ||
| 22 || [[# | | 22 || [[#GetKUserWorkerSession|GetKUserWorkerSession]] | ||
|- | |- | ||
| 33 || | | 33 || CreateGpuAddressSpace | ||
|- | |- | ||
| 41 || | | 41 || CreateGraphicsDevice | ||
|- | |- | ||
| 42 || | | 42 || DestroyGraphicsDevice | ||
|- | |- | ||
| 102 || | | 102 || | ||
|- | |- | ||
| 200 || | | 200 || SynchronizeGpuAddressSpace | ||
|- | |- | ||
| 201 || | | 201 || GetUserPartitionGpuAddress | ||
|- | |- | ||
| 202 || | | 202 || GetGsvPartitionGpuAddress | ||
|} | |} | ||
| Line 267: | Line 423: | ||
Takes an input u32 '''EventId'''. Returns an output Event handle. | Takes an input u32 '''EventId'''. Returns an output Event handle. | ||
=== | === RequestKUserWorkerSession === | ||
Unofficial name. | Unofficial name. | ||
| Line 274: | Line 430: | ||
'''EventId''' must have been previously passed to [[#CreateEvent]] and the returned Event handle will be signalled when the session is ready. | '''EventId''' must have been previously passed to [[#CreateEvent]] and the returned Event handle will be signalled when the session is ready. | ||
=== | === GetKUserWorkerSession === | ||
Unofficial name. | Unofficial name. | ||
No input. Returns a [[# | No input. Returns a [[#GetKUserWorkerSession]]. | ||
Called after [[# | Called after [[#RequestKUserWorkerSession]] and the Event handle has been signalled. | ||
=== | === KUserWorkerSession === | ||
This is "nn::gpuk::impl::kuser::KUserWorkerSession". | |||
This is a TIPC interface so the command numbers are subtracted by 16. | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
| Line 288: | Line 446: | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| 101 || [[#CreateGpuMemory]] | | 101 || [[#CreateGpuMemory|CreateGpuMemory]] | ||
|- | |||
| 102 || [[#DestroyGpuMemory|DestroyGpuMemory]] | |||
|- | |||
| 171 || EnsureGpuMemoryComptags | |||
|- | |||
| 172 || SetGpuMemoryUserDebugLabel | |||
|- | |- | ||
| | | 173 || SetGpuMemorySdkDebugLabel | ||
|- | |- | ||
| 201 || [19.0.0-19.1.0] | | 201 || [19.0.0-19.1.0] NormalMapGpuMemory4K | ||
|- | |- | ||
| 202 || [19.0.0-19.1.0] | | 202 || [19.0.0-19.1.0] NormalUnmapGpuMemory4K | ||
|- | |- | ||
| 203 || [19.0.0-19.1.0] | | 203 || [19.0.0-19.1.0] CreateSparseRegion | ||
|- | |- | ||
| 204 || [19.0.0-19.1.0] | | 204 || [19.0.0-19.1.0] DestroySparseRegion | ||
|- | |- | ||
| 205 || [19.0.0-19.1.0] | | 205 || [19.0.0-19.1.0] ExecuteSparseMapRequests | ||
|- | |- | ||
| 207 || [19.0.0-19.1.0] | | 207 || [19.0.0-19.1.0] NormalModifyMemoryKind4K | ||
|- | |- | ||
| | | 209 || [20.0.0+] SetGpuSegmentUserDebugLabel | ||
|- | |- | ||
| | | 210 || [20.0.0+] SetGpuSegmentSdkDebugLabel | ||
|- | |- | ||
| | | 211 || [20.0.0+] NormalMapGpuMemory4K | ||
|- | |- | ||
| | | 212 || [20.0.0+] NormalModifyMemoryKind4K | ||
|- | |- | ||
| | | 213 || [20.0.0+] NormalUnmapGpuMemory4K | ||
|- | |- | ||
| 216 || [20. | | 214 || [20.0.0+] CreateSparseRegion | ||
|- | |||
| 215 || [20.0.0+] DestroySparseRegion | |||
|- | |||
| 216 || [20.0.0+] ExecuteSparseMapRequests | |||
|} | |} | ||
| Line 330: | Line 498: | ||
The Event handle associated with '''EventId''' will be signalled when the memory is released. | The Event handle associated with '''EventId''' will be signalled when the memory is released. | ||
= gsv:m = | |||
= gsv:t = | |||
= gsv:sv = | |||
= gsv:s3 = | |||
= gsv:s4 = | |||