]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
drm/amdgpu/display move get_num_odm_splits() into dc_resource.c
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 12 Feb 2020 04:29:04 +0000 (23:29 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 12 Feb 2020 21:04:39 +0000 (16:04 -0500)
It's used by more than just DCN2.0.  Fixes missing symbol when
amdgpu is built without DCN support.

Reviewed-by: Zhan Liu <zhan.liu@amd.com>
Tested-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_resource.c
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h
drivers/gpu/drm/amd/display/dc/inc/resource.h

index c02e5994d32b01c99f04643d93ba84005d68e103..572ce384253581f0ac060facc10cdefed383bf44 100644 (file)
@@ -532,6 +532,22 @@ static inline void get_vp_scan_direction(
                *flip_horz_scan_dir = !*flip_horz_scan_dir;
 }
 
+int get_num_odm_splits(struct pipe_ctx *pipe)
+{
+       int odm_split_count = 0;
+       struct pipe_ctx *next_pipe = pipe->next_odm_pipe;
+       while (next_pipe) {
+               odm_split_count++;
+               next_pipe = next_pipe->next_odm_pipe;
+       }
+       pipe = pipe->prev_odm_pipe;
+       while (pipe) {
+               odm_split_count++;
+               pipe = pipe->prev_odm_pipe;
+       }
+       return odm_split_count;
+}
+
 static void calculate_split_count_and_index(struct pipe_ctx *pipe_ctx, int *split_count, int *split_idx)
 {
        *split_count = get_num_odm_splits(pipe_ctx);
index 39026df56fa692703e0feb3669533d6355c71eee..1061faccec9cc9e723ab3e60573226552f874a22 100644 (file)
@@ -1861,22 +1861,6 @@ void dcn20_populate_dml_writeback_from_context(
 
 }
 
-int get_num_odm_splits(struct pipe_ctx *pipe)
-{
-       int odm_split_count = 0;
-       struct pipe_ctx *next_pipe = pipe->next_odm_pipe;
-       while (next_pipe) {
-               odm_split_count++;
-               next_pipe = next_pipe->next_odm_pipe;
-       }
-       pipe = pipe->prev_odm_pipe;
-       while (pipe) {
-               odm_split_count++;
-               pipe = pipe->prev_odm_pipe;
-       }
-       return odm_split_count;
-}
-
 int dcn20_populate_dml_pipes_from_context(
                struct dc *dc, struct dc_state *context, display_e2e_pipe_params_st *pipes)
 {
index 5180088ab6bcac288ceb22f9ca0202ed34d8d1fe..f5893840b79be1089de686411808cc71733e7b8a 100644 (file)
@@ -49,7 +49,6 @@ unsigned int dcn20_calc_max_scaled_time(
                unsigned int time_per_pixel,
                enum mmhubbub_wbif_mode mode,
                unsigned int urgent_watermark);
-int get_num_odm_splits(struct pipe_ctx *pipe);
 int dcn20_populate_dml_pipes_from_context(
                struct dc *dc, struct dc_state *context, display_e2e_pipe_params_st *pipes);
 struct pipe_ctx *dcn20_acquire_idle_pipe_for_layer(
index 5ae8ada154efe5127d3091df6f0493baabe64ba7..ca4c36c0c9bcf9b0db7b1e65f93c1ed4399d28fc 100644 (file)
@@ -179,4 +179,7 @@ unsigned int resource_pixel_format_to_bpp(enum surface_pixel_format format);
 
 void get_audio_check(struct audio_info *aud_modes,
        struct audio_check *aud_chk);
+
+int get_num_odm_splits(struct pipe_ctx *pipe);
+
 #endif /* DRIVERS_GPU_DRM_AMD_DC_DEV_DC_INC_RESOURCE_H_ */