drm/amdkfd: Fix compute profile switching
authorHarish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Fri, 25 Jan 2019 21:35:35 +0000 (16:35 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 24 May 2019 17:21:01 +0000 (12:21 -0500)
commitf756e6319ca07e369494a921b9935eb8625cc40b
tree0a9cab02877d588f040e7a26065d0fc9d7232352
parentc6fd980ab154455df62adc89d81898d24654ab72
drm/amdkfd: Fix compute profile switching

Fix compute profile switching on process termination.

Add a dedicated reference counter to keep track of entry/exit to/from
compute profile. This enables switching compute profiles for other
reasons than process creation or termination.

Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Signed-off-by: Eric Huang <JinhuiEric.Huang@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_device.c
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
drivers/gpu/drm/amd/amdkfd/kfd_priv.h