aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Bernstein <eric.bernstein@amd.com>2018-04-17 16:50:28 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-05-18 17:08:24 -0400
commit6b8e1eb7c6e059d8bb52f24b13081205242fded9 (patch)
tree04db2dff6779f222fc29781466c01f80daa29919
parent3ba43a59927fbde07414393dfc2b6753cb233e00 (diff)
drm/amd/display: Update HW sequencer initialization
Signed-off-by: Eric Bernstein <eric.bernstein@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c6
-rw-r--r--drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h2
-rw-r--r--drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c10
-rw-r--r--drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h10
4 files changed, 20 insertions, 8 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
index be8820d8a2e6..24bcc5e58720 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
@@ -849,7 +849,7 @@ static void dcn10_verify_allow_pstate_change_high(struct dc *dc)
849} 849}
850 850
851/* trigger HW to start disconnect plane from stream on the next vsync */ 851/* trigger HW to start disconnect plane from stream on the next vsync */
852static void plane_atomic_disconnect(struct dc *dc, struct pipe_ctx *pipe_ctx) 852void hwss1_plane_atomic_disconnect(struct dc *dc, struct pipe_ctx *pipe_ctx)
853{ 853{
854 struct hubp *hubp = pipe_ctx->plane_res.hubp; 854 struct hubp *hubp = pipe_ctx->plane_res.hubp;
855 int dpp_id = pipe_ctx->plane_res.dpp->inst; 855 int dpp_id = pipe_ctx->plane_res.dpp->inst;
@@ -1032,7 +1032,7 @@ static void dcn10_init_hw(struct dc *dc)
1032 dc->res_pool->opps[i]->mpcc_disconnect_pending[pipe_ctx->plane_res.mpcc_inst] = true; 1032 dc->res_pool->opps[i]->mpcc_disconnect_pending[pipe_ctx->plane_res.mpcc_inst] = true;
1033 pipe_ctx->stream_res.opp = dc->res_pool->opps[i]; 1033 pipe_ctx->stream_res.opp = dc->res_pool->opps[i];
1034 1034
1035 plane_atomic_disconnect(dc, pipe_ctx); 1035 hwss1_plane_atomic_disconnect(dc, pipe_ctx);
1036 } 1036 }
1037 1037
1038 for (i = 0; i < dc->res_pool->pipe_count; i++) { 1038 for (i = 0; i < dc->res_pool->pipe_count; i++) {
@@ -2267,7 +2267,7 @@ static void dcn10_apply_ctx_for_surface(
2267 old_pipe_ctx->plane_state && 2267 old_pipe_ctx->plane_state &&
2268 old_pipe_ctx->stream_res.tg == tg) { 2268 old_pipe_ctx->stream_res.tg == tg) {
2269 2269
2270 plane_atomic_disconnect(dc, old_pipe_ctx); 2270 hwss1_plane_atomic_disconnect(dc, old_pipe_ctx);
2271 removed_pipe[i] = true; 2271 removed_pipe[i] = true;
2272 2272
2273 DC_LOG_DC( 2273 DC_LOG_DC(
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h
index 6c526b5095d9..44f734b73f9e 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h
@@ -37,4 +37,6 @@ extern void fill_display_configs(
37 37
38bool is_rgb_cspace(enum dc_color_space output_color_space); 38bool is_rgb_cspace(enum dc_color_space output_color_space);
39 39
40void hwss1_plane_atomic_disconnect(struct dc *dc, struct pipe_ctx *pipe_ctx);
41
40#endif /* __DC_HWSS_DCN10_H__ */ 42#endif /* __DC_HWSS_DCN10_H__ */
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c
index c734b7fa5835..f2fbce0e3fc5 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c
@@ -360,7 +360,7 @@ void optc1_program_timing(
360 360
361} 361}
362 362
363static void optc1_set_blank_data_double_buffer(struct timing_generator *optc, bool enable) 363void optc1_set_blank_data_double_buffer(struct timing_generator *optc, bool enable)
364{ 364{
365 struct optc *optc1 = DCN10TG_FROM_TG(optc); 365 struct optc *optc1 = DCN10TG_FROM_TG(optc);
366 366
@@ -1257,20 +1257,20 @@ void optc1_read_otg_state(struct optc *optc1,
1257 OPTC_UNDERFLOW_OCCURRED_STATUS, &s->underflow_occurred_status); 1257 OPTC_UNDERFLOW_OCCURRED_STATUS, &s->underflow_occurred_status);
1258} 1258}
1259 1259
1260static void optc1_clear_optc_underflow(struct timing_generator *optc) 1260void optc1_clear_optc_underflow(struct timing_generator *optc)
1261{ 1261{
1262 struct optc *optc1 = DCN10TG_FROM_TG(optc); 1262 struct optc *optc1 = DCN10TG_FROM_TG(optc);
1263 1263
1264 REG_UPDATE(OPTC_INPUT_GLOBAL_CONTROL, OPTC_UNDERFLOW_CLEAR, 1); 1264 REG_UPDATE(OPTC_INPUT_GLOBAL_CONTROL, OPTC_UNDERFLOW_CLEAR, 1);
1265} 1265}
1266 1266
1267static void optc1_tg_init(struct timing_generator *optc) 1267void optc1_tg_init(struct timing_generator *optc)
1268{ 1268{
1269 optc1_set_blank_data_double_buffer(optc, true); 1269 optc1_set_blank_data_double_buffer(optc, true);
1270 optc1_clear_optc_underflow(optc); 1270 optc1_clear_optc_underflow(optc);
1271} 1271}
1272 1272
1273static bool optc1_is_tg_enabled(struct timing_generator *optc) 1273bool optc1_is_tg_enabled(struct timing_generator *optc)
1274{ 1274{
1275 struct optc *optc1 = DCN10TG_FROM_TG(optc); 1275 struct optc *optc1 = DCN10TG_FROM_TG(optc);
1276 uint32_t otg_enabled = 0; 1276 uint32_t otg_enabled = 0;
@@ -1281,7 +1281,7 @@ static bool optc1_is_tg_enabled(struct timing_generator *optc)
1281 1281
1282} 1282}
1283 1283
1284static bool optc1_is_optc_underflow_occurred(struct timing_generator *optc) 1284bool optc1_is_optc_underflow_occurred(struct timing_generator *optc)
1285{ 1285{
1286 struct optc *optc1 = DCN10TG_FROM_TG(optc); 1286 struct optc *optc1 = DCN10TG_FROM_TG(optc);
1287 uint32_t underflow_occurred = 0; 1287 uint32_t underflow_occurred = 0;
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h
index 89e09e5327a2..c62052f46460 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h
@@ -497,4 +497,14 @@ void optc1_program_stereo(struct timing_generator *optc,
497 497
498bool optc1_is_stereo_left_eye(struct timing_generator *optc); 498bool optc1_is_stereo_left_eye(struct timing_generator *optc);
499 499
500void optc1_clear_optc_underflow(struct timing_generator *optc);
501
502void optc1_tg_init(struct timing_generator *optc);
503
504bool optc1_is_tg_enabled(struct timing_generator *optc);
505
506bool optc1_is_optc_underflow_occurred(struct timing_generator *optc);
507
508void optc1_set_blank_data_double_buffer(struct timing_generator *optc, bool enable);
509
500#endif /* __DC_TIMING_GENERATOR_DCN10_H__ */ 510#endif /* __DC_TIMING_GENERATOR_DCN10_H__ */