From patchwork Mon Apr 17 21:05:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 84477 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2415081vqo; Mon, 17 Apr 2023 14:34:41 -0700 (PDT) X-Google-Smtp-Source: AKy350aJctBM5LvshWFgXirn6308dApfpA6gpeeQ34TXfHKl/c25I4ntUHOnNAFMQsS50D3hIsP0 X-Received: by 2002:a05:6a00:2314:b0:63a:75a4:b2d4 with SMTP id h20-20020a056a00231400b0063a75a4b2d4mr24029114pfh.24.1681767281594; Mon, 17 Apr 2023 14:34:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681767281; cv=none; d=google.com; s=arc-20160816; b=V1x6EBxgfe2AYdEiGCUyFhV1p6FQI4yPPHZGQC4g20dSjGS8thlgo96WE++ccLD1eS 7t76+SZx5JotXWkZb/uvLtpH/j8SGmDYX44rRy3zrK4GFeyfwWAVnvWz1rC5Sy/8e9Q6 +Q0l7Sb0BTgLttoDhwtdSyNF7kD5yD7CVe+lqsRoXhBVFrauDZPXFm2kt3HD4EUlpnwb UnSVWScsVnOH/zkWk87k9iUgt1hQVp7YOnGFPo51b288khyIeiUQFRIkqIQoOzc3pGK0 Uif3anCHGie2oO7J/Ra26Dhv3YmotFAuBKBrzH7wjNTSL7wnyfuj71rFe4EYvq1+QU9n UKyw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=nSoRpplB1VkwkudhlviS89ej8RbAcJ/NtFXeDV+ZjdQ=; b=dg5mCgFYB98fksclofv96aS+WBgEs1rk1XT2vyB0ZJrzliS28o6hn27+zmUJ3x6ACX pwT0DnGTHI2wNS20Lpof4cTviUmxyW5ar9ke8X4W4BWEF7u2xHDvPzvlOxb2HEqEAM31 EGm1Wf4ETCfauBWP/e2mtRKs5plI+gzNkdYLY07cSVBgzZknelJUL3cX/o566s9cmk2X b3s3xd16qCz3JJEf/Juqy1pfwkDdVkkUcCGJBO6QPDY18VMMHzF3bXZxvCS0ks/4KjQU BxtTOENqBZpZUHosZ1fKIcRiXqwv6d0eHpTpteQLR3eQJP/+SPUjCGVFmUVAi3kGDosY 8jxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Lmi7RyLY; 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 z28-20020aa7959c000000b0063b85b18764si6159707pfj.219.2023.04.17.14.34.26; Mon, 17 Apr 2023 14:34:41 -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=Lmi7RyLY; 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 S230012AbjDQVGh (ORCPT + 99 others); Mon, 17 Apr 2023 17:06:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230127AbjDQVGM (ORCPT ); Mon, 17 Apr 2023 17:06:12 -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 E9D2810F4 for ; Mon, 17 Apr 2023 14:06:10 -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 697C762203 for ; Mon, 17 Apr 2023 21:06:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BDCABC433D2; Mon, 17 Apr 2023 21:06:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681765569; bh=An4/qvBICNxrZq3RM6ajIvQGCH7WWPRxMuUGkIjf4xE=; h=From:To:Cc:Subject:Date:From; b=Lmi7RyLY/b4hnJV6EwWzVz51lWwZ/+MRxXeXhB63HP882GQTBywrF8b0NFVjr6yG2 0pUXOTbNvsU1e8AP+VcRhoKdRYO/qLc9BsxidmVqMWfok+yNzK9qH15uJCgTLKvsJe uGgIYz/wLd/a4PlEPGmeZ5yrHRHfwSW5mfl+z5YMAC1tjuXwcVFebz1wa0Y8Z9mLi8 2+VH22T2QOU629Drfn5WvW6nW4b0TlCxMs+Sm1CAdjn5dGhJWCHWGTPm59QexCljS2 wXQpmbjXLy9wBm/qRR9eAzKAC6iWy/MQQ+6PRZKTlvEdl2KRgg2Y/UwpGbhyoY/91G 3WmsHLn94Qe2Q== 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 , Nicholas Kazlauskas , Taimur Hassan , Jasdeep Dhillon , Alex Hung , Michael Strauss , Aurabindo Pillai , Qingqing Zhuo , Hamza Mahfooz , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] drm/amd/display: mark dccg314_init() static Date: Mon, 17 Apr 2023 23:05:42 +0200 Message-Id: <20230417210602.2614198-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 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?1763460809010119719?= X-GMAIL-MSGID: =?utf-8?q?1763460809010119719?= From: Arnd Bergmann The newly introduced global function is not declared in a header or called from another file, causing a harmless warning with sparse or W=1 builds: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn314/dcn314_dccg.c:277:6: error: no previous prototype for 'dccg314_init' [-Werror=missing-prototypes] Mark it static instead. Fixes: 6f6869dcf415 ("drm/amd/display: prep work for root clock optimization enablement for DCN314") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c b/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c index 6f879265ad9c..de7bfba2c179 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c +++ b/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c @@ -274,7 +274,7 @@ static void dccg314_set_dpstreamclk( } } -void dccg314_init(struct dccg *dccg) +static void dccg314_init(struct dccg *dccg) { int otg_inst; 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_ */