Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: Add MTYPE flags to GPU VM IOCTL interface

Signed-off-by: Alex Xie <AlexBin.Xie@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Alex Xie and committed by
Alex Deucher
66e02bc3 39807b93

+13 -1
+1 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
··· 558 558 { 559 559 const uint32_t valid_flags = AMDGPU_VM_DELAY_UPDATE | 560 560 AMDGPU_VM_PAGE_READABLE | AMDGPU_VM_PAGE_WRITEABLE | 561 - AMDGPU_VM_PAGE_EXECUTABLE; 561 + AMDGPU_VM_PAGE_EXECUTABLE | AMDGPU_VM_MTYPE_MASK; 562 562 const uint32_t prt_flags = AMDGPU_VM_DELAY_UPDATE | 563 563 AMDGPU_VM_PAGE_PRT; 564 564
+12
include/uapi/drm/amdgpu_drm.h
··· 365 365 #define AMDGPU_VM_PAGE_EXECUTABLE (1 << 3) 366 366 /* partially resident texture */ 367 367 #define AMDGPU_VM_PAGE_PRT (1 << 4) 368 + /* MTYPE flags use bit 5 to 8 */ 369 + #define AMDGPU_VM_MTYPE_MASK (0xf << 5) 370 + /* Default MTYPE. Pre-AI must use this. Recommended for newer ASICs. */ 371 + #define AMDGPU_VM_MTYPE_DEFAULT (0 << 5) 372 + /* Use NC MTYPE instead of default MTYPE */ 373 + #define AMDGPU_VM_MTYPE_NC (1 << 5) 374 + /* Use WC MTYPE instead of default MTYPE */ 375 + #define AMDGPU_VM_MTYPE_WC (2 << 5) 376 + /* Use CC MTYPE instead of default MTYPE */ 377 + #define AMDGPU_VM_MTYPE_CC (3 << 5) 378 + /* Use UC MTYPE instead of default MTYPE */ 379 + #define AMDGPU_VM_MTYPE_UC (4 << 5) 368 380 369 381 struct drm_amdgpu_gem_va { 370 382 /** GEM object handle */