[Mesa-dev] [PATCH] winsys/amdgpu: fix a race condition between fence updates and IB submissions

Marek Olšák maraeo at gmail.com
Fri Jan 6 16:30:33 UTC 2017


On Fri, Jan 6, 2017 at 1:02 PM, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
> On 02.01.2017 21:20, Marek Olšák wrote:
>>
>> From: Marek Olšák <marek.olsak at amd.com>
>>
>> The CS thread is needed to ensure proper ordering of operations and can't
>> be disabled (without complicating the code).
>>
>> Discovered by Nine CSMT, which ended up in a deadlock.
>
>
> I'm curious why the thread makes a difference for the deadlock. Why isn't it
> enough in the un-threaded case to extend the scope of the ws->bo_fence_lock
> to cover the submit ioctl call?

You can't extend the bo_fence lock to the CS thread, so the main
thread and the CS thread can be racing.

Marek


More information about the mesa-dev mailing list