From patchwork Thu Apr 20 08:47:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13218153 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C1A80C77B78 for ; Thu, 20 Apr 2023 08:47:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3ABC010EBE8; Thu, 20 Apr 2023 08:47:22 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id C7A2310EBE5; Thu, 20 Apr 2023 08:47:19 +0000 (UTC) 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 E5DD8645FA; Thu, 20 Apr 2023 08:47:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF976C433D2; Thu, 20 Apr 2023 08:47:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681980437; bh=uADxxtxxbjR1ZmBmGvPD7EU2EEluZLYB+5f1TqvzOxs=; h=From:To:Cc:Subject:Date:From; b=ViTEOfcPaOYEWW6eyaRDKjG09tmHwSLtnm4Cljj4u20xjKIKZpyXkQO27yc4pIrI4 tOSLhFA6R+2a7n9TDWtFgvtYuKFKX/PtfWkyV4+FspVRe5iNDXFqaWVE3arjpFO5Qh ETNPK3v2QOh3+Q4rCoxgk3HvJhYsMaHrTo5VhjN/3DPrQu+BTPbIabLzE2/55ssA8z q84IQU5rq3vBlW2TVlxKi/ax0nrc2ZkU7Izm8MPS4XxQ6PHfbyMxymCAGJ32e05yf8 1nxyYUou7XEYImRNo0SltMmngP+iGObZ+r2F6zA7UKmJ8nf9922LaTkpdtsPJwvFcP GK7HNXCZEtHFA== From: Arnd Bergmann To: Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Hawking Zhang , Le Ma Subject: [PATCH 1/3] drm/amdgpu: mark gfx_v9_4_3_disable_gpa_mode() static Date: Thu, 20 Apr 2023 10:47:00 +0200 Message-Id: <20230420084711.3063453-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, Morris Zhang , Arnd Bergmann , linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann This was left global by accident, the corresponding functions for other hardware types are already static: drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c:1072:6: error: no previous prototype for function 'gfx_v9_4_3_disable_gpa_mode' [-Werror,-Wmissing-prototypes] Fixes: 86301129698b ("drm/amdgpu: split gc v9_4_3 functionality from gc v9_0") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c index baa10ee8ec69..5d3aafba1f8e 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c @@ -1069,7 +1069,7 @@ static void gfx_v9_4_3_init_pg(struct amdgpu_device *adev, int xcc_id) } } -void gfx_v9_4_3_disable_gpa_mode(struct amdgpu_device *adev, int xcc_id) +static void gfx_v9_4_3_disable_gpa_mode(struct amdgpu_device *adev, int xcc_id) { uint32_t data; From patchwork Thu Apr 20 08:47:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13218154 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5ACB7C77B78 for ; Thu, 20 Apr 2023 08:47:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BD4C410EBF0; Thu, 20 Apr 2023 08:47:30 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id B505010EBEB; Thu, 20 Apr 2023 08:47:28 +0000 (UTC) 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 2D438640BF; Thu, 20 Apr 2023 08:47:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C66E2C4339B; Thu, 20 Apr 2023 08:47:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681980447; bh=DRojeqZ6g7yN6t36jsupuApN+Q0hs/GcJWlfxdY0DDU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U11jKWaGEjQE9fOFfDUs9GL7124gee3tlhiJ5VeXh/e+bqYrXHcI/E4meNXBWHS0+ SZWdushTPXykNbM1pQnO+3qOgysmf58dXEZkP0w86vUp6mOhRSuJK1wQ0rafOsdXv3 BeaoxsvR7R3+OSxZ7B9TH6arTlX4EOGmKyT2bauk80BHUJXanto8Yc8OMTsDnKJRIG Rxg+PWICvKL0HAtZhiMSIOWd3KLpN8kE3v+SH81orgaYKDxa5MpESmWOZnDxPFussj D4+xN3eY2reqzScCnPQhTjoSUlzfyrBHo7+EGRDBJmeVuAYPpz10aETTIq8oud+LNh azPEF3Rx4d4ug== 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 , Leon Huang Subject: [PATCH 2/3] drm/amd/display: dumb_abm_lcd: avoid missing-prototype warnings Date: Thu, 20 Apr 2023 10:47:01 +0200 Message-Id: <20230420084711.3063453-2-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230420084711.3063453-1-arnd@kernel.org> References: <20230420084711.3063453-1-arnd@kernel.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Qingqing Zhuo , Wenjing Liu , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Jun Lei , Josip Pavic , Nicholas Kazlauskas Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann The dmub_abm_set_ambient_level() function has no caller and can just be removed, the other ones have a declaration in the header file and just need to see the prototype: drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_abm_lcd.c:122:14: error: no previous prototype for function 'dmub_abm_get_current_backlight' [-Werror,-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_abm_lcd.c:133:14: error: no previous prototype for function 'dmub_abm_get_target_backlight' [-Werror,-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_abm_lcd.c:144:6: error: no previous prototype for function 'dmub_abm_set_level' [-Werror,-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_abm_lcd.c:163:6: error: no previous prototype for function 'dmub_abm_set_ambient_level' [-Werror,-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_abm_lcd.c:183:6: error: no previous prototype for function 'dmub_abm_init_config' [-Werror,-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_abm_lcd.c:213:6: error: no previous prototype for function 'dmub_abm_set_pause' [-Werror,-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_abm_lcd.c:231:6: error: no previous prototype for function 'dmub_abm_set_pipe' [-Werror,-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_abm_lcd.c:251:6: error: no previous prototype for function 'dmub_abm_set_backlight_level' [-Werror,-Wmissing-prototypes] Fixes: b8fe56375f78 ("drm/amd/display: Refactor ABM feature") Signed-off-by: Arnd Bergmann --- .../gpu/drm/amd/display/dc/dce/dmub_abm_lcd.c | 22 +------------------ 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dce/dmub_abm_lcd.c b/drivers/gpu/drm/amd/display/dc/dce/dmub_abm_lcd.c index e152c68edfd1..39da73eba86e 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dmub_abm_lcd.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dmub_abm_lcd.c @@ -24,6 +24,7 @@ */ #include "dmub_abm.h" +#include "dmub_abm_lcd.h" #include "dce_abm.h" #include "dc.h" #include "dc_dmub_srv.h" @@ -159,27 +160,6 @@ bool dmub_abm_set_level(struct abm *abm, uint32_t level, uint8_t panel_mask) return true; } -#ifndef TRIM_AMBIENT_GAMMA -void dmub_abm_set_ambient_level(struct abm *abm, unsigned int ambient_lux, uint8_t panel_mask) -{ - union dmub_rb_cmd cmd; - struct dc_context *dc = abm->ctx; - - if (ambient_lux > 0xFFFF) - ambient_lux = 0xFFFF; - - memset(&cmd, 0, sizeof(cmd)); - cmd.abm_set_ambient_level.header.type = DMUB_CMD__ABM; - cmd.abm_set_ambient_level.header.sub_type = DMUB_CMD__ABM_SET_AMBIENT_LEVEL; - cmd.abm_set_ambient_level.abm_set_ambient_level_data.ambient_lux = ambient_lux; - cmd.abm_set_ambient_level.abm_set_ambient_level_data.version = DMUB_CMD_ABM_CONTROL_VERSION_1; - cmd.abm_set_ambient_level.abm_set_ambient_level_data.panel_mask = panel_mask; - cmd.abm_set_ambient_level.header.payload_bytes = sizeof(struct dmub_cmd_abm_set_ambient_level_data); - - dm_execute_dmub_cmd(dc, &cmd, DM_DMUB_WAIT_TYPE_WAIT); -} -#endif - void dmub_abm_init_config(struct abm *abm, const char *src, unsigned int bytes, From patchwork Thu Apr 20 08:47:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13218155 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6426EC77B72 for ; Thu, 20 Apr 2023 08:47:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9FBC110EBF6; Thu, 20 Apr 2023 08:47:47 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1408510EBF4; Thu, 20 Apr 2023 08:47:45 +0000 (UTC) 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 972E3615F8; Thu, 20 Apr 2023 08:47:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C66EBC433D2; Thu, 20 Apr 2023 08:47:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681980464; bh=kKXjO3ninqXIeQWB3eu4IcT9qlvhS73M2v92M/DhaYo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P8hUmpyBvEpn1bAMEJqiJ2hz5yLrxb0Rzw+7oB16SXGLEhk2JWmXprLGbgmPrBQSu c6P4kKlqouNjAnEvtuL/S3PsMIINvdjMFLL41sNToG6p2+ciDEW0im0ZJv09IrdXq1 vGx1/9ihXL6eYhArihJSmV/xHs59wZSBoVnw7I3Ax1Ywhffxh0idl6sMTxU6JUpYeX 1W8BTJhKyA8lSJBIhHEsK2WDaIcnQ7QwX3x7HokfpL1r4UA3zuAJ4zoXYexlKx5iqB lkcl9/t1dA2PCkn2d3ENv9CambLwfjJg08CaPYQwCP6V03oFrjcOIMGBRcri0ZxeSv aRcOc0ehtjXLg== 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 , Leon Huang Subject: [PATCH 3/3] drm/amd/display: remove unused variables in dcn21_set_backlight_level Date: Thu, 20 Apr 2023 10:47:02 +0200 Message-Id: <20230420084711.3063453-3-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230420084711.3063453-1-arnd@kernel.org> References: <20230420084711.3063453-1-arnd@kernel.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Qingqing Zhuo , Wenjing Liu , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann The only references to these variables were removed, so they now cause warnings and have to be removed as well: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_hwseq.c:226:20: error: unused variable 'cmd' [-Werror,-Wunused-variable] drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_hwseq.c:229:11: error: unused variable 'otg_inst' [-Werror,-Wunused-variable] Fixes: 6f0ef80a00ad ("drm/amd/display: Fix ABM pipe/backlight issues when change backlight") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hwseq.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hwseq.c index 55a464a39529..43463d08f21b 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hwseq.c +++ b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hwseq.c @@ -223,10 +223,8 @@ bool dcn21_set_backlight_level(struct pipe_ctx *pipe_ctx, uint32_t backlight_pwm_u16_16, uint32_t frame_ramp) { - union dmub_rb_cmd cmd; struct dc_context *dc = pipe_ctx->stream->ctx; struct abm *abm = pipe_ctx->stream_res.abm; - uint32_t otg_inst = pipe_ctx->stream_res.tg->inst; struct panel_cntl *panel_cntl = pipe_ctx->stream->link->panel_cntl; if (dc->dc->res_pool->dmcu) {