From: Chris Wilson Date: Thu, 19 Jan 2017 11:37:49 +0000 (+0000) Subject: drm/i915: Release temporary load-detect state upon switching X-Git-Tag: v4.14-rc1~674^2~37^2~448 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7abbd11f344aa7abe29befb218774a1ea26018ac;p=platform%2Fkernel%2Flinux-rpi3.git drm/i915: Release temporary load-detect state upon switching After we call drm_atomic_commit() on the load-detect state, we can free our local reference. Upon restore, we only apply and free the previous state. Fixes: 0853695c3ba4 ("drm: Add reference counting to drm_atomic_state") Signed-off-by: Chris Wilson Cc: Chris Wilson Cc: Daniel Vetter Cc: # v4.10-rc1+ Link: http://patchwork.freedesktop.org/patch/msgid/20170119113749.2517-1-chris@chris-wilson.co.uk Reviewed-by: Ville Syrjälä --- diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index bddadd9..ca3e711 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -11276,6 +11276,7 @@ found: } old->restore_state = restore_state; + drm_atomic_state_put(state); /* let the connector get through one full cycle before testing */ intel_wait_for_vblank(dev_priv, intel_crtc->pipe);