]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm: One sched entity per process per priority
authorRob Clark <robdclark@chromium.org>
Fri, 1 Oct 2021 16:42:05 +0000 (09:42 -0700)
committerRob Clark <robdclark@chromium.org>
Fri, 1 Oct 2021 20:13:19 +0000 (13:13 -0700)
commit491e7169dfe9ddf87f6ed963e95ebf58cb1bc265
tree5262c87c174832cf170baa912e310209a347de38
parent7ff41be57c181ddbc3efe4d5454d7d6742194b09
drm/msm: One sched entity per process per priority

Some userspace apps make assumptions that rendering against multiple
contexts within the same process (from the same thread, with appropriate
MakeCurrent() calls) provides sufficient synchronization without any
external synchronization (ie. glFenceSync()/glWaitSync()).  Since a
submitqueue maps to a gl/vk context, having multiple sched entities of
the same priority only works with implicit sync enabled.

To fix this, limit things to a single sched entity per priority level
per process.

An alternative would be sharing submitqueues between contexts in
userspace, but tracking of per-context faults (ie. GL_EXT_robustness)
is already done at the submitqueue level, so this is not an option.

Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/msm_gem_submit.c
drivers/gpu/drm/msm/msm_gpu.h
drivers/gpu/drm/msm/msm_submitqueue.c