Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp4527838rwe; Mon, 17 Apr 2023 14:13:33 -0700 (PDT) X-Google-Smtp-Source: AKy350b/V0R+Z2TbCgUmz2EILhHJUN0mfZvjasl/pVC3M/QWi/Rtc6iKEPcaZwNDmCAYPJ2mF3Sv X-Received: by 2002:a05:6a20:144a:b0:ef:c4f6:912f with SMTP id a10-20020a056a20144a00b000efc4f6912fmr5620185pzi.43.1681766013209; Mon, 17 Apr 2023 14:13:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681766013; cv=none; d=google.com; s=arc-20160816; b=XpkpPCVguXHIC/H3BLWQz9NhJZiM4sy+lwU9M6p0pv/Cqcdni6S/A2SgJaNb/ih9LO 52jM5kto9ntS6SsQGiO4rHrr221y0C+dnMo+ouWO4NDZxqyAnwYoHG+Nd1sSDwiaAx5h bO2g4fmW7n8NhzgXTkyjEPpzxgXmahqBCCIP+uFGdW40vAke9NRsnqDPEDbx503WF6oX umDz1cvlBavOVysvfcKLLrVMTQ6tdO2ioppT/8iZy/Fnb3O6UlGIY0kogd3duYx7aHQe X1HNweVJK5ER5daq61Jo4KSA2WdAmt8ju0TO8hhBjdqkhpCcjhmD78JNXo8ApwcjDl3f P2hg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l69-20020a638848000000b00513901edaabsi12241554pgd.631.2023.04.17.14.13.19; Mon, 17 Apr 2023 14:13:33 -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 S230137AbjDQVHK (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=20K=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 Content-Transfer-Encoding: 8bit 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 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_ */ -- 2.39.2