drm/i915: Use the async worker to avoid reclaim tainting the ggtt->mutex
Hello Chris Wilson,
The patch e3793468b466: "drm/i915: Use the async worker to avoid reclaim tainting the ggtt->mutex" from Jan 30, 2020, leads to the following static checker warning:
drivers/gpu/drm/i915/i915_vma.c:356 i915_vma_wait_for_bind() warn: 's64max' cannot fit into 'bool'
drivers/gpu/drm/i915/i915_vma.c
345 int i915_vma_wait_for_bind(struct i915_vma *vma) 346 {
347 int err = 0;
348
349 if (rcu_access_pointer(vma->active.excl.fence)) {
350 struct dma_fence *fence;
351
352 rcu_read_lock();
353 fence = dma_fence_get_rcu_safe(&vma->active.excl.fence);
354 rcu_read_unlock();
355 if (fence) {
356 err = dma_fence_wait(fence, MAX_SCHEDULE_TIMEOUT);
^^^^^^^^^^^^^^^^^^^^The dma_fence_wait() takes a bool, not a timeout value.
357 dma_fence_put(fence); 358 } 359 } 360 361 return err; 362 }
regards,
dan carpenter
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Dan Carpenter (2020-05-07 10:17:14)
Quoted 23 lines
Hello Chris Wilson,
The patch
e3793468b466: "drm/i915: Use the async worker to avoid reclaim tainting theggtt->mutex" from Jan 30, 2020, leads to the following static checker warning:
drivers/gpu/drm/i915/i915_vma.c:356i915_vma_wait_for_bind()
warn: 's64max' cannot fit into 'bool'
drivers/gpu/drm/i915/i915_vma.c
345 inti915_vma_wait_for_bind(struct i915_vma *vma)346 { 347 int err = 0; 348 349 if (rcu_access_pointer(vma->active.excl.fence)) { 350 struct dma_fence *fence; 351 352 rcu_read_lock(); 353 fence = dma_fence_get_rcu_safe(&vma->active.excl.fence); 354 rcu_read_unlock(); 355 if (fence) { 356 err = dma_fence_wait(fence, MAX_SCHEDULE_TIMEOUT); ^^^^^^^^^^^^^^^^^^^^
Quoted 1 line
The
dma_fence_wait()takes a bool, not a timeout value.
Fortuitously becomes the same thing, an indefinite interruptible wait.
Accidentally fixed in a queued patch.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx