Bug 108524

Summary: [RADV] GPU lockup on event synchronization
Product: Mesa Reporter: nexyon
Component: Drivers/Vulkan/radeonAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact: mesa-dev
Severity: normal    
Priority: medium    
Version: 18.2   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description nexyon 2018-10-23 08:11:49 UTC
I'm working on Device - Host - Device synchronization with VkEvent, but doing that results to a lockup using radv. It works with amdvlk though as you can read in the original issue on the Khronos github page here: https://github.com/KhronosGroup/Vulkan-Docs/issues/755

Here is sample source code that reproduces the problem: https://gist.github.com/neXyon/859b2e52bac9a5a56b804d8a9d5fa4a5
Comment 1 Bas Nieuwenhuizen 2018-10-23 09:02:55 UTC
I did not see a lockup* but this fixes the data issue:

https://patchwork.freedesktop.org/patch/257901/

*: I got some what looks like the program just trying to dump too much stuff too the terminal, while the terminal cannot redraw because you are keeping a commandbuffer in flight. You can avoid this by using the compute queue or by dumping less stuff to the terminal (as fixing the data issue effectively does)
Comment 2 Bas Nieuwenhuizen 2018-10-25 14:23:51 UTC
Fixed with

commit d41c3cc01314fd2586ad2392a05647197d04c28d
Author: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Date:   Tue Oct 23 10:54:24 2018 +0200

    radv: Emit enqueued pipeline barriers on event write.
    
    Since the CPU can read them we need to execute any GPU->CPU
    flushes before the event is written.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108524
    Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver"
    Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.