提交 10688217 编写于 作者: H Harry Wentland 提交者: Alex Deucher

drm/amd/display: Move pix_clk_params into stream_res

find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \
-o -name "*.cpp" -o -name "*.hpp" | \
xargs sed -i
's/pipes->pix_clk_params/pipes->stream_res\.pix_clk_params/g'

find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \
-o -name "*.cpp" -o -name "*.hpp" | \
xargs sed -i
's/pipe_with_clk_src->pix_clk_params/pipe_with_clk_src->stream_res\.pix_clk_params/g'

find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \
-o -name "*.cpp" -o -name "*.hpp" | \
xargs sed -i
's/ctx->pix_clk_params->/ctx->stream_res\.pix_clk_params->/g'

find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \
-o -name "*.cpp" -o -name "*.hpp" | \
xargs sed -i 's/pipe->pix_clk_params/pipe->stream_res\.pix_clk_params/g'

find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \
-o -name "*.cpp" -o -name "*.hpp" | \
xargs sed -i
's/pipe_ctx->pix_clk_params/pipe_ctx->stream_res\.pix_clk_params/g'

find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \
-o -name "*.cpp" -o -name "*.hpp" | \
xargs sed -i \
's/pipe_ctx\[pipe_offset\]\.pix_clk_params/pipe_ctx\[pipe_offset\]\.stream_res\.pix_clk_params/g'

find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \
-o -name "*.cpp" -o -name "*.hpp" | \
xargs sed -i \
's/grouped_pipes\[i\]->pix_clk_params/grouped_pipes\[i\]->stream_^Cs\.pix_clk_params/g'

find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \
-o -name "*.cpp" -o -name "*.hpp" | \
xargs sed -i \
's/grouped_pipes\[0\]->pix_clk_params/grouped_pipes\[0\]->stream_res\.pix_clk_params/g'

find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \
-o -name "*.cpp" -o -name "*.hpp" | \
xargs sed -i \
's/grouped_pipes\[1\]->pix_clk_params/grouped_pipes\[1\]->stream_res\.pix_clk_params/g'

find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \
-o -name "*.cpp" -o -name "*.hpp" | \
xargs sed -i \
's/pipe_ctx\[i\]->pix_clk_params/pipe_ctx\[i\]->stream_res\.pix_clk_params/g'

find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \
-o -name "*.cpp" -o -name "*.hpp" | \
xargs sed -i \
's/pipe_ctx_old->pix_clk_params/pipe_ctx_old->stream_res\.pix_clk_params/g'

find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \
-o -name "*.cpp" -o -name "*.hpp" | \
xargs sed -i \
's/pipe_set\[j\]->pix_clk_params/pipe_set\[j\]->stream_res\.pix_clk_params/g'

find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \
-o -name "*.cpp" -o -name "*.hpp" | \
xargs sed -i \
's/pipe_ctx\[i\]\.pix_clk_params/pipe_ctx\[i\]\.stream_res\.pix_clk_params/g'

find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \
-o -name "*.cpp" -o -name "*.hpp" | \
xargs sed -i \
's/pipes\[i\]\.pix_clk_params/pipes\[i\]\.stream_res\.pix_clk_params/g'
Signed-off-by: NHarry Wentland <harry.wentland@amd.com>
Reviewed-by: NTony Cheng <Tony.Cheng@amd.com>
Acked-by: NHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 afaacef4
...@@ -1620,8 +1620,8 @@ static struct fixed31_32 get_pbn_from_timing(struct pipe_ctx *pipe_ctx) ...@@ -1620,8 +1620,8 @@ static struct fixed31_32 get_pbn_from_timing(struct pipe_ctx *pipe_ctx)
uint32_t numerator; uint32_t numerator;
uint32_t denominator; uint32_t denominator;
bpc = get_color_depth(pipe_ctx->pix_clk_params.color_depth); bpc = get_color_depth(pipe_ctx->stream_res.pix_clk_params.color_depth);
kbps = pipe_ctx->pix_clk_params.requested_pix_clk * bpc * 3; kbps = pipe_ctx->stream_res.pix_clk_params.requested_pix_clk * bpc * 3;
/* /*
* margin 5300ppm + 300ppm ~ 0.6% as per spec, factor is 1.006 * margin 5300ppm + 300ppm ~ 0.6% as per spec, factor is 1.006
......
...@@ -77,11 +77,11 @@ void dp_enable_link_phy( ...@@ -77,11 +77,11 @@ void dp_enable_link_phy(
if (pipes[i].clock_source != NULL && if (pipes[i].clock_source != NULL &&
pipes[i].clock_source->id != CLOCK_SOURCE_ID_DP_DTO) { pipes[i].clock_source->id != CLOCK_SOURCE_ID_DP_DTO) {
pipes[i].clock_source = dp_cs; pipes[i].clock_source = dp_cs;
pipes[i].pix_clk_params.requested_pix_clk = pipes[i].stream_res.pix_clk_params.requested_pix_clk =
pipes[i].stream->timing.pix_clk_khz; pipes[i].stream->timing.pix_clk_khz;
pipes[i].clock_source->funcs->program_pix_clk( pipes[i].clock_source->funcs->program_pix_clk(
pipes[i].clock_source, pipes[i].clock_source,
&pipes[i].pix_clk_params, &pipes[i].stream_res.pix_clk_params,
&pipes[i].pll_settings); &pipes[i].pll_settings);
} }
} }
......
...@@ -870,20 +870,20 @@ static void build_audio_output( ...@@ -870,20 +870,20 @@ static void build_audio_output(
stream->timing.display_color_depth; stream->timing.display_color_depth;
audio_output->crtc_info.requested_pixel_clock = audio_output->crtc_info.requested_pixel_clock =
pipe_ctx->pix_clk_params.requested_pix_clk; pipe_ctx->stream_res.pix_clk_params.requested_pix_clk;
audio_output->crtc_info.calculated_pixel_clock = audio_output->crtc_info.calculated_pixel_clock =
pipe_ctx->pix_clk_params.requested_pix_clk; pipe_ctx->stream_res.pix_clk_params.requested_pix_clk;
/*for HDMI, audio ACR is with deep color ratio factor*/ /*for HDMI, audio ACR is with deep color ratio factor*/
if (dc_is_hdmi_signal(pipe_ctx->stream->signal) && if (dc_is_hdmi_signal(pipe_ctx->stream->signal) &&
audio_output->crtc_info.requested_pixel_clock == audio_output->crtc_info.requested_pixel_clock ==
stream->timing.pix_clk_khz) { stream->timing.pix_clk_khz) {
if (pipe_ctx->pix_clk_params.pixel_encoding == PIXEL_ENCODING_YCBCR420) { if (pipe_ctx->stream_res.pix_clk_params.pixel_encoding == PIXEL_ENCODING_YCBCR420) {
audio_output->crtc_info.requested_pixel_clock = audio_output->crtc_info.requested_pixel_clock =
audio_output->crtc_info.requested_pixel_clock/2; audio_output->crtc_info.requested_pixel_clock/2;
audio_output->crtc_info.calculated_pixel_clock = audio_output->crtc_info.calculated_pixel_clock =
pipe_ctx->pix_clk_params.requested_pix_clk/2; pipe_ctx->stream_res.pix_clk_params.requested_pix_clk/2;
} }
} }
...@@ -1003,7 +1003,7 @@ static enum dc_status dce110_prog_pixclk_crtc_otg( ...@@ -1003,7 +1003,7 @@ static enum dc_status dce110_prog_pixclk_crtc_otg(
if (false == pipe_ctx->clock_source->funcs->program_pix_clk( if (false == pipe_ctx->clock_source->funcs->program_pix_clk(
pipe_ctx->clock_source, pipe_ctx->clock_source,
&pipe_ctx->pix_clk_params, &pipe_ctx->stream_res.pix_clk_params,
&pipe_ctx->pll_settings)) { &pipe_ctx->pll_settings)) {
BREAK_TO_DEBUGGER(); BREAK_TO_DEBUGGER();
return DC_ERROR_UNEXPECTED; return DC_ERROR_UNEXPECTED;
...@@ -1425,9 +1425,9 @@ static uint32_t get_max_pixel_clock_for_all_paths( ...@@ -1425,9 +1425,9 @@ static uint32_t get_max_pixel_clock_for_all_paths(
if (pipe_ctx->top_pipe) if (pipe_ctx->top_pipe)
continue; continue;
if (pipe_ctx->pix_clk_params.requested_pix_clk > max_pix_clk) if (pipe_ctx->stream_res.pix_clk_params.requested_pix_clk > max_pix_clk)
max_pix_clk = max_pix_clk =
pipe_ctx->pix_clk_params.requested_pix_clk; pipe_ctx->stream_res.pix_clk_params.requested_pix_clk;
} }
if (max_pix_clk == 0) if (max_pix_clk == 0)
......
...@@ -748,10 +748,10 @@ static void get_pixel_clock_parameters( ...@@ -748,10 +748,10 @@ static void get_pixel_clock_parameters(
enum dc_status dce110_resource_build_pipe_hw_param(struct pipe_ctx *pipe_ctx) enum dc_status dce110_resource_build_pipe_hw_param(struct pipe_ctx *pipe_ctx)
{ {
get_pixel_clock_parameters(pipe_ctx, &pipe_ctx->pix_clk_params); get_pixel_clock_parameters(pipe_ctx, &pipe_ctx->stream_res.pix_clk_params);
pipe_ctx->clock_source->funcs->get_pix_clk_dividers( pipe_ctx->clock_source->funcs->get_pix_clk_dividers(
pipe_ctx->clock_source, pipe_ctx->clock_source,
&pipe_ctx->pix_clk_params, &pipe_ctx->stream_res.pix_clk_params,
&pipe_ctx->pll_settings); &pipe_ctx->pll_settings);
resource_build_bit_depth_reduction_params(pipe_ctx->stream, resource_build_bit_depth_reduction_params(pipe_ctx->stream,
&pipe_ctx->stream->bit_depth_params); &pipe_ctx->stream->bit_depth_params);
......
...@@ -703,7 +703,7 @@ static enum dc_status dcn10_prog_pixclk_crtc_otg( ...@@ -703,7 +703,7 @@ static enum dc_status dcn10_prog_pixclk_crtc_otg(
if (false == pipe_ctx->clock_source->funcs->program_pix_clk( if (false == pipe_ctx->clock_source->funcs->program_pix_clk(
pipe_ctx->clock_source, pipe_ctx->clock_source,
&pipe_ctx->pix_clk_params, &pipe_ctx->stream_res.pix_clk_params,
&pipe_ctx->pll_settings)) { &pipe_ctx->pll_settings)) {
BREAK_TO_DEBUGGER(); BREAK_TO_DEBUGGER();
return DC_ERROR_UNEXPECTED; return DC_ERROR_UNEXPECTED;
...@@ -1910,7 +1910,7 @@ static void update_dchubp_dpp( ...@@ -1910,7 +1910,7 @@ static void update_dchubp_dpp(
enable_dppclk( enable_dppclk(
dc->hwseq, dc->hwseq,
pipe_ctx->pipe_idx, pipe_ctx->pipe_idx,
pipe_ctx->pix_clk_params.requested_pix_clk, pipe_ctx->stream_res.pix_clk_params.requested_pix_clk,
context->bw.dcn.calc_clk.dppclk_div); context->bw.dcn.calc_clk.dppclk_div);
dc->current_context->bw.dcn.cur_clk.dppclk_div = dc->current_context->bw.dcn.cur_clk.dppclk_div =
context->bw.dcn.calc_clk.dppclk_div; context->bw.dcn.calc_clk.dppclk_div;
......
...@@ -806,11 +806,11 @@ static void build_clamping_params(struct dc_stream_state *stream) ...@@ -806,11 +806,11 @@ static void build_clamping_params(struct dc_stream_state *stream)
static enum dc_status build_pipe_hw_param(struct pipe_ctx *pipe_ctx) static enum dc_status build_pipe_hw_param(struct pipe_ctx *pipe_ctx)
{ {
get_pixel_clock_parameters(pipe_ctx, &pipe_ctx->pix_clk_params); get_pixel_clock_parameters(pipe_ctx, &pipe_ctx->stream_res.pix_clk_params);
pipe_ctx->clock_source->funcs->get_pix_clk_dividers( pipe_ctx->clock_source->funcs->get_pix_clk_dividers(
pipe_ctx->clock_source, pipe_ctx->clock_source,
&pipe_ctx->pix_clk_params, &pipe_ctx->stream_res.pix_clk_params,
&pipe_ctx->pll_settings); &pipe_ctx->pll_settings);
pipe_ctx->stream->clamping.pixel_encoding = pipe_ctx->stream->timing.pixel_encoding; pipe_ctx->stream->clamping.pixel_encoding = pipe_ctx->stream->timing.pixel_encoding;
......
...@@ -157,6 +157,8 @@ struct stream_resource { ...@@ -157,6 +157,8 @@ struct stream_resource {
struct timing_generator *tg; struct timing_generator *tg;
struct stream_encoder *stream_enc; struct stream_encoder *stream_enc;
struct audio *audio; struct audio *audio;
struct pixel_clk_params pix_clk_params;
}; };
struct plane_resource { struct plane_resource {
...@@ -177,7 +179,6 @@ struct pipe_ctx { ...@@ -177,7 +179,6 @@ struct pipe_ctx {
struct display_clock *dis_clk; struct display_clock *dis_clk;
struct clock_source *clock_source; struct clock_source *clock_source;
struct pixel_clk_params pix_clk_params;
struct pll_settings pll_settings; struct pll_settings pll_settings;
/*fmt*/ /*fmt*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册