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>
Tue, 21 May 2019 02:22:49 +0000 (21:22 -0500)
commit43d8107f0bdcaa4300e40231cc45ecbd1f77f73f
treecba2f6779b362fbf1e051d47a2354a1dec7702ff
parent057f91645cef412fe460b17fa50726c8a1c5921c
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