|
73 | 73 |
|
74 | 74 | #include "dc_trace.h"
|
75 | 75 |
|
| 76 | +#include "hw_sequencer_private.h" |
| 77 | + |
76 | 78 | #include "dce/dmub_outbox.h"
|
77 | 79 |
|
78 | 80 | #define CTX \
|
@@ -1056,6 +1058,44 @@ static void apply_ctx_interdependent_lock(struct dc *dc, struct dc_state *contex
|
1056 | 1058 | }
|
1057 | 1059 | }
|
1058 | 1060 |
|
| 1061 | +static void phantom_pipe_blank( |
| 1062 | + struct dc *dc, |
| 1063 | + struct timing_generator *tg, |
| 1064 | + int width, |
| 1065 | + int height) |
| 1066 | +{ |
| 1067 | + struct dce_hwseq *hws = dc->hwseq; |
| 1068 | + enum dc_color_space color_space; |
| 1069 | + struct tg_color black_color = {0}; |
| 1070 | + struct output_pixel_processor *opp = NULL; |
| 1071 | + uint32_t num_opps, opp_id_src0, opp_id_src1; |
| 1072 | + uint32_t otg_active_width, otg_active_height; |
| 1073 | + |
| 1074 | + /* program opp dpg blank color */ |
| 1075 | + color_space = COLOR_SPACE_SRGB; |
| 1076 | + color_space_to_black_color(dc, color_space, &black_color); |
| 1077 | + |
| 1078 | + otg_active_width = width; |
| 1079 | + otg_active_height = height; |
| 1080 | + |
| 1081 | + /* get the OPTC source */ |
| 1082 | + tg->funcs->get_optc_source(tg, &num_opps, &opp_id_src0, &opp_id_src1); |
| 1083 | + ASSERT(opp_id_src0 < dc->res_pool->res_cap->num_opp); |
| 1084 | + opp = dc->res_pool->opps[opp_id_src0]; |
| 1085 | + |
| 1086 | + opp->funcs->opp_set_disp_pattern_generator( |
| 1087 | + opp, |
| 1088 | + CONTROLLER_DP_TEST_PATTERN_SOLID_COLOR, |
| 1089 | + CONTROLLER_DP_COLOR_SPACE_UDEFINED, |
| 1090 | + COLOR_DEPTH_UNDEFINED, |
| 1091 | + &black_color, |
| 1092 | + otg_active_width, |
| 1093 | + otg_active_height, |
| 1094 | + 0); |
| 1095 | + |
| 1096 | + hws->funcs.wait_for_blank_complete(opp); |
| 1097 | +} |
| 1098 | + |
1059 | 1099 | static void disable_dangling_plane(struct dc *dc, struct dc_state *context)
|
1060 | 1100 | {
|
1061 | 1101 | int i, j;
|
@@ -1114,8 +1154,13 @@ static void disable_dangling_plane(struct dc *dc, struct dc_state *context)
|
1114 | 1154 | * again for different use.
|
1115 | 1155 | */
|
1116 | 1156 | if (old_stream->mall_stream_config.type == SUBVP_PHANTOM) {
|
1117 |
| - if (tg->funcs->enable_crtc) |
| 1157 | + if (tg->funcs->enable_crtc) { |
| 1158 | + int main_pipe_width, main_pipe_height; |
| 1159 | + main_pipe_width = old_stream->mall_stream_config.paired_stream->dst.width; |
| 1160 | + main_pipe_height = old_stream->mall_stream_config.paired_stream->dst.height; |
| 1161 | + phantom_pipe_blank(dc, tg, main_pipe_width, main_pipe_height); |
1118 | 1162 | tg->funcs->enable_crtc(tg);
|
| 1163 | + } |
1119 | 1164 | }
|
1120 | 1165 | dc_rem_all_planes_for_stream(dc, old_stream, dangling_context);
|
1121 | 1166 | disable_all_writeback_pipes_for_stream(dc, old_stream, dangling_context);
|
|
0 commit comments