<zackr>
dakr: do you happen to know how with drm_gpuvm are userspace bits handling vulkan aliasing requirements? drm_gpuvm doesn't support aliasing, so what should happen if a vulkan app creates two buffers and binds them to the same address? (two separate vkCreateBuffer bound to the same vkAllocateMemory)
kts has joined #dri-devel
sravn has quit []
<zackr>
i'm assuming that the userspace makes vkr resources (buffers, images, etc) objects that are backed by drm_gem_object's and drm_gem_object are simply VkDeviceMemory
djbw has joined #dri-devel
mripard has quit [Ping timeout: 480 seconds]
bolson has joined #dri-devel
Kayden has quit [Quit: Leaving]
kts has quit [Quit: Konversation terminated!]
sravn has joined #dri-devel
<dakr>
zackr, it's a while ago that I bothered with the userspace side of things, i.e. Vk. But I remeber that I always got confused by how things are named, so I have to page it back in.
<dakr>
Just to confirm: VkDeviceMemory -> handle to actual physical memory (drm_gem_object on the kernel side), VkBuffer -> GPU virtual mapping of some VkDeviceMemory (drm_gpuva on the kernel side).
<zackr>
dakr: perfect, thank you! and currently drm_gpuvm doesn't have any utilities for "just map this thing into a first spot that's available" does it? i need a vm for kernel allocated buffers as well, so i just have a simple gen_pool to keep finding ranges for new buffers, but i wanted to make sure i didn't miss anything
<dakr>
zackr, oh, well, that was a question. :)
<zackr>
hah, well, it made it click in my head so it became an answer
<dakr>
great!
<dakr>
And I think what I wrote should be correct.
<dakr>
Regarding your follow-up question:
<dakr>
No, GPUVM is not meant to serve as an allocator for the GPU's virtual address space. It only keeps track of it, help with eviction, etc.
<dakr>
It's meant to be used for a uAPI where userspace manages the GPU's virtual address space by its own.
<dakr>
So, you need some kind of range allocator in userspace for VkBuffer objects.
<dakr>
Or did you mean the kernel's VA space carve out with "kernel allocated buffers"? I think the term "buffer" is a bit overloaded. In the kernel we mean actual physical memory by that, whereas userspace with VkBuffer, means space in the virtual address space, where we can bind physical memory to.
jamesjones has joined #dri-devel
<zackr>
dakr: yea, the userspace bits make sense. but i also have a bunch of kernel side buffers for various things and i need them mapped in the gpu va space so i have a dedicated drm_gpuvm for kernel created objects. iirc pvr does something like that for their firmware ops but they don't need a range allocator because they use the physical addresses of buffers as va ranges. i can't do that because tt in ttm_resources' which are dma memory array's aren't
<zackr>
guaranteed to be contiguous so that's why i have a gen_pool to just allocate ranges for those kernel objects, but i wanted to make sure i wasn't missing something
<dakr>
zackr, ah, I see. That sounds fine then.
<zackr>
awesome, thank you. hugs and high fives
<dakr>
yw. :)
tobiasjakobi has joined #dri-devel
tobiasjakobi has quit [Remote host closed the connection]
kzd has quit [Quit: kzd]
kzd has joined #dri-devel
kts has joined #dri-devel
fab has quit [Ping timeout: 480 seconds]
mripard has joined #dri-devel
Kayden has joined #dri-devel
kts has quit [Quit: Konversation terminated!]
chewitt has quit [Quit: Zzz..]
LeviYun has quit [Ping timeout: 480 seconds]
ced117 has quit [Remote host closed the connection]
bonzini has quit [Ping timeout: 480 seconds]
ced117 has joined #dri-devel
LeviYun has joined #dri-devel
rasterman has joined #dri-devel
lynxeye has quit [Quit: Leaving.]
rasterman has quit [Quit: Gettin' stinky!]
Kayden has quit [Quit: Leaving]
LeviYun has quit [Ping timeout: 480 seconds]
Kayden has joined #dri-devel
iive has joined #dri-devel
epoch101_ has quit [Ping timeout: 480 seconds]
LeviYun has joined #dri-devel
lemonzest has quit [Quit: WeeChat 4.6.3]
LeviYun has quit [Ping timeout: 480 seconds]
<airlied>
zackr: nouveau carves out a chunk at the top of the address space for kernel