summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2019-07-04 03:39:08 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2019-07-04 03:39:08 +0000
commit484d66024bf7723d6d3aa7c995d3c4880c45d2bd (patch)
tree1872482322fe54116dd72c981e5924b8e6216043
parenta7fe609a7be826de340bdaa297251a7651a65d56 (diff)
drm/amdgpu: use IP presence to free uvd and vce handles
From Alex Deucher 44876ae294dd7d7bcdfb527d12b86beb54cd013b in mainline linux
-rw-r--r--sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c
index 4afffb352f4..a46e8548679 100644
--- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c
+++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c
@@ -992,10 +992,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);