diff options
author | Jack Xiao <Jack.Xiao@amd.com> | 2015-04-27 01:45:40 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-06-03 21:03:20 -0400 |
commit | 7ab7e8a4096d2af80613113ae4bea497b4f0baf5 (patch) | |
tree | 274c312c2507b0085f187bceecbe6108bb0a954c | |
parent | 2d8bd23a057234ce8e540a3a08f4e67abcc551a8 (diff) |
drm/amdgpu: fix error check issue in amdgpu_mn_invalidate_range_start
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Monk Liu <monk.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c index e94429185660..b3a17a9ab1f4 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | |||
@@ -135,7 +135,7 @@ static void amdgpu_mn_invalidate_range_start(struct mmu_notifier *mn, | |||
135 | while (it) { | 135 | while (it) { |
136 | struct amdgpu_mn_node *node; | 136 | struct amdgpu_mn_node *node; |
137 | struct amdgpu_bo *bo; | 137 | struct amdgpu_bo *bo; |
138 | int r; | 138 | long r; |
139 | 139 | ||
140 | node = container_of(it, struct amdgpu_mn_node, it); | 140 | node = container_of(it, struct amdgpu_mn_node, it); |
141 | it = interval_tree_iter_next(it, start, end); | 141 | it = interval_tree_iter_next(it, start, end); |
@@ -144,19 +144,19 @@ static void amdgpu_mn_invalidate_range_start(struct mmu_notifier *mn, | |||
144 | 144 | ||
145 | r = amdgpu_bo_reserve(bo, true); | 145 | r = amdgpu_bo_reserve(bo, true); |
146 | if (r) { | 146 | if (r) { |
147 | DRM_ERROR("(%d) failed to reserve user bo\n", r); | 147 | DRM_ERROR("(%ld) failed to reserve user bo\n", r); |
148 | continue; | 148 | continue; |
149 | } | 149 | } |
150 | 150 | ||
151 | r = reservation_object_wait_timeout_rcu(bo->tbo.resv, | 151 | r = reservation_object_wait_timeout_rcu(bo->tbo.resv, |
152 | true, false, MAX_SCHEDULE_TIMEOUT); | 152 | true, false, MAX_SCHEDULE_TIMEOUT); |
153 | if (r) | 153 | if (r <= 0) |
154 | DRM_ERROR("(%d) failed to wait for user bo\n", r); | 154 | DRM_ERROR("(%ld) failed to wait for user bo\n", r); |
155 | 155 | ||
156 | amdgpu_ttm_placement_from_domain(bo, AMDGPU_GEM_DOMAIN_CPU); | 156 | amdgpu_ttm_placement_from_domain(bo, AMDGPU_GEM_DOMAIN_CPU); |
157 | r = ttm_bo_validate(&bo->tbo, &bo->placement, false, false); | 157 | r = ttm_bo_validate(&bo->tbo, &bo->placement, false, false); |
158 | if (r) | 158 | if (r) |
159 | DRM_ERROR("(%d) failed to validate user bo\n", r); | 159 | DRM_ERROR("(%ld) failed to validate user bo\n", r); |
160 | 160 | ||
161 | amdgpu_bo_unreserve(bo); | 161 | amdgpu_bo_unreserve(bo); |
162 | } | 162 | } |