Skip to content

Commit 51e80c0

Browse files
author
Iouri Tarassov
committed
drivers: hv: dxgkrnl: Implement various WDDM ioctls
Implement various WDDM IOCTLs. - IOCTLs to handle GPU virtual addressing (VA): LX_DXRESERVEGPUVIRTUALADDRESS (D3DKMTReserveGpuVertualAddress) LX_DXFREEGPUVIRTUALADDRESS (D3DKMTFreeGpuVertualAddress) LX_DXMAPGPUVIRTUALADDRESS (D3DKMTMapGpuVertualAddress) LX_DXUPDATEGPUVIRTUALADDRESS (D3DKMTUpdateGpuVertualAddress) WDDM supports a compute device to use GPU virtual addresses when accessing allocation memory. A GPU VA could be reserved or mapped to a GPU allocation. The video memory manager on the host updates GPU page tables for the virtual addresses. - IOCTLs to manage residency of GPU accessing allocations: LX_DXMAKERESIDENT (D3DKMTMakeResident) LX_DXEVICT (D3DKMTEvict) An allocation is resident when GPU is setup to access it. The current WDDM design does not support on demand GPU page faulting. An allocation must be resident (be in the local device memory or in non-pageable system memory) before GPU is allowed to access it. - IOCTLs to offer/reclaim alloctions: LX_DXOFFERALLOCATIONS {D3DKMTOfferAllocations) LX_DXRECLAIMALLOCATIONS2 (D3DKMTReclaimAllocations) When a user mode driver does not need an allocation, it can "offer" it. This means that the allocation is not in use and it local device memory could be reclaimed and given to another allocation. When the allocation is again needed, the caller can "reclaim" the allocations. If the allocation is still in the device local memory, the reclaim operation succeeds. If not the called must restore the content of the allocation before it can be used by the device. - LX_DXESCAPE (D3DKMTEscape) This IOCTL is used to send/receive private data between user mode driver and kernel mode driver. This is an extension of the WDDM APIs. - LX_DXGETDEVICESTATE (D3DKMTGetDeviceState) The IOCTL is used to get the current execution state of the dxgdevice object. - LX_DXMARKDEVICEASERROR (D3DKMTMarkDeviceAsError) The IOCTL is used to bring the dxgdevice object to the error state. Subsequent calls to use the device object will fail. - LX_DXQUERYSTATISTICS (D3DKMTQuerystatistics) The IOCTL is used to query various statistics from the compute device on the host. - IOCTLs to deal with execution context priorities LX_DXGETCONTEXTINPROCESSSCHEDULINGPRIORITY LX_DXGETCONTEXTSCHEDULINGPRIORITY LX_DXSETCONTEXTINPROCESSSCHEDULINGPRIORITY LX_DXSETCONTEXTSCHEDULINGPRIORITY Signed-off-by: Iouri Tarassov <[email protected]>
1 parent 3ae5fd2 commit 51e80c0

File tree

4 files changed

+2930
-176
lines changed

4 files changed

+2930
-176
lines changed

drivers/hv/dxgkrnl/dxgkrnl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -943,5 +943,7 @@ int dxgvmb_send_get_stdalloc_data(struct dxgdevice *device,
943943
int dxgvmb_send_query_statistics(struct dxgprocess *process,
944944
struct dxgadapter *adapter,
945945
struct d3dkmt_querystatistics *args);
946+
int dxgvmb_send_share_object_with_host(struct dxgprocess *process,
947+
struct d3dkmt_shareobjectwithhost *args);
946948

947949
#endif

0 commit comments

Comments
 (0)