diff options
author | Dave Airlie <airlied@redhat.com> | 2017-01-27 10:17:43 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2017-01-27 10:17:43 +1000 |
commit | 1fb2d35411364a329557e4c02fbb42a6adbfa567 (patch) | |
tree | 6faee35a49368d0b8d739f77ca775769ae97929e /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |
parent | 99f300cf1f3877ad8ea923127de817a460b787bd (diff) | |
parent | b9b487e494712c8e5905b724e12f5ef17e9ae6f9 (diff) |
Merge branch 'drm-fixes-4.10' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
Just a few small fixes.
* 'drm-fixes-4.10' of git://people.freedesktop.org/~agd5f/linux:
Revert "drm/radeon: always apply pci shutdown callbacks"
drm/amdgpu: fix unload driver issue for virtual display
drm/amdgpu: check ring being ready before using
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 29d6d84d1c28..41e41f90265d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c @@ -83,6 +83,13 @@ int amdgpu_cs_get_ring(struct amdgpu_device *adev, u32 ip_type, } break; } + + if (!(*out_ring && (*out_ring)->adev)) { + DRM_ERROR("Ring %d is not initialized on IP %d\n", + ring, ip_type); + return -EINVAL; + } + return 0; } |