• Felix Kuehling's avatar
    drm/amdgpu: Add KFD eviction fence · d8d019cc
    Felix Kuehling authored
    This fence is used by KFD to keep memory resident while user mode
    queues are enabled. Trying to evict memory will trigger the
    enable_signaling callback, which starts a KFD eviction, which
    involves preempting user mode queues before signaling the fence.
    There is one such fence per process.
    
    v2:
    * Grab a reference to mm_struct
    * Dereference fence after NULL check
    * Simplify fence release, no need to signal without anyone waiting
    * Added signed-off-by Harish, who is the original author of this code
    
    v3:
    * update MAINTAINERS file
    * change amd_kfd_ prefix to amdkfd_
    * remove useless initialization of variable to NULL
    
    v4:
    * set amdkfd_fence_ops to be static
    * Suggested by: Fengguang Wu <fengguang.wu@intel.com>
    Signed-off-by: default avatarHarish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
    Signed-off-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
    Reviewed-by: default avatarOded Gabbay <oded.gabbay@gmail.com>
    Signed-off-by: default avatarOded Gabbay <oded.gabbay@gmail.com>
    d8d019cc
kgd_kfd_interface.h 9.68 KB