]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amd/display: fix is_timing_changed() prototype
authorArnd Bergmann <arnd@arndb.de>
Mon, 17 Apr 2023 22:07:18 +0000 (00:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Jul 2023 17:39:32 +0000 (19:39 +0200)
[ Upstream commit 3306ba4b60b2f3d9ac6bddc587a4d702e1ba2224 ]

Three functions in the amdgpu display driver cause -Wmissing-prototype
warnings:

drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_resource.c:1858:6: error: no previous prototype for 'is_timing_changed' [-Werror=missing-prototypes]

is_timing_changed() is actually meant to be a global symbol, but needs
a proper name and prototype.

Fixes: 17ce8a6907f7 ("drm/amd/display: Add dsc pre-validation in atomic check")
Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
drivers/gpu/drm/amd/display/dc/core/dc_resource.c
drivers/gpu/drm/amd/display/dc/dc.h

index 3da519957f6c8f59eb4c03c7847dce574a2aa13d..0096614f2a8be1c02c452204037dcd534cbfba29 100644 (file)
@@ -48,8 +48,7 @@
 #endif
 
 #include "dc/dcn20/dcn20_resource.h"
-bool is_timing_changed(struct dc_stream_state *cur_stream,
-                      struct dc_stream_state *new_stream);
+
 #define PEAK_FACTOR_X1000 1006
 
 static ssize_t dm_dp_aux_transfer(struct drm_dp_aux *aux,
@@ -1426,7 +1425,7 @@ int pre_validate_dsc(struct drm_atomic_state *state,
                struct dc_stream_state *stream = dm_state->context->streams[i];
 
                if (local_dc_state->streams[i] &&
-                   is_timing_changed(stream, local_dc_state->streams[i])) {
+                   dc_is_timing_changed(stream, local_dc_state->streams[i])) {
                        DRM_INFO_ONCE("crtc[%d] needs mode_changed\n", i);
                } else {
                        int ind = find_crtc_index_in_state_by_stream(state, stream);
index 986de684b078e07cc16d151f40e27e4d406f2a72..7b0fd0dc31b34b120ff7851c0ae44dcc2074fb0b 100644 (file)
@@ -1878,7 +1878,7 @@ bool dc_add_all_planes_for_stream(
        return add_all_planes_for_stream(dc, stream, &set, 1, context);
 }
 
-bool is_timing_changed(struct dc_stream_state *cur_stream,
+bool dc_is_timing_changed(struct dc_stream_state *cur_stream,
                       struct dc_stream_state *new_stream)
 {
        if (cur_stream == NULL)
@@ -1903,7 +1903,7 @@ static bool are_stream_backends_same(
        if (stream_a == NULL || stream_b == NULL)
                return false;
 
-       if (is_timing_changed(stream_a, stream_b))
+       if (dc_is_timing_changed(stream_a, stream_b))
                return false;
 
        if (stream_a->signal != stream_b->signal)
@@ -3527,7 +3527,7 @@ bool pipe_need_reprogram(
        if (pipe_ctx_old->stream_res.stream_enc != pipe_ctx->stream_res.stream_enc)
                return true;
 
-       if (is_timing_changed(pipe_ctx_old->stream, pipe_ctx->stream))
+       if (dc_is_timing_changed(pipe_ctx_old->stream, pipe_ctx->stream))
                return true;
 
        if (pipe_ctx_old->stream->dpms_off != pipe_ctx->stream->dpms_off)
index 3fb868f2f6f5be2c9859c4349e5f73ad42cdb4b7..9307442dc22583a8799c4946a204e4ebafbe436e 100644 (file)
@@ -2223,4 +2223,7 @@ void dc_process_dmub_dpia_hpd_int_enable(const struct dc *dc,
 /* Disable acc mode Interfaces */
 void dc_disable_accelerated_mode(struct dc *dc);
 
+bool dc_is_timing_changed(struct dc_stream_state *cur_stream,
+                      struct dc_stream_state *new_stream);
+
 #endif /* DC_INTERFACE_H_ */