diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2018-09-12 13:51:25 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-09-14 09:36:00 -0500 |
commit | 44876ae294dd7d7bcdfb527d12b86beb54cd013b (patch) | |
tree | bbe2074827d165851f5f6d3d3cf32b5b6b86dfe9 /drivers | |
parent | a06c3ee083b5c622bb9f4a687d7ab5265ee73dbf (diff) |
drm/amdgpu: use IP presence to free uvd and vce handles
Rather than checking the asic type, check whether the UVD
or VCE IP blocks exist. This way we don't have to update
the check with new asics that use VCN.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c index 76174c4d288a..65b713225ebf 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c @@ -974,10 +974,10 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev, pm_runtime_get_sync(dev->dev); - if (adev->asic_type != CHIP_RAVEN && adev->asic_type != CHIP_PICASSO) { + if (amdgpu_device_ip_get_ip_block(adev, AMD_IP_BLOCK_TYPE_UVD) != NULL) amdgpu_uvd_free_handles(adev, file_priv); + if (amdgpu_device_ip_get_ip_block(adev, AMD_IP_BLOCK_TYPE_VCE) != NULL) amdgpu_vce_free_handles(adev, file_priv); - } amdgpu_vm_bo_rmv(adev, fpriv->prt_va); |