[Intel-gfx] [PATCH 07/26] Revert "drm/i915/gem: Split eb_vma into its own allocation"

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Tue Jun 30 11:52:34 UTC 2020


Op 29-06-2020 om 17:08 schreef Tvrtko Ursulin:
>
> On 23/06/2020 15:28, Maarten Lankhorst wrote:
>> This reverts commit 0f1dd02295f35dcdcbaafcbcbbec0753884ab974.
>> This conflicts with the ww mutex handling, which needs to drop
>> the references after gpu submission anyway, because otherwise we
>> may risk unlocking a BO after first freeing it.
>
> What is the problem here? eb_vma_array_put in eb_move_to_gpu? If so, could you just move this put to later in the sequence? I am simply thinking how to avoid controversial reverts. Because on the other hand I did not figure out what 0f1dd02295f35dcdcbaafcbcbbec0753884ab974 fixed in a few minutes I spent staring at the patch. 


We need to unlock before we unref to prevent a use-after-free in unlock, so freeing and releasing in eb_move_to_gpu() is too early. This means we only end up with 1 path for unlock, so it's fine to revert.



More information about the Intel-gfx mailing list