[RFC] GTT added to preferred domain (?)
Malte Dronskowski
malted.dev at gmail.com
Sat Mar 22 21:24:07 UTC 2025
Hello,
I want to prepend that I've never done kernel programming and am not familiar
with the amdgpu driver. That said, I read through the issues on Mesa regarding
its behavior when RADV runs out of VRAM [1] and the related information.
Thereby I stumbled upon Christian König mentioning that it would be buggy
behavior if the preferred domain included GTT when the initial domain was
updated [2]. I read some of the related code in the kernel driver, trying to
understand it, and got the impression that this is actually the case. When
amdgpu_gem_object_create() fails in amdgpu_gem_create_ioctl(),
"AMDGPU_GEM_DOMAIN_GTT" is added to "initial_domain" which during the retry
gets written into both, "domain" and "preferred_domain" in
amdgpu_gem_object_create(). Is this intended or a bug?
I've attached a minimal proof-of-concept patch (applied to kernel 6.14-rc7)
that runs fine for me. I don't know though if this has any real effect on the
driver's memory management. So please excuse me if this is a dumb
question/patch and I did steal your time. Any insight would still be
appreciated.
Thanks and best regards
Malte
[1] https://gitlab.freedesktop.org/mesa/mesa/-/issues/8763
[2] https://lists.freedesktop.org/archives/amd-gfx/2024-April/107401.html
______________________________________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: amdgpu_gem_preferred_domain.patch
Type: text/x-patch
Size: 4457 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20250322/29ece503/attachment-0001.bin>
More information about the amd-gfx
mailing list