drm/amd/display: make calculate watermarks a function pointer
authorDmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Wed, 27 May 2020 14:34:38 +0000 (10:34 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Jul 2020 05:59:20 +0000 (01:59 -0400)
To allow code reuse with minimal duplication watermark
calculation needs to be function pointer.

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Eric Bernstein <Eric.Bernstein@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/inc/core_types.h

index 4fbed8d..5f985fc 100644 (file)
@@ -101,7 +101,11 @@ struct resource_funcs {
                                        struct dc *dc,
                                        struct dc_state *context,
                                        bool fast_validate);
-
+       void (*calculate_wm)(
+                               struct dc *dc, struct dc_state *context,
+                               display_e2e_pipe_params_st *pipes,
+                               int pipe_cnt,
+                               int vlevel);
        int (*populate_dml_pipes)(
                struct dc *dc,
                struct dc_state *context,