]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm: Track "seqno" fences by idr
authorRob Clark <robdclark@chromium.org>
Wed, 28 Jul 2021 01:06:12 +0000 (18:06 -0700)
committerRob Clark <robdclark@chromium.org>
Wed, 28 Jul 2021 01:09:18 +0000 (18:09 -0700)
commitbf13ec58b730a10ffa116714d848e1cd5be4818b
tree1c4533b31c383fda8359250d5a967cccdec8d98e
parent77f538f39b480a27ec689adab3fa6b1a67cd452b
drm/msm: Track "seqno" fences by idr

Previously the (non-fd) fence returned from submit ioctl was a raw
seqno, which is scoped to the ring.  But from UABI standpoint, the
ioctls related to seqno fences all specify a submitqueue.  We can
take advantage of that to replace the seqno fences with a cyclic idr
handle.

This is in preperation for moving to drm scheduler, at which point
the submit ioctl will return after queuing the submit job to the
scheduler, but before the submit is written into the ring (and
therefore before a ring seqno has been assigned).  Which means we
need to replace the dma_fence that userspace may need to wait on
with a scheduler fence.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: Christian König <christian.koenig@amd.com>
Link: https://lore.kernel.org/r/20210728010632.2633470-8-robdclark@gmail.com
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/msm_drv.c
drivers/gpu/drm/msm/msm_fence.c
drivers/gpu/drm/msm/msm_fence.h
drivers/gpu/drm/msm/msm_gem.h
drivers/gpu/drm/msm/msm_gem_submit.c
drivers/gpu/drm/msm/msm_gpu.h
drivers/gpu/drm/msm/msm_submitqueue.c