From: Vitaly Prosyak <vitaly.prosyak@xxxxxxx> When rotation is 90 and 270 ,the stream dimentions should be swaped for view port calculation Signed-off-by: Vitaly Prosyak <vitaly.prosyak at amd.com> Acked-by: Harry Wentland <harry.wentland at amd.com> --- drivers/gpu/drm/amd/dal/dc/core/dc_resource.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/dal/dc/core/dc_resource.c b/drivers/gpu/drm/amd/dal/dc/core/dc_resource.c index 22bfa45292e6..4c93d539ef8a 100644 --- a/drivers/gpu/drm/amd/dal/dc/core/dc_resource.c +++ b/drivers/gpu/drm/amd/dal/dc/core/dc_resource.c @@ -380,7 +380,7 @@ static void calculate_viewport( const struct dc_surface *surface, struct pipe_ctx *pipe_ctx) { - const struct rect stream_src = pipe_ctx->stream->public.src; + struct rect stream_src = pipe_ctx->stream->public.src; struct rect src = surface->src_rect; struct rect dst = surface->dst_rect; struct rect surface_clip = surface->clip_rect; @@ -388,10 +388,11 @@ static void calculate_viewport( if (surface->rotation == ROTATION_ANGLE_90 || - surface->rotation == ROTATION_ANGLE_270){ + surface->rotation == ROTATION_ANGLE_270) { rect_swap_helper(&src); rect_swap_helper(&dst); rect_swap_helper(&surface_clip); + rect_swap_helper(&stream_src); } /* The actual clip is an intersection between stream @@ -514,7 +515,6 @@ bool resource_build_scaling_params( { bool res; struct dc_crtc_timing *timing = &pipe_ctx->stream->public.timing; - /* Important: scaling ratio calculation requires pixel format, * lb depth calculation requires recout and taps require scaling ratios. */ -- 2.10.1