@@ -734,10 +734,6 @@ static void calculate_split_count_and_index(struct pipe_ctx *pipe_ctx, int *spli
734
734
(* split_idx )++ ;
735
735
split_pipe = split_pipe -> top_pipe ;
736
736
}
737
-
738
- /* MPO window on right side of ODM split */
739
- if (split_pipe && split_pipe -> prev_odm_pipe && !pipe_ctx -> prev_odm_pipe )
740
- (* split_idx )++ ;
741
737
} else {
742
738
/*Get odm split index*/
743
739
struct pipe_ctx * split_pipe = pipe_ctx -> prev_odm_pipe ;
@@ -784,11 +780,7 @@ static void calculate_recout(struct pipe_ctx *pipe_ctx)
784
780
/*
785
781
* Only the leftmost ODM pipe should be offset by a nonzero distance
786
782
*/
787
- if (pipe_ctx -> top_pipe && pipe_ctx -> top_pipe -> prev_odm_pipe && !pipe_ctx -> prev_odm_pipe ) {
788
- /* MPO window on right side of ODM split */
789
- data -> recout .x = stream -> dst .x + (surf_clip .x - stream -> dst .width /2 ) *
790
- stream -> dst .width / stream -> src .width ;
791
- } else if (!pipe_ctx -> prev_odm_pipe || split_idx == split_count ) {
783
+ if (!pipe_ctx -> prev_odm_pipe || split_idx == split_count ) {
792
784
data -> recout .x = stream -> dst .x ;
793
785
if (stream -> src .x < surf_clip .x )
794
786
data -> recout .x += (surf_clip .x - stream -> src .x ) * stream -> dst .width
@@ -986,8 +978,6 @@ static void calculate_inits_and_viewports(struct pipe_ctx *pipe_ctx)
986
978
* stream -> dst .height / stream -> src .height ;
987
979
if (pipe_ctx -> prev_odm_pipe && split_idx )
988
980
ro_lb = data -> h_active * split_idx - recout_full_x ;
989
- else if (pipe_ctx -> top_pipe && pipe_ctx -> top_pipe -> prev_odm_pipe )
990
- ro_lb = data -> h_active * split_idx - recout_full_x + data -> recout .x ;
991
981
else
992
982
ro_lb = data -> recout .x - recout_full_x ;
993
983
ro_tb = data -> recout .y - recout_full_y ;
@@ -1086,9 +1076,6 @@ bool resource_build_scaling_params(struct pipe_ctx *pipe_ctx)
1086
1076
timing -> v_border_top + timing -> v_border_bottom ;
1087
1077
if (pipe_ctx -> next_odm_pipe || pipe_ctx -> prev_odm_pipe )
1088
1078
pipe_ctx -> plane_res .scl_data .h_active /= get_num_odm_splits (pipe_ctx ) + 1 ;
1089
- /* ODM + windows MPO, where window is on either right or left ODM half */
1090
- else if (pipe_ctx -> top_pipe && (pipe_ctx -> top_pipe -> next_odm_pipe || pipe_ctx -> top_pipe -> prev_odm_pipe ))
1091
- pipe_ctx -> plane_res .scl_data .h_active /= get_num_odm_splits (pipe_ctx -> top_pipe ) + 1 ;
1092
1079
1093
1080
/* depends on h_active */
1094
1081
calculate_recout (pipe_ctx );
@@ -1097,6 +1084,11 @@ bool resource_build_scaling_params(struct pipe_ctx *pipe_ctx)
1097
1084
/* depends on scaling ratios and recout, does not calculate offset yet */
1098
1085
calculate_viewport_size (pipe_ctx );
1099
1086
1087
+ /* Stopgap for validation of ODM + MPO on one side of screen case */
1088
+ if (pipe_ctx -> plane_res .scl_data .viewport .height < 1 ||
1089
+ pipe_ctx -> plane_res .scl_data .viewport .width < 1 )
1090
+ return false;
1091
+
1100
1092
/*
1101
1093
* LB calculations depend on vp size, h/v_active and scaling ratios
1102
1094
* Setting line buffer pixel depth to 24bpp yields banding
@@ -1445,54 +1437,23 @@ bool dc_add_plane_to_context(
1445
1437
if (head_pipe != free_pipe ) {
1446
1438
tail_pipe = resource_get_tail_pipe (& context -> res_ctx , head_pipe );
1447
1439
ASSERT (tail_pipe );
1448
-
1449
- /* ODM + window MPO, where MPO window is on right half only */
1450
- if (free_pipe -> plane_state &&
1451
- (free_pipe -> plane_state -> clip_rect .x >= free_pipe -> stream -> src .width /2 ) &&
1452
- tail_pipe -> next_odm_pipe ) {
1453
- free_pipe -> stream_res .tg = tail_pipe -> next_odm_pipe -> stream_res .tg ;
1454
- free_pipe -> stream_res .abm = tail_pipe -> next_odm_pipe -> stream_res .abm ;
1455
- free_pipe -> stream_res .opp = tail_pipe -> next_odm_pipe -> stream_res .opp ;
1456
- free_pipe -> stream_res .stream_enc = tail_pipe -> next_odm_pipe -> stream_res .stream_enc ;
1457
- free_pipe -> stream_res .audio = tail_pipe -> next_odm_pipe -> stream_res .audio ;
1458
- free_pipe -> clock_source = tail_pipe -> next_odm_pipe -> clock_source ;
1459
-
1460
- free_pipe -> top_pipe = tail_pipe -> next_odm_pipe ;
1461
- tail_pipe -> next_odm_pipe -> bottom_pipe = free_pipe ;
1462
- } else {
1463
- free_pipe -> stream_res .tg = tail_pipe -> stream_res .tg ;
1464
- free_pipe -> stream_res .abm = tail_pipe -> stream_res .abm ;
1465
- free_pipe -> stream_res .opp = tail_pipe -> stream_res .opp ;
1466
- free_pipe -> stream_res .stream_enc = tail_pipe -> stream_res .stream_enc ;
1467
- free_pipe -> stream_res .audio = tail_pipe -> stream_res .audio ;
1468
- free_pipe -> clock_source = tail_pipe -> clock_source ;
1469
-
1470
- free_pipe -> top_pipe = tail_pipe ;
1471
- tail_pipe -> bottom_pipe = free_pipe ;
1472
-
1473
- if (!free_pipe -> next_odm_pipe && tail_pipe -> next_odm_pipe && tail_pipe -> next_odm_pipe -> bottom_pipe ) {
1474
- free_pipe -> next_odm_pipe = tail_pipe -> next_odm_pipe -> bottom_pipe ;
1475
- tail_pipe -> next_odm_pipe -> bottom_pipe -> prev_odm_pipe = free_pipe ;
1476
- }
1477
- if (!free_pipe -> prev_odm_pipe && tail_pipe -> prev_odm_pipe && tail_pipe -> prev_odm_pipe -> bottom_pipe ) {
1478
- free_pipe -> prev_odm_pipe = tail_pipe -> prev_odm_pipe -> bottom_pipe ;
1479
- tail_pipe -> prev_odm_pipe -> bottom_pipe -> next_odm_pipe = free_pipe ;
1480
- }
1440
+ free_pipe -> stream_res .tg = tail_pipe -> stream_res .tg ;
1441
+ free_pipe -> stream_res .abm = tail_pipe -> stream_res .abm ;
1442
+ free_pipe -> stream_res .opp = tail_pipe -> stream_res .opp ;
1443
+ free_pipe -> stream_res .stream_enc = tail_pipe -> stream_res .stream_enc ;
1444
+ free_pipe -> stream_res .audio = tail_pipe -> stream_res .audio ;
1445
+ free_pipe -> clock_source = tail_pipe -> clock_source ;
1446
+ free_pipe -> top_pipe = tail_pipe ;
1447
+ tail_pipe -> bottom_pipe = free_pipe ;
1448
+ if (!free_pipe -> next_odm_pipe && tail_pipe -> next_odm_pipe && tail_pipe -> next_odm_pipe -> bottom_pipe ) {
1449
+ free_pipe -> next_odm_pipe = tail_pipe -> next_odm_pipe -> bottom_pipe ;
1450
+ tail_pipe -> next_odm_pipe -> bottom_pipe -> prev_odm_pipe = free_pipe ;
1451
+ }
1452
+ if (!free_pipe -> prev_odm_pipe && tail_pipe -> prev_odm_pipe && tail_pipe -> prev_odm_pipe -> bottom_pipe ) {
1453
+ free_pipe -> prev_odm_pipe = tail_pipe -> prev_odm_pipe -> bottom_pipe ;
1454
+ tail_pipe -> prev_odm_pipe -> bottom_pipe -> next_odm_pipe = free_pipe ;
1481
1455
}
1482
1456
}
1483
-
1484
- /* ODM + window MPO, where MPO window is on left half only */
1485
- if (free_pipe -> plane_state &&
1486
- (free_pipe -> plane_state -> clip_rect .x + free_pipe -> plane_state -> clip_rect .width <=
1487
- free_pipe -> stream -> src .x + free_pipe -> stream -> src .width /2 )) {
1488
- break ;
1489
- }
1490
- /* ODM + window MPO, where MPO window is on right half only */
1491
- if (free_pipe -> plane_state &&
1492
- (free_pipe -> plane_state -> clip_rect .x >= free_pipe -> stream -> src .width /2 )) {
1493
- break ;
1494
- }
1495
-
1496
1457
head_pipe = head_pipe -> next_odm_pipe ;
1497
1458
}
1498
1459
/* assign new surfaces*/
0 commit comments