]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Put all non-blocking modesets onto an ordered wq
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 13 Nov 2017 13:36:22 +0000 (15:36 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 22 Dec 2017 12:29:42 +0000 (14:29 +0200)
commit26385af85129c5a42f7dee30fa95fc4d6f4e8a8b
tree94acf2d2c507449d35aa4c91bf74379cb2f5a2ad
parentcdc3aabd1cbc2ea92f4ab9646beaf7ad8f1aef1a
drm/i915: Put all non-blocking modesets onto an ordered wq

We have plenty of global registers and whatnot programmed without
any further locking by the modeset code. Currently non-bocking
modesets are allowed to execute in parallel which could corrupt
said registers.

To avoid the problem let's run all non-blocking modesets on an
ordered workqueue. We still put page flips etc. to system_unbound_wq
allowing page flips on one pipe to execute in parallel with page flips
or a modeset on a another pipe (assuming no known state is shared
between them, at which point they would have been added to the same
atomic commit and serialized that way).

Blocking modesets are already serialized with each other by
connection_mutex, and thus are safe. To serialize them with
non-blocking modesets we just flush the workqueue before executing
blocking modesets.

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Fixes: 173c35f5bfd0 ("drm/i915: nonblocking commit")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171113133622.8593-1-ville.syrjala@linux.intel.com
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_display.c