]> git.baikalelectronics.ru Git - kernel.git/commit
drm/v3d: Add missing implicit synchronization.
authorEric Anholt <eric@anholt.net>
Tue, 16 Apr 2019 22:58:56 +0000 (15:58 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 18 Apr 2019 16:54:16 +0000 (09:54 -0700)
commitc9fd252d1d302c7aaa3ad541015264eb3fb9c41a
tree861286745cb5e4cdb4c605b4014ede8c44d62084
parente4d6fee505ea799bee122ebc13220e00b0367137
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.

v2: Fix a missing refcount on the CSD done fence for L2 cleaning.

Signed-off-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20190416225856.20264-6-eric@anholt.net
Acked-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/v3d/v3d_drv.h
drivers/gpu/drm/v3d/v3d_gem.c
drivers/gpu/drm/v3d/v3d_sched.c