diff options
author | Ben Goz <ben.goz@amd.com> | 2015-01-05 15:48:28 +0200 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@amd.com> | 2015-01-05 15:48:28 +0200 |
commit | 2030664b709caa769f2b6a1d2e71d8cb343c6884 (patch) | |
tree | facf0a02465dfe022b3dd875589b5ff93beb0012 /drivers | |
parent | fec77bb50fd0b94cb502cd3745e8b5c4a6e9c404 (diff) |
drm/amdkfd: unmap VMID<-->PASID when relesing VMID (non-HWS)
This patch fixes a bug where deallocate_vmid() didn't actually unmap the
VMID<-->PASID mapping (in the registers).
That can cause undefined behavior.
This bug only occurs in non-HWS mode.
Signed-off-by: Ben Goz <ben.goz@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c index 3b08ed649ce5..9c8961d22360 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c @@ -161,6 +161,9 @@ static void deallocate_vmid(struct device_queue_manager *dqm, { int bit = qpd->vmid - KFD_VMID_START_OFFSET; + /* Release the vmid mapping */ + set_pasid_vmid_mapping(dqm, 0, qpd->vmid); + set_bit(bit, (unsigned long *)&dqm->vmid_bitmap); qpd->vmid = 0; q->properties.vmid = 0; |