drm/i915: Fix reference leak in intel_modeset_readout_hw_state.
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Tue, 14 Jul 2015 11:42:49 +0000 (13:42 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 14 Jul 2015 15:18:22 +0000 (17:18 +0200)
Unreference the old mode_blob by calling the crtc_destroy_state
helper before zeroing the crtc_state.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c

index ba2c933fcea2201ad00c798dd6372e9cb445f740..4325d00a4598967e560afdc49a23cf0ae88af1d3 100644 (file)
@@ -15441,6 +15441,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
        int i;
 
        for_each_intel_crtc(dev, crtc) {
+               __drm_atomic_helper_crtc_destroy_state(&crtc->base, crtc->base.state);
                memset(crtc->config, 0, sizeof(*crtc->config));
                crtc->config->base.crtc = &crtc->base;