drm: Put damage blob when destroy plane state
authorDeepak Rawat <drawat@vmware.com>
Fri, 21 Dec 2018 19:35:59 +0000 (11:35 -0800)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 24 Dec 2018 10:53:50 +0000 (11:53 +0100)
Somehow the code to put the damage blob on destroy plane state and set
the blob to NULL when duplicate plane state was not merged. May be
because the files are refactored since the patch was written. With this
fix add those.

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Deepak Rawat <drawat@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Fixes: d3b21767821e ("drm: Add a new plane property to send damage during plane update")
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20181221193559.4346-1-drawat@vmware.com
drivers/gpu/drm/drm_atomic_state_helper.c

index 60bd7d708e354a9b03d19be1ea1427256fc6fabc..4985384e51f6e5cc7308efc670d08a05e92ff4ec 100644 (file)
@@ -241,6 +241,7 @@ void __drm_atomic_helper_plane_duplicate_state(struct drm_plane *plane,
 
        state->fence = NULL;
        state->commit = NULL;
+       state->fb_damage_clips = NULL;
 }
 EXPORT_SYMBOL(__drm_atomic_helper_plane_duplicate_state);
 
@@ -285,6 +286,8 @@ void __drm_atomic_helper_plane_destroy_state(struct drm_plane_state *state)
 
        if (state->commit)
                drm_crtc_commit_put(state->commit);
+
+       drm_property_blob_put(state->fb_damage_clips);
 }
 EXPORT_SYMBOL(__drm_atomic_helper_plane_destroy_state);