Skip to content

Commit b206011

Browse files
Samson Tamalexdeucher
authored andcommitted
drm/amd/display: apply edge-case DISPCLK WDIVIDER changes to master OTG pipes only
[Why] The edge-case DISPCLK WDIVIDER changes call stream_enc functions. But with MPC pipes, downstream pipes have null stream_enc and will cause crash. [How] Only call stream_enc functions for pipes that are OTG master. Reviewed-by: Alvin Lee <[email protected]> Cc: Mario Limonciello <[email protected]> Cc: Alex Deucher <[email protected]> Cc: [email protected] Acked-by: Aurabindo Pillai <[email protected]> Signed-off-by: Samson Tam <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 134b8c5 commit b206011

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ void dcn20_update_clocks_update_dentist(struct clk_mgr_internal *clk_mgr, struct
157157
int32_t N;
158158
int32_t j;
159159

160-
if (!pipe_ctx->stream)
160+
if (!resource_is_pipe_type(pipe_ctx, OTG_MASTER))
161161
continue;
162162
/* Virtual encoders don't have this function */
163163
if (!stream_enc->funcs->get_fifo_cal_average_level)
@@ -188,7 +188,7 @@ void dcn20_update_clocks_update_dentist(struct clk_mgr_internal *clk_mgr, struct
188188
int32_t N;
189189
int32_t j;
190190

191-
if (!pipe_ctx->stream)
191+
if (!resource_is_pipe_type(pipe_ctx, OTG_MASTER))
192192
continue;
193193
/* Virtual encoders don't have this function */
194194
if (!stream_enc->funcs->get_fifo_cal_average_level)

drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ static void dcn32_update_clocks_update_dentist(
355355
int32_t N;
356356
int32_t j;
357357

358-
if (!pipe_ctx->stream)
358+
if (!resource_is_pipe_type(pipe_ctx, OTG_MASTER))
359359
continue;
360360
/* Virtual encoders don't have this function */
361361
if (!stream_enc->funcs->get_fifo_cal_average_level)
@@ -401,7 +401,7 @@ static void dcn32_update_clocks_update_dentist(
401401
int32_t N;
402402
int32_t j;
403403

404-
if (!pipe_ctx->stream)
404+
if (!resource_is_pipe_type(pipe_ctx, OTG_MASTER))
405405
continue;
406406
/* Virtual encoders don't have this function */
407407
if (!stream_enc->funcs->get_fifo_cal_average_level)

0 commit comments

Comments
 (0)