]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
drm/i915: Trim struct_mutex usage for kms
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 26 Jul 2017 16:00:36 +0000 (17:00 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 27 Jul 2017 07:56:00 +0000 (09:56 +0200)
commitfd70075f82b7f471ff923a56dea00fb44463296c
treebd9a3f964448515a46b2a4be340698abeafbd002
parentd38014eaac512761cb9ffa552247a888bf30a2c3
drm/i915: Trim struct_mutex usage for kms

Reduce acquisition of struct_mutex to the critical regions that must
hold it; for KMS, we need struct_mutex currently only for the purpose of
pinning/unpinning the framebuffer's VMA into the global GTT. This allows
us to avoid taking the struct_mutex when disabling the CRTC (i.e. NULL
framebuffer objects) before a reset. (Not yet achieving the full goal of
avoiding the strut_mutex nesting, but good enough to break the first
half of the reset deadlock.)

v2: Keep pages pinning inside struct_mutex for the moment.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170726160038.29487-1-chris@chris-wilson.co.uk
[danvet: Drop another case of grabbing dev->struct_mutex around
cleanup_planes, which popped up because I had to redo the drm-next
backmerge for entirely different reasons. Acked by Chris on irc.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c