Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb19e2ac authored by Daniel Vetter's avatar Daniel Vetter
Browse files

drm/i915: protect ringbuffer sarea update behind !MODESET



Avoids surprises when userspace races open/closes against this.

Cc: Stéphane Marchesin <marcheu@chromium.org>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 1fcb195e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1513,7 +1513,8 @@ static int ring_wait_for_space(struct intel_ring_buffer *ring, int n)
			return 0;
		}

		if (dev->primary->master) {
		if (!drm_core_check_feature(dev, DRIVER_MODESET) &&
		    dev->primary->master) {
			struct drm_i915_master_private *master_priv = dev->primary->master->driver_priv;
			if (master_priv->sarea_priv)
				master_priv->sarea_priv->perf_boxes |= I915_BOX_WAIT;