aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>2019-01-14 15:19:44 -0500
committerAlex Deucher <alexander.deucher@amd.com>2019-02-06 13:31:29 -0500
commit2c850b7b9e7d0fb36e0bd1ad1238ff55e5c4dcdc (patch)
treecbb83cb3aab179e653f92a76e5af0002c0bc9154
parentfb55546ea4b50f04ef41c196b8ac1824e26bc48c (diff)
drm/amd/display: add n_vid_mul and half pix_rate for odm
Dp needs half container rate to properly support odm Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com> Reviewed-by: Nikola Cornij <Nikola.Cornij@amd.com> Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c4
-rw-r--r--drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c7
-rw-r--r--drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h2
3 files changed, 8 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
index 4df8a43b5018..e1b285ea01ac 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
@@ -1032,8 +1032,7 @@ void dce110_unblank_stream(struct pipe_ctx *pipe_ctx,
1032 struct dc_link *link = stream->link; 1032 struct dc_link *link = stream->link;
1033 1033
1034 /* only 3 items below are used by unblank */ 1034 /* only 3 items below are used by unblank */
1035 params.pixel_clk_khz = 1035 params.pixel_clk_khz = pipe_ctx->stream->timing.pix_clk_100hz / 10;
1036 pipe_ctx->stream->timing.pix_clk_100hz / 10;
1037 params.link_settings.link_rate = link_settings->link_rate; 1036 params.link_settings.link_rate = link_settings->link_rate;
1038 1037
1039 if (dc_is_dp_signal(pipe_ctx->stream->signal)) 1038 if (dc_is_dp_signal(pipe_ctx->stream->signal))
@@ -1043,6 +1042,7 @@ void dce110_unblank_stream(struct pipe_ctx *pipe_ctx,
1043 link->dc->hwss.edp_backlight_control(link, true); 1042 link->dc->hwss.edp_backlight_control(link, true);
1044 } 1043 }
1045} 1044}
1045
1046void dce110_blank_stream(struct pipe_ctx *pipe_ctx) 1046void dce110_blank_stream(struct pipe_ctx *pipe_ctx)
1047{ 1047{
1048 struct dc_stream_state *stream = pipe_ctx->stream; 1048 struct dc_stream_state *stream = pipe_ctx->stream;
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 1dbd1d3999e6..2f78a84f0dcb 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c
@@ -390,7 +390,7 @@ void optc1_program_timing(
390 390
391 h_div_2 = optc1_is_two_pixels_per_containter(&patched_crtc_timing); 391 h_div_2 = optc1_is_two_pixels_per_containter(&patched_crtc_timing);
392 REG_UPDATE(OTG_H_TIMING_CNTL, 392 REG_UPDATE(OTG_H_TIMING_CNTL,
393 OTG_H_TIMING_DIV_BY2, h_div_2); 393 OTG_H_TIMING_DIV_BY2, h_div_2 || optc1->comb_opp_id != 0xf);
394 394
395} 395}
396 396
@@ -1531,10 +1531,13 @@ void dcn10_timing_generator_init(struct optc *optc1)
1531 optc1->min_v_blank_interlace = 5; 1531 optc1->min_v_blank_interlace = 5;
1532 optc1->min_h_sync_width = 8; 1532 optc1->min_h_sync_width = 8;
1533 optc1->min_v_sync_width = 1; 1533 optc1->min_v_sync_width = 1;
1534 optc1->comb_opp_id = 0xf;
1534} 1535}
1535 1536
1536bool optc1_is_two_pixels_per_containter(const struct dc_crtc_timing *timing) 1537bool optc1_is_two_pixels_per_containter(const struct dc_crtc_timing *timing)
1537{ 1538{
1538 return timing->pixel_encoding == PIXEL_ENCODING_YCBCR420; 1539 bool two_pix = timing->pixel_encoding == PIXEL_ENCODING_YCBCR420;
1540
1541 return two_pix;
1539} 1542}
1540 1543
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 8a4e3e37e894..24452f11c598 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h
@@ -435,7 +435,7 @@ struct optc {
435 const struct dcn_optc_shift *tg_shift; 435 const struct dcn_optc_shift *tg_shift;
436 const struct dcn_optc_mask *tg_mask; 436 const struct dcn_optc_mask *tg_mask;
437 437
438 enum controller_id controller_id; 438 int comb_opp_id;
439 439
440 uint32_t max_h_total; 440 uint32_t max_h_total;
441 uint32_t max_v_total; 441 uint32_t max_v_total;