drm/nouveau: use tile_mode and pte_kind for VM_BIND bo allocations
Subsystems (3)
RFC PATCH v2 1/1 drm/nouveau: use tile_mode and pte_kind for VM_BIND bo allocations
Allows PTE kind and tile mode on BO create with VM_BIND, as well as adds a GETPARAM to indicate this change. This is needed to support modifiers in NVK and ensure correctness when dealing with the nouveau GL driver.
---
v2 of the VMA PTE kind and tile mode patch. This one adds the kind and tile mode handling code in the common path and also adds a GETPARAM to indicate the change. The userspace implementation is still a WIP but should be ready within the next week.
Thanks in advance,
Mohamed
drivers/gpu/drm/nouveau/nouveau_abi16.c | 3 ++ drivers/gpu/drm/nouveau/nouveau_bo.c | 45 +++++++++++-------------- include/uapi/drm/nouveau_drm.h | 7 ++++ 3 files changed, 30 insertions(+), 25 deletions(-)
drivers/gpu/drm/nouveau/nouveau_abi16.c +3 -0
@@ -272,6 +272,9 @@ nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS) getparam->value = (u64 )ttm_resource_manager_usage (vram_mgr);break ; } +case NOUVEAU_GETPARAM_HAS_VMA_TILEMODE : + getparam->value =1 ; +break ;default :NV_PRINTK (dbg, cli,"unknown parameter %lld\n" , getparam->param);return -EINVAL ;
drivers/gpu/drm/nouveau/nouveau_bo.c +20 -25
60 lines not on this page · raw message
include/uapi/drm/nouveau_drm.h +7 -0
@@ -68,6 +68,13 @@ extern "C" {*/ #define NOUVEAU_GETPARAM_VRAM_USED 19 +/* +* NOUVEAU_GETPARAM_HAS_VMA_TILEMODE +* +* Query whether tile mode and PTE kind are accepted with VM allocs or not. +*/ +#define NOUVEAU_GETPARAM_HAS_VMA_TILEMODE 20 +struct drm_nouveau_getparam {__u64 param;__u64 value;
Signature · 1 line
2.44.0