summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ttm
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2017-08-17 12:23:51 +0200
committerAlex Deucher <alexander.deucher@amd.com>2017-08-18 18:02:58 +0200
commitdf9bcb0652bbfde1b37bda98f0ad1fa7fda46d67 (patch)
tree5a6d38c2f959042a97db1ecf2ba9cb4719b14522 /drivers/gpu/drm/ttm
parentdrm/amdgpu: fix vega10 graphic hang issue in S3 test (diff)
downloadlinux-df9bcb0652bbfde1b37bda98f0ad1fa7fda46d67.tar.xz
linux-df9bcb0652bbfde1b37bda98f0ad1fa7fda46d67.zip
drm/ttm: use reservation_object_trylock in ttm_bo_individualize_resv v2
Fixes a false positive from might_sleep(). The reservation object is freshly initialized, so nobody else can hold the mutex but the function is called from atomic context. v2: Correctly invert the check as well. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/ttm')
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 58e7fcea620e..cba11f13d994 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -403,7 +403,7 @@ static int ttm_bo_individualize_resv(struct ttm_buffer_object *bo)
return 0;
reservation_object_init(&bo->ttm_resv);
- BUG_ON(reservation_object_lock(&bo->ttm_resv, NULL));
+ BUG_ON(!reservation_object_trylock(&bo->ttm_resv));
r = reservation_object_copy_fences(&bo->ttm_resv, bo->resv);
if (r) {