]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amd/display: Separate set_gsl from set_gsl_source_select
authorIlya Bakoulin <Ilya.Bakoulin@amd.com>
Wed, 18 Jun 2025 17:07:14 +0000 (13:07 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 30 Jun 2025 15:58:55 +0000 (11:58 -0400)
[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>
drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c

index 7f9b6c4bf889ee9e25aa53aa4fce40e0ba36c640..3207addbd4ebb3ce2640ebbec02b27a74c7f21da 100644 (file)
@@ -283,14 +283,13 @@ void dcn20_setup_gsl_group_as_lock(
        }
 
        /* at this point we want to program whether it's to enable or disable */
-       if (pipe_ctx->stream_res.tg->funcs->set_gsl != NULL &&
-               pipe_ctx->stream_res.tg->funcs->set_gsl_source_select != NULL) {
+       if (pipe_ctx->stream_res.tg->funcs->set_gsl != NULL) {
                pipe_ctx->stream_res.tg->funcs->set_gsl(
                        pipe_ctx->stream_res.tg,
                        &gsl);
-
-               pipe_ctx->stream_res.tg->funcs->set_gsl_source_select(
-                       pipe_ctx->stream_res.tg, group_idx,     enable ? 4 : 0);
+               if (pipe_ctx->stream_res.tg->funcs->set_gsl_source_select != NULL)
+                       pipe_ctx->stream_res.tg->funcs->set_gsl_source_select(
+                               pipe_ctx->stream_res.tg, group_idx, enable ? 4 : 0);
        } else
                BREAK_TO_DEBUGGER();
 }