struct dc_plane_state *plane_state)
 {
        bool success;
+
        if (otg_master_pipe->plane_state == NULL)
                success = add_plane_to_opp_head_pipes(otg_master_pipe,
                                plane_state, new_ctx);
                success = acquire_secondary_dpp_pipes_and_add_plane(
                                otg_master_pipe, plane_state, new_ctx,
                                cur_ctx, pool);
-       if (success)
+       if (success) {
                /* when appending a plane mpc slice count changes from 0 to 1 */
                success = update_pipe_params_after_mpc_slice_count_change(
                                plane_state, new_ctx, pool);
+               if (!success)
+                       resource_remove_dpp_pipes_for_plane_composition(new_ctx,
+                                       pool, plane_state);
+       }
+
        return success;
 }
 
                const struct dc_plane_state *plane_state)
 {
        int i;
+
        for (i = pool->pipe_count - 1; i >= 0; i--) {
                struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[i];