drm/amd/display: move remaining FPU code to dml folder
authorAo Zhong <hacc1225@gmail.com>
Tue, 25 Oct 2022 21:17:49 +0000 (23:17 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 27 Oct 2022 19:12:08 +0000 (15:12 -0400)
pipes[pipe_cnt].pipe.src.dcc_fraction_of_zs_req_luma = 0;
pipes[pipe_cnt].pipe.src.dcc_fraction_of_zs_req_chroma = 0;
these two operations in dcn32/dcn32_resource.c still need to use FPU,
This will cause compilation to fail on ARM64 platforms because
-mgeneral-regs-only is enabled by default to disable the hardware FPU.
Therefore, imitate the dcn31_zero_pipe_dcc_fraction function in
dml/dcn31/dcn31_fpu.c, declare the dcn32_zero_pipe_dcc_fraction function
in dcn32_fpu.c, and move above two operations into this function.

Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Ao Zhong <hacc1225@gmail.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c
drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.h

index a88dd7b3d1c10e01774301b74076ecc413634881..287b7fa9bf419635c8ccb2fece5a7d2f83c29914 100644 (file)
@@ -1918,8 +1918,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;
index d8e68f13c28866c1346d5802b88edcea52561f0c..b6cd10f3181c391434c3333c3b98d3fedc4bf3a9 100644 (file)
@@ -2506,3 +2506,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;
+}
index 3a3dc2ce4c7390ae8fa38a5734ef7305d53a9630..ab010e7e840b8d204604d93d76891cc51b730f1f 100644 (file)
@@ -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