Skip to content

Commit

Permalink
drm/panthor: Fix sync-only jobs
Browse files Browse the repository at this point in the history
A sync-only job is meant to provide a synchronization point on a
queue, so we can't return a NULL fence there, we have to add a signal
operation to the command stream which executes after all other
previously submitted jobs are done.

v2:
- Fixed a UAF bug
- Added R-bs

Fixes: de8548813824 ("drm/panthor: Add the scheduler logical block")
Signed-off-by: Boris Brezillon <[email protected]>
Reviewed-by: Liviu Dudau <[email protected]>
Reviewed-by: Steven Price <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
bbrezillon authored and lutzbichler committed Aug 25, 2024
1 parent fd3e5f9 commit 779d26b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/uapi/drm/panthor_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,9 @@ struct drm_panthor_queue_submit {
* Must be 64-bit/8-byte aligned (the size of a CS instruction)
*
* Can be zero if stream_addr is zero too.
*
* When the stream size is zero, the queue submit serves as a
* synchronization point.
*/
__u32 stream_size;

Expand All @@ -822,6 +825,8 @@ struct drm_panthor_queue_submit {
* ensure the GPU doesn't get garbage when reading the indirect command
* stream buffers. If you want the cache flush to happen
* unconditionally, pass a zero here.
*
* Ignored when stream_size is zero.
*/
__u32 latest_flush;

Expand Down

0 comments on commit 779d26b

Please sign in to comment.