/* Shadow pipe has small viewport. */
                phantom_plane->clip_rect.y = 0;
-               phantom_plane->clip_rect.height = phantom_stream->timing.v_addressable;
+               phantom_plane->clip_rect.height = phantom_stream->src.height;
 
                phantom_plane->is_phantom = true;
 
 
        unsigned int dcfclk = context->bw_ctx.dml.vba.DCFCLKState[vlevel][context->bw_ctx.dml.vba.maxMpcComb];
        unsigned int socclk = context->bw_ctx.dml.vba.SOCCLKPerState[vlevel];
        struct vba_vars_st *vba = &context->bw_ctx.dml.vba;
+       struct dc_stream_state *main_stream = ref_pipe->stream;
 
        dc_assert_fp_enabled();
 
 
        phantom_stream->dst.y = 0;
        phantom_stream->dst.height = phantom_vactive;
+       /* When scaling, DML provides the end to end required number of lines for MALL.
+        * dst.height is always correct for this case, but src.height is not which causes a
+        * delta between main and phantom pipe scaling outputs. Need to adjust src.height on
+        * phantom for this case.
+        */
        phantom_stream->src.y = 0;
-       phantom_stream->src.height = phantom_vactive;
+       phantom_stream->src.height = (double)phantom_vactive * (double)main_stream->src.height / (double)main_stream->dst.height;
 
        phantom_stream->timing.v_addressable = phantom_vactive;
        phantom_stream->timing.v_front_porch = 1;