OSDN Git Service

drm/amdkfd: Make kfd_process reference counted
authorFelix Kuehling <Felix.Kuehling@amd.com>
Mon, 27 Nov 2017 23:29:51 +0000 (18:29 -0500)
committerOded Gabbay <oded.gabbay@gmail.com>
Mon, 27 Nov 2017 23:29:51 +0000 (18:29 -0500)
commit5ce10687ae5ba2aa06aeaaf3fad9ce64dff45a85
tree0168ef943a802dc9b351841bd4b6ddaa5587efb9
parentc7b1243eef128c49aabdfab71cd4f5ecb6602d97
drm/amdkfd: Make kfd_process reference counted

This will be used to elliminate the use of the process lock for
preventing concurrent process destruction. This will simplify lock
dependencies between KFD and KGD.

This also simplifies the process destruction in a few ways:
* Don't allocate work struct dynamically
* Remove unnecessary hack that increments mm reference counter
* Remove unnecessary process locking during destruction

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/gpu/drm/amd/amdkfd/kfd_priv.h
drivers/gpu/drm/amd/amdkfd/kfd_process.c