From patchwork Mon Apr 17 21:05:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 84466 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2405532vqo; Mon, 17 Apr 2023 14:13:32 -0700 (PDT) X-Google-Smtp-Source: AKy350abumrB0dhJf6cZgGi+TTLNvtNEKp8En8RYOb1jeCUdcMVDfzvx59Krt3ZE9U1VcUDgPEct X-Received: by 2002:a05:6a00:1306:b0:63b:435f:134a with SMTP id j6-20020a056a00130600b0063b435f134amr20955047pfu.28.1681766012726; Mon, 17 Apr 2023 14:13:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681766012; cv=none; d=google.com; s=arc-20160816; b=kBAJwhPNy1VluVmiA5Cjj/ULFm4pjqBmddjzEwmJwFuap7I03Fx4B5F4JnKfR4ffAu EuK9iZrT6EYMcmL8moDYT2++QeA3vLwi7SlmStxLsm2+kZY1G5/2EHqAoTNH7PicrhEn INfwNDHm1JEkiKMCdiQXNP8zT/5/YOhKjvLgops6IC9c4aLQhDDctsLHEXfIs9hnvPBl faGsCD+zTrgKYlUgv8c2fJ2LoH4EUVtPw+wk1A1OzhCEN90x6Og3wo4/3Jc8WKNh0mKk MDN9bXPStK53J5d8KUrnX19LKuSRf8PpooSvRjYPkjpBTP/xEWOFE4K37Sv3Nu8wt7Hp RFOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=TKIfboM6WwJ5es36W1Xt9qQwmeBfCYXEfd7dvIo57ek=; b=qRSs7Sr7hCc55l7/KbkQ4ryNd6tM/ESvzVm52kut3B+RIFcK/bIb9I2MRFM0tQxLgp o8+X+enlYHNPloTnQgEj1yrzlzLzPukAVIW7D6EwEVAoyYJsE6U1rtV/JjuKPhQ5lDj2 itVFSULc0e0SMCDwCSSE9kzK0MXzULGKT/zJ7gp1c+dYWqQ9AyVl6Ez9uC48XhYOfEGe NWWHov7KKOT3XO+Gecx5VbeQcL7/m+s6uNzrOzO8pzlh/Epo0DPCt/Gauo1iobmvvkjm zz6z3Vum4qcC7CXhYJmYOxk3dQe+bEg6C4MU7iYJM4TRY73I3rJWrIYHwu/2Uv4WceuX g1QQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iaAe7VTN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t22-20020aa79476000000b0063b8e26e438si4036053pfq.97.2023.04.17.14.13.19; Mon, 17 Apr 2023 14:13:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iaAe7VTN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230146AbjDQVHK (ORCPT + 99 others); Mon, 17 Apr 2023 17:07:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230064AbjDQVHB (ORCPT ); Mon, 17 Apr 2023 17:07:01 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 025D9D2 for ; Mon, 17 Apr 2023 14:06:59 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9461B62A2E for ; Mon, 17 Apr 2023 21:06:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71DDFC4339C; Mon, 17 Apr 2023 21:06:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681765619; bh=bHRwsDaRRSk7HISz3NKNW1I5ChIQDDNVzcgEjzA2/xU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iaAe7VTNxZV5DOVrkbqD09VOv2a+wSaEaP6/Sacmck5wV6Xnmg8116TJwxIZ1VKmO agY/ZoxM1bKzX10vC+dTtis0OtvubRLyOewF7liRah+NTgp0ydv5hA0twy267VVLrM EH3ANysYrM0SORcyBcJ63Z6Mal/i2vgUNL/Z79ueoKl9ZgPbPFIyn6zXQStIoIpHlh ag8JXjQ123HbmIeUBE9b+qp3WizAQG2+yFEy4mYVvgULJ4jH9tFbVE6eV+7uASwipe +baOJymoze8c1egtXn/TcXZykHqgpK8iDOgRO3SrtewX32EfYaYIa+4l2Uv3vrX9EH Xa0vH6JR9TXGQ== From: Arnd Bergmann To: Harry Wentland , Leo Li , Rodrigo Siqueira , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter Cc: Arnd Bergmann , Lyude Paul , Wayne Lin , hersen wu , Fangzhi Zuo , Hamza Mahfooz , Aurabindo Pillai , Alan Liu , Wenjing Liu , Jun Lei , Alex Hung , Aric Cyr , Qingqing Zhuo , Alvin Lee , Roman Li , Jasdeep Dhillon , Wesley Chalmers , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] drm/amd/display: fix missing=prototypes warnings Date: Mon, 17 Apr 2023 23:05:43 +0200 Message-Id: <20230417210602.2614198-2-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230417210602.2614198-1-arnd@kernel.org> References: <20230417210602.2614198-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763459478549647347?= X-GMAIL-MSGID: =?utf-8?q?1763459478549647347?= From: Arnd Bergmann 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] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_mst_types.c:210:6: error: no previous prototype for 'is_synaptics_cascaded_panamera' [-Werror=missing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_optc.c:294:6: error: no previous prototype for 'optc3_wait_drr_doublebuffer_pending_clear' [-Werror=missing-prototypes] is_timing_changed() is actually meant to be a global symbol, but needs a proper name and prototype, while the other two can just be made static. Fixes: 54c7b715b5ef ("drm/amd/display: Add DSC Support for Synaptics Cascaded MST Hub") Fixes: 17ce8a6907f7 ("drm/amd/display: Add dsc pre-validation in atomic check") Fixes: 8f0d304d21b3 ("drm/amd/display: Do not commit pipe when updating DRR") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 5 ++--- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 6 +++--- drivers/gpu/drm/amd/display/dc/dc.h | 3 +++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c index 994ba426ca66..442511061178 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c @@ -45,8 +45,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, @@ -1417,7 +1416,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); diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c index 85d54bfb595c..344533623cb9 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c @@ -1855,7 +1855,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) @@ -1880,7 +1880,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) @@ -3505,7 +3505,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) diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 23ee63b98dcd..e7ab6cb3769b 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h @@ -2225,4 +2225,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_ */