]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
drm/msm: move submit fence wait out of struct_mutex
authorRob Clark <robdclark@gmail.com>
Sat, 25 Feb 2017 15:36:30 +0000 (10:36 -0500)
committerRob Clark <robdclark@gmail.com>
Sat, 8 Apr 2017 10:59:31 +0000 (06:59 -0400)
commit48f243c95bdb17c1453d48142abad6aabed339e5
treefa0a5ac11a0c5f68557cf3421fcbb6ab0aa21c91
parentcc69272673ae8ef83982d6e54c67bc01997a13ea
drm/msm: move submit fence wait out of struct_mutex

Probably a symptom of needing finer grained locking, but if we wait on
the incoming fence-fd (which could come from a different context) while
holding struct_mutex, that blocks retire_worker so gpu fences cannot get
signalled.

This causes a problem if userspace manages to get more than a frame
ahead, leaving the atomic-commit worker blocked waiting on fences that
cannot be signaled because submit is blocked waiting for a fence
signalled from vblank (after the atomic commit which is blocked).

If we start having multiple fence ctxs for the gpu, submit_fence_sync()
would probably need to move outside of struct_mutex as well.

Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/msm_gem_submit.c