diff options
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c index 61ca1e21ae66..8f53d7a9f4dd 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c | |||
@@ -422,6 +422,11 @@ static void calculate_viewport(struct pipe_ctx *pipe_ctx) | |||
422 | bool sec_split = pipe_ctx->top_pipe && | 422 | bool sec_split = pipe_ctx->top_pipe && |
423 | pipe_ctx->top_pipe->surface == pipe_ctx->surface; | 423 | pipe_ctx->top_pipe->surface == pipe_ctx->surface; |
424 | 424 | ||
425 | if (stream->timing.timing_3d_format == TIMING_3D_FORMAT_SIDE_BY_SIDE || | ||
426 | stream->timing.timing_3d_format == TIMING_3D_FORMAT_TOP_AND_BOTTOM) { | ||
427 | pri_split = false; | ||
428 | sec_split = false; | ||
429 | } | ||
425 | /* The actual clip is an intersection between stream | 430 | /* The actual clip is an intersection between stream |
426 | * source and surface clip | 431 | * source and surface clip |
427 | */ | 432 | */ |
@@ -532,14 +537,27 @@ static void calculate_recout(struct pipe_ctx *pipe_ctx, struct view *recout_skip | |||
532 | stream->public.dst.y + stream->public.dst.height | 537 | stream->public.dst.y + stream->public.dst.height |
533 | - pipe_ctx->scl_data.recout.y; | 538 | - pipe_ctx->scl_data.recout.y; |
534 | 539 | ||
535 | /* Handle hsplit */ | 540 | /* Handle h & vsplit */ |
536 | if (pipe_ctx->top_pipe && pipe_ctx->top_pipe->surface == pipe_ctx->surface) { | 541 | if (pipe_ctx->top_pipe && pipe_ctx->top_pipe->surface == |
537 | pipe_ctx->scl_data.recout.width /= 2; | 542 | pipe_ctx->surface) { |
538 | pipe_ctx->scl_data.recout.x += pipe_ctx->scl_data.recout.width; | 543 | if (stream->public.timing.timing_3d_format == |
539 | /* Floor primary pipe, ceil 2ndary pipe */ | 544 | TIMING_3D_FORMAT_TOP_AND_BOTTOM) { |
540 | pipe_ctx->scl_data.recout.width += pipe_ctx->scl_data.recout.width % 2; | 545 | pipe_ctx->scl_data.recout.height /= 2; |
541 | } else if (pipe_ctx->bottom_pipe && pipe_ctx->bottom_pipe->surface == pipe_ctx->surface) { | 546 | pipe_ctx->scl_data.recout.y += pipe_ctx->scl_data.recout.height; |
542 | pipe_ctx->scl_data.recout.width /= 2; | 547 | /* Floor primary pipe, ceil 2ndary pipe */ |
548 | pipe_ctx->scl_data.recout.height += pipe_ctx->scl_data.recout.height % 2; | ||
549 | } else { | ||
550 | pipe_ctx->scl_data.recout.width /= 2; | ||
551 | pipe_ctx->scl_data.recout.x += pipe_ctx->scl_data.recout.width; | ||
552 | pipe_ctx->scl_data.recout.width += pipe_ctx->scl_data.recout.width % 2; | ||
553 | } | ||
554 | } else if (pipe_ctx->bottom_pipe && | ||
555 | pipe_ctx->bottom_pipe->surface == pipe_ctx->surface) { | ||
556 | if (stream->public.timing.timing_3d_format == | ||
557 | TIMING_3D_FORMAT_TOP_AND_BOTTOM) | ||
558 | pipe_ctx->scl_data.recout.height /= 2; | ||
559 | else | ||
560 | pipe_ctx->scl_data.recout.width /= 2; | ||
543 | } | 561 | } |
544 | 562 | ||
545 | /* Unclipped recout offset = stream dst offset + ((surf dst offset - stream src offset) | 563 | /* Unclipped recout offset = stream dst offset + ((surf dst offset - stream src offset) |