Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/display: Separate set_gsl from set_gsl_source_select

[Why/How]
Separate the checks for set_gsl and set_gsl_source_select, since
source_select may not be implemented/necessary.

Reviewed-by: Nevenko Stupar <nevenko.stupar@amd.com>
Signed-off-by: Ilya Bakoulin <Ilya.Bakoulin@amd.com>
Signed-off-by: Ray Wu <ray.wu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Ilya Bakoulin and committed by
Alex Deucher
660a467a 86fa0b98

+4 -5
+4 -5
drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c
··· 283 283 } 284 284 285 285 /* at this point we want to program whether it's to enable or disable */ 286 - if (pipe_ctx->stream_res.tg->funcs->set_gsl != NULL && 287 - pipe_ctx->stream_res.tg->funcs->set_gsl_source_select != NULL) { 286 + if (pipe_ctx->stream_res.tg->funcs->set_gsl != NULL) { 288 287 pipe_ctx->stream_res.tg->funcs->set_gsl( 289 288 pipe_ctx->stream_res.tg, 290 289 &gsl); 291 - 292 - pipe_ctx->stream_res.tg->funcs->set_gsl_source_select( 293 - pipe_ctx->stream_res.tg, group_idx, enable ? 4 : 0); 290 + if (pipe_ctx->stream_res.tg->funcs->set_gsl_source_select != NULL) 291 + pipe_ctx->stream_res.tg->funcs->set_gsl_source_select( 292 + pipe_ctx->stream_res.tg, group_idx, enable ? 4 : 0); 294 293 } else 295 294 BREAK_TO_DEBUGGER(); 296 295 }