drm/v3d: Add missing implicit synchronization.
authorEric Anholt <eric@anholt.net>
Thu, 28 Mar 2019 00:44:40 +0000 (17:44 -0700)
committerpopcornmix <popcornmix@gmail.com>
Thu, 13 Jun 2019 10:54:28 +0000 (11:54 +0100)
commit81a2ca9dd14751c05632f96d3375824862c4364a
tree341eae34b38cfc47629d4ae79cfb1d26731765d9
parent55004640a096e242f60f7861c370ad0924829a21
drm/v3d: Add missing implicit synchronization.

It is the expectation of existing userspace (X11 + Mesa, in
particular) that jobs submitted to the kernel against a shared BO will
get implicitly synchronized by their submission order.  If we want to
allow clever userspace to disable implicit synchronization, we should
do that under its own submit flag (as amdgpu and lima do).

Note that we currently only implicitly sync for the rendering pass,
not binning -- if you texture-from-pixmap in the binning vertex shader
(vertex coordinate generation), you'll miss out on synchronization.

Fixes flickering when multiple clients are running in parallel,
particularly GL apps and compositors.

Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/v3d/v3d_drv.h
drivers/gpu/drm/v3d/v3d_gem.c
drivers/gpu/drm/v3d/v3d_sched.c