diff options
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dcn10/Makefile | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 33 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c (renamed from drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c) | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h (renamed from drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.h) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/inc/hw/opp.h | 19 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 1 |
7 files changed, 32 insertions, 31 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/Makefile b/drivers/gpu/drm/amd/display/dc/dcn10/Makefile index 9eac228315b5..5469bdfe19f3 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/Makefile +++ b/drivers/gpu/drm/amd/display/dc/dcn10/Makefile | |||
@@ -23,7 +23,7 @@ | |||
23 | # Makefile for DCN. | 23 | # Makefile for DCN. |
24 | 24 | ||
25 | DCN10 = dcn10_resource.o dcn10_ipp.o dcn10_hw_sequencer.o \ | 25 | DCN10 = dcn10_resource.o dcn10_ipp.o dcn10_hw_sequencer.o \ |
26 | dcn10_dpp.o dcn10_opp.o dcn10_timing_generator.o \ | 26 | dcn10_dpp.o dcn10_opp.o dcn10_optc.o \ |
27 | dcn10_hubp.o dcn10_mpc.o \ | 27 | dcn10_hubp.o dcn10_mpc.o \ |
28 | dcn10_dpp_dscl.o dcn10_dpp_cm.o dcn10_cm_common.o \ | 28 | dcn10_dpp_dscl.o dcn10_dpp_cm.o dcn10_cm_common.o \ |
29 | dcn10_hubbub.o | 29 | dcn10_hubbub.o |
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 824de3630889..c9d717cc7e47 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 | |||
@@ -32,7 +32,7 @@ | |||
32 | #include "dce/dce_hwseq.h" | 32 | #include "dce/dce_hwseq.h" |
33 | #include "abm.h" | 33 | #include "abm.h" |
34 | #include "dmcu.h" | 34 | #include "dmcu.h" |
35 | #include "dcn10/dcn10_timing_generator.h" | 35 | #include "dcn10_optc.h" |
36 | #include "dcn10/dcn10_dpp.h" | 36 | #include "dcn10/dcn10_dpp.h" |
37 | #include "dcn10/dcn10_mpc.h" | 37 | #include "dcn10/dcn10_mpc.h" |
38 | #include "timing_generator.h" | 38 | #include "timing_generator.h" |
@@ -465,6 +465,8 @@ static enum dc_status dcn10_prog_pixclk_crtc_otg( | |||
465 | bool enableStereo = stream->timing.timing_3d_format == TIMING_3D_FORMAT_NONE ? | 465 | bool enableStereo = stream->timing.timing_3d_format == TIMING_3D_FORMAT_NONE ? |
466 | false:true; | 466 | false:true; |
467 | bool rightEyePolarity = stream->timing.flags.RIGHT_EYE_3D_POLARITY; | 467 | bool rightEyePolarity = stream->timing.flags.RIGHT_EYE_3D_POLARITY; |
468 | int width = stream->timing.h_addressable + stream->timing.h_border_left + stream->timing.h_border_right; | ||
469 | int height = stream->timing.v_addressable + stream->timing.v_border_bottom + stream->timing.v_border_top; | ||
468 | 470 | ||
469 | /* by upper caller loop, pipe0 is parent pipe and be called first. | 471 | /* by upper caller loop, pipe0 is parent pipe and be called first. |
470 | * back end is set up by for pipe0. Other children pipe share back end | 472 | * back end is set up by for pipe0. Other children pipe share back end |
@@ -518,11 +520,14 @@ static enum dc_status dcn10_prog_pixclk_crtc_otg( | |||
518 | /* program otg blank color */ | 520 | /* program otg blank color */ |
519 | color_space = stream->output_color_space; | 521 | color_space = stream->output_color_space; |
520 | color_space_to_black_color(dc, color_space, &black_color); | 522 | color_space_to_black_color(dc, color_space, &black_color); |
521 | pipe_ctx->stream_res.tg->funcs->set_blank_color( | ||
522 | pipe_ctx->stream_res.tg, | ||
523 | &black_color); | ||
524 | 523 | ||
525 | if (!pipe_ctx->stream_res.tg->funcs->is_blanked(pipe_ctx->stream_res.tg)) { | 524 | if (pipe_ctx->stream_res.tg->funcs->set_blank_color) |
525 | pipe_ctx->stream_res.tg->funcs->set_blank_color( | ||
526 | pipe_ctx->stream_res.tg, | ||
527 | &black_color); | ||
528 | |||
529 | if (pipe_ctx->stream_res.tg->funcs->is_blanked && | ||
530 | !pipe_ctx->stream_res.tg->funcs->is_blanked(pipe_ctx->stream_res.tg)) { | ||
526 | pipe_ctx->stream_res.tg->funcs->set_blank(pipe_ctx->stream_res.tg, true); | 531 | pipe_ctx->stream_res.tg->funcs->set_blank(pipe_ctx->stream_res.tg, true); |
527 | hwss_wait_for_blank_complete(pipe_ctx->stream_res.tg); | 532 | hwss_wait_for_blank_complete(pipe_ctx->stream_res.tg); |
528 | false_optc_underflow_wa(dc, pipe_ctx->stream, pipe_ctx->stream_res.tg); | 533 | false_optc_underflow_wa(dc, pipe_ctx->stream, pipe_ctx->stream_res.tg); |
@@ -1808,6 +1813,10 @@ static void program_all_pipe_in_tree( | |||
1808 | struct pipe_ctx *pipe_ctx, | 1813 | struct pipe_ctx *pipe_ctx, |
1809 | struct dc_state *context) | 1814 | struct dc_state *context) |
1810 | { | 1815 | { |
1816 | struct dc_stream_state *stream = pipe_ctx->stream; | ||
1817 | int width = stream->timing.h_addressable + stream->timing.h_border_left + stream->timing.h_border_right; | ||
1818 | int height = stream->timing.v_addressable + stream->timing.v_border_bottom + stream->timing.v_border_top; | ||
1819 | |||
1811 | if (pipe_ctx->top_pipe == NULL) { | 1820 | if (pipe_ctx->top_pipe == NULL) { |
1812 | 1821 | ||
1813 | pipe_ctx->stream_res.tg->dlg_otg_param.vready_offset = pipe_ctx->pipe_dlg_param.vready_offset; | 1822 | pipe_ctx->stream_res.tg->dlg_otg_param.vready_offset = pipe_ctx->pipe_dlg_param.vready_offset; |
@@ -1818,7 +1827,11 @@ static void program_all_pipe_in_tree( | |||
1818 | 1827 | ||
1819 | pipe_ctx->stream_res.tg->funcs->program_global_sync( | 1828 | pipe_ctx->stream_res.tg->funcs->program_global_sync( |
1820 | pipe_ctx->stream_res.tg); | 1829 | pipe_ctx->stream_res.tg); |
1821 | pipe_ctx->stream_res.tg->funcs->set_blank(pipe_ctx->stream_res.tg, !is_pipe_tree_visible(pipe_ctx)); | 1830 | |
1831 | if (pipe_ctx->stream_res.tg->funcs->set_blank) | ||
1832 | pipe_ctx->stream_res.tg->funcs->set_blank( | ||
1833 | pipe_ctx->stream_res.tg, | ||
1834 | !is_pipe_tree_visible(pipe_ctx)); | ||
1822 | } | 1835 | } |
1823 | 1836 | ||
1824 | if (pipe_ctx->plane_state != NULL) { | 1837 | if (pipe_ctx->plane_state != NULL) { |
@@ -1925,9 +1938,12 @@ static void dcn10_apply_ctx_for_surface( | |||
1925 | { | 1938 | { |
1926 | int i; | 1939 | int i; |
1927 | struct timing_generator *tg; | 1940 | struct timing_generator *tg; |
1941 | struct output_pixel_processor *opp; | ||
1928 | bool removed_pipe[4] = { false }; | 1942 | bool removed_pipe[4] = { false }; |
1929 | unsigned int ref_clk_mhz = dc->res_pool->ref_clock_inKhz/1000; | 1943 | unsigned int ref_clk_mhz = dc->res_pool->ref_clock_inKhz/1000; |
1930 | bool program_water_mark = false; | 1944 | bool program_water_mark = false; |
1945 | int width = stream->timing.h_addressable + stream->timing.h_border_left + stream->timing.h_border_right; | ||
1946 | int height = stream->timing.v_addressable + stream->timing.v_border_bottom + stream->timing.v_border_top; | ||
1931 | 1947 | ||
1932 | struct pipe_ctx *top_pipe_to_program = | 1948 | struct pipe_ctx *top_pipe_to_program = |
1933 | find_top_pipe_for_stream(dc, context, stream); | 1949 | find_top_pipe_for_stream(dc, context, stream); |
@@ -1935,6 +1951,8 @@ static void dcn10_apply_ctx_for_surface( | |||
1935 | if (!top_pipe_to_program) | 1951 | if (!top_pipe_to_program) |
1936 | return; | 1952 | return; |
1937 | 1953 | ||
1954 | opp = top_pipe_to_program->stream_res.opp; | ||
1955 | |||
1938 | tg = top_pipe_to_program->stream_res.tg; | 1956 | tg = top_pipe_to_program->stream_res.tg; |
1939 | 1957 | ||
1940 | tg->funcs->lock(tg); | 1958 | tg->funcs->lock(tg); |
@@ -1942,7 +1960,8 @@ static void dcn10_apply_ctx_for_surface( | |||
1942 | if (num_planes == 0) { | 1960 | if (num_planes == 0) { |
1943 | 1961 | ||
1944 | /* OTG blank before remove all front end */ | 1962 | /* OTG blank before remove all front end */ |
1945 | tg->funcs->set_blank(tg, true); | 1963 | if (tg->funcs->set_blank) |
1964 | tg->funcs->set_blank(tg, true); | ||
1946 | } | 1965 | } |
1947 | 1966 | ||
1948 | /* Disconnect unused mpcc */ | 1967 | /* Disconnect unused mpcc */ |
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c index f73752c7de1a..827dd1486ce2 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c | |||
@@ -23,8 +23,9 @@ | |||
23 | * | 23 | * |
24 | */ | 24 | */ |
25 | 25 | ||
26 | |||
26 | #include "reg_helper.h" | 27 | #include "reg_helper.h" |
27 | #include "dcn10_timing_generator.h" | 28 | #include "dcn10_optc.h" |
28 | #include "dc.h" | 29 | #include "dc.h" |
29 | 30 | ||
30 | #define REG(reg)\ | 31 | #define REG(reg)\ |
@@ -251,8 +252,7 @@ void optc1_program_timing( | |||
251 | v_init = v_init / 2; | 252 | v_init = v_init / 2; |
252 | if ((optc->dlg_otg_param.vstartup_start/2)*2 > asic_blank_end) | 253 | if ((optc->dlg_otg_param.vstartup_start/2)*2 > asic_blank_end) |
253 | v_fp2 = v_fp2 / 2; | 254 | v_fp2 = v_fp2 / 2; |
254 | } | 255 | } else |
255 | else | ||
256 | REG_UPDATE(OTG_INTERLACE_CONTROL, | 256 | REG_UPDATE(OTG_INTERLACE_CONTROL, |
257 | OTG_INTERLACE_ENABLE, 0); | 257 | OTG_INTERLACE_ENABLE, 0); |
258 | 258 | ||
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.h b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h index eec860fa21e6..eec860fa21e6 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.h +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h | |||
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c index 65ce96ba6443..44825e2c9ebb 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include "dcn10/dcn10_mpc.h" | 34 | #include "dcn10/dcn10_mpc.h" |
35 | #include "irq/dcn10/irq_service_dcn10.h" | 35 | #include "irq/dcn10/irq_service_dcn10.h" |
36 | #include "dcn10/dcn10_dpp.h" | 36 | #include "dcn10/dcn10_dpp.h" |
37 | #include "dcn10/dcn10_timing_generator.h" | 37 | #include "dcn10_optc.h" |
38 | #include "dcn10/dcn10_hw_sequencer.h" | 38 | #include "dcn10/dcn10_hw_sequencer.h" |
39 | #include "dce110/dce110_hw_sequencer.h" | 39 | #include "dce110/dce110_hw_sequencer.h" |
40 | #include "dcn10/dcn10_opp.h" | 40 | #include "dcn10/dcn10_opp.h" |
diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/opp.h b/drivers/gpu/drm/amd/display/dc/inc/hw/opp.h index 6da125de9507..17e143e4cb94 100644 --- a/drivers/gpu/drm/amd/display/dc/inc/hw/opp.h +++ b/drivers/gpu/drm/amd/display/dc/inc/hw/opp.h | |||
@@ -282,25 +282,6 @@ struct opp_funcs { | |||
282 | bool enable, | 282 | bool enable, |
283 | bool rightEyePolarity); | 283 | bool rightEyePolarity); |
284 | 284 | ||
285 | void (*opp_set_test_pattern)( | ||
286 | struct output_pixel_processor *opp, | ||
287 | enum controller_dp_test_pattern test_pattern, | ||
288 | enum dc_color_depth color_depth, | ||
289 | int width, | ||
290 | int height); | ||
291 | |||
292 | void (*opp_dpg_blank_enable)( | ||
293 | struct output_pixel_processor *opp, | ||
294 | bool enable, | ||
295 | const struct tg_color *color, | ||
296 | int width, | ||
297 | int height); | ||
298 | |||
299 | void (*opp_convert_pti)( | ||
300 | struct output_pixel_processor *opp, | ||
301 | bool enable, | ||
302 | bool polarity); | ||
303 | |||
304 | }; | 285 | }; |
305 | 286 | ||
306 | #endif | 287 | #endif |
diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h b/drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h index a32c745b7d88..4c0aa56f7bae 100644 --- a/drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h +++ b/drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | |||
@@ -28,6 +28,7 @@ | |||
28 | #include "dc_types.h" | 28 | #include "dc_types.h" |
29 | #include "clock_source.h" | 29 | #include "clock_source.h" |
30 | #include "inc/hw/timing_generator.h" | 30 | #include "inc/hw/timing_generator.h" |
31 | #include "inc/hw/opp.h" | ||
31 | #include "inc/hw/link_encoder.h" | 32 | #include "inc/hw/link_encoder.h" |
32 | #include "core_status.h" | 33 | #include "core_status.h" |
33 | 34 | ||