]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Grab modeset locks for GPU rest on pre-ctg
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 24 Nov 2014 16:28:11 +0000 (18:28 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 3 Dec 2014 08:29:38 +0000 (09:29 +0100)
commitee13a87ec560505b166565ec5f6f59f68d135d45
treea8af68e60bd807b19b7e090fa26743ce3e0092a7
parent95145bc3f7c5df5dafbe3c2cec7a24858d442fd1
drm/i915: Grab modeset locks for GPU rest on pre-ctg

On gen4 and earlier the GPU reset also resets the display, so we should
protect against concurrent modeset operations. Grab all the modeset locks
around the entire GPU reset dance, remebering first ti dislogde any
pending page flip to make sure we don't deadlock. Any pageflip coming
in between these two steps should fail anyway due to reset_in_progress,
so this should be safe.

This fixes a lot of failed asserts in the modeset code when there's a
modeset racing with the reset. Naturally the asserts aren't happy when
the expected state has disappeared.

v2: Drop UMS checks, complete pending flips after the reset (Daniel)

Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_drv.h