Move update_plane_addr to apply_ctx_for_surface, address update will
just be called once, not twice for updat type is full and medium.
This will reduce some reg access and duration time.
Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
                        if (pipe_ctx->plane_state != plane_state)
                                continue;
 
-                       if (srf_updates[i].flip_addr)
-                               dc->hwss.update_plane_addr(dc, pipe_ctx);
+                       if (update_type == UPDATE_TYPE_FAST && srf_updates[i].flip_addr)
+                                       dc->hwss.update_plane_addr(dc, pipe_ctx);
                }
        }
 
 
                                        context->stream_count);
 
                dce110_program_front_end_for_pipe(dc, pipe_ctx);
+
+               dc->hwss.update_plane_addr(dc, pipe_ctx);
+
                program_surface_visibility(dc, pipe_ctx);
 
        }