From 3b9bf99b42f0f2044bf4dbb7cd7da0fea176a564 Mon Sep 17 00:00:00 2001 From: jsg Date: Thu, 19 Jan 2023 00:08:33 +0000 Subject: [PATCH] drm/amd/display: move remaining FPU code to dml folder From Ao Zhong 69a75087cd1f10d5be07527f7ed7ed38db429d7e in linux-6.1.y/6.1.7 58ddbecb14c792b7fe0d92ae5e25c9179d62ff25 in mainline linux --- sys/dev/pci/drm/amd/display/dc/dcn32/dcn32_resource.c | 5 +++-- sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 8 ++++++++ sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.h | 3 +++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/drm/amd/display/dc/dcn32/dcn32_resource.c b/sys/dev/pci/drm/amd/display/dc/dcn32/dcn32_resource.c index 33ab6fdc361..9919c39f7ea 100644 --- a/sys/dev/pci/drm/amd/display/dc/dcn32/dcn32_resource.c +++ b/sys/dev/pci/drm/amd/display/dc/dcn32/dcn32_resource.c @@ -1919,8 +1919,9 @@ int dcn32_populate_dml_pipes_from_context( timing = &pipe->stream->timing; pipes[pipe_cnt].pipe.src.gpuvm = true; - pipes[pipe_cnt].pipe.src.dcc_fraction_of_zs_req_luma = 0; - pipes[pipe_cnt].pipe.src.dcc_fraction_of_zs_req_chroma = 0; + DC_FP_START(); + dcn32_zero_pipe_dcc_fraction(pipes, pipe_cnt); + DC_FP_END(); pipes[pipe_cnt].pipe.dest.vfront_porch = timing->v_front_porch; pipes[pipe_cnt].pipe.src.gpuvm_min_page_size_kbytes = 256; // according to spreadsheet pipes[pipe_cnt].pipe.src.unbounded_req_mode = false; diff --git a/sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c b/sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c index d1bf49d207d..d90216d2fe3 100644 --- a/sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c +++ b/sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c @@ -2546,3 +2546,11 @@ void dcn32_update_bw_bounding_box_fpu(struct dc *dc, struct clk_bw_params *bw_pa } } +void dcn32_zero_pipe_dcc_fraction(display_e2e_pipe_params_st *pipes, + int pipe_cnt) +{ + dc_assert_fp_enabled(); + + pipes[pipe_cnt].pipe.src.dcc_fraction_of_zs_req_luma = 0; + pipes[pipe_cnt].pipe.src.dcc_fraction_of_zs_req_chroma = 0; +} diff --git a/sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.h b/sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.h index 3a3dc2ce4c7..ab010e7e840 100644 --- a/sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.h +++ b/sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.h @@ -73,4 +73,7 @@ int dcn32_find_dummy_latency_index_for_fw_based_mclk_switch(struct dc *dc, void dcn32_patch_dpm_table(struct clk_bw_params *bw_params); +void dcn32_zero_pipe_dcc_fraction(display_e2e_pipe_params_st *pipes, + int pipe_cnt); + #endif -- 2.20.1