Commit 6de20237 authored by Eric Yang's avatar Eric Yang Committed by Alex Deucher

drm/amd/display: move bw calc code into helpers

[Why]
For better readability and reusability

[How]
Move snippets of BW calculation code into helpers.
Signed-off-by: default avatarEric Yang <Eric.Yang2@amd.com>
Reviewed-by: default avatarFatemeh Darbehani <Fatemeh.Darbehani@amd.com>
Acked-by: default avatarLeo Li <sunpeng.li@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 4bc84690
...@@ -26,8 +26,6 @@ ...@@ -26,8 +26,6 @@
#include "dccg.h" #include "dccg.h"
#include "clk_mgr_internal.h" #include "clk_mgr_internal.h"
#include "dcn20/dcn20_clk_mgr.h"
#include "dce100/dce_clk_mgr.h" #include "dce100/dce_clk_mgr.h"
#include "reg_helper.h" #include "reg_helper.h"
#include "core_types.h" #include "core_types.h"
......
...@@ -116,6 +116,17 @@ void dcn20_set_mcif_arb_params( ...@@ -116,6 +116,17 @@ void dcn20_set_mcif_arb_params(
display_e2e_pipe_params_st *pipes, display_e2e_pipe_params_st *pipes,
int pipe_cnt); int pipe_cnt);
bool dcn20_validate_bandwidth(struct dc *dc, struct dc_state *context, bool fast_validate); bool dcn20_validate_bandwidth(struct dc *dc, struct dc_state *context, bool fast_validate);
bool dcn20_fast_validate_bw(
struct dc *dc,
struct dc_state *context,
display_e2e_pipe_params_st *pipes,
int *pipe_split_from,
int *vlevel_out);
void dcn20_calculate_dlg_params(
struct dc *dc, struct dc_state *context,
display_e2e_pipe_params_st *pipes,
int pipe_cnt,
int vlevel);
enum dc_status dcn20_build_mapped_resource(const struct dc *dc, struct dc_state *context, struct dc_stream_state *stream); enum dc_status dcn20_build_mapped_resource(const struct dc *dc, struct dc_state *context, struct dc_stream_state *stream);
enum dc_status dcn20_add_stream_to_ctx(struct dc *dc, struct dc_state *new_ctx, struct dc_stream_state *dc_stream); enum dc_status dcn20_add_stream_to_ctx(struct dc *dc, struct dc_state *new_ctx, struct dc_stream_state *dc_stream);
......
...@@ -64,6 +64,8 @@ enum dentist_divider_range { ...@@ -64,6 +64,8 @@ enum dentist_divider_range {
*************************************************************************************** ***************************************************************************************
*/ */
/* Macros */
#define TO_CLK_MGR_INTERNAL(clk_mgr)\ #define TO_CLK_MGR_INTERNAL(clk_mgr)\
container_of(clk_mgr, struct clk_mgr_internal, base) container_of(clk_mgr, struct clk_mgr_internal, base)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment