Re: [PATCH 1/9] drm: execution context for GEM buffers v3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 28.02.23 um 20:13 schrieb Danilo Krummrich:
[SNIP]
+    if (exec->prelocked) {
+        dma_resv_unlock(exec->prelocked->resv);
+        drm_gem_object_put(exec->prelocked);
+        exec->prelocked = NULL;
+    }

Let's say we try to lock 3 objects A, B and C in chronological order and in the first "drm_exec_cleanup() iteration" C is contended. Firstly, we lock C in the next iteration. If now A or B is contended, we never set exec->prelocked to NULL in drm_exec_prepare_obj(), since we did not yet reach C.

Hence, this causes a double unlock, since the prelocked object is also unlocked in the above loop.

Maybe I miss a detail, but to me it looks like setting exec->prelocked to NULL and dropping the reference should be enough.

Ah, yes of course. That wasn't correct and my test cases didn't covered it.

Going to fix this and all the comments you pointed out and update the test cases, should be done by next week.

Thanks,
Christian.




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux