[PATCH] drm/amd/display: Increase frame-larger-than for all display_mode_vba files

2024-02-05 Thread Nathan Chancellor
es: https://github.com/ClangBuiltLinux/linux/issue/1990 Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/display/dc/dml/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dml/Makefile b/drivers/gpu/drm/amd/display/dc/dml/Make

Please apply commit 5b750b22530fe53bf7fd6a30baacd53ada26911b to linux-6.1.y

2024-02-27 Thread Nathan Chancellor
Hi Greg and Sasha, Please apply upstream commit 5b750b22530f ("drm/amd/display: Increase frame warning limit with KASAN or KCSAN in dml") to linux-6.1.y, as it is needed to avoid instances of -Wframe-larger-than in allmodconfig, which has -Werror enabled. It applies cleanly for me and it is alread

Re: [PATCH] drm/amd/display: Increase frame-larger-than warning limit

2024-06-13 Thread Nathan Chancellor
Hi Palmer (and AMD folks), On Tue, Jun 04, 2024 at 09:04:23AM -0700, Palmer Dabbelt wrote: > On Mon, 03 Jun 2024 15:29:48 PDT (-0700), nat...@kernel.org wrote: > > On Thu, May 30, 2024 at 07:57:42AM -0700, Palmer Dabbelt wrote: > > > From: Palmer Dabbelt > > > > > > I get a handful of build erro

[PATCH] drm/amd/display: Disable CONFIG_DRM_AMD_DC_FP for RISC-V with clang

2024-06-14 Thread Nathan Chancellor
ake the condition a little more readable naturally. Fixes: a28e4b672f04 ("drm/amd/display: use ARCH_HAS_KERNEL_FPU_SUPPORT") Reported-by: Palmer Dabbelt Closes: https://lore.kernel.org/20240530145741.7506-2-pal...@rivosinc.com/ Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/d

[PATCH] drm/amd/display: Reapply 2fde4fdddc1f

2024-07-24 Thread Nathan Chancellor
CALE_FACTOR * (vco_freq_khz / clock_khz)); | ~~ ^ ~~ 1 error generated. Apply the fix again to resolve the warning. Fixes: 2563391e57b5 ("drm/amd/display: DML2.1 resynchronization") Signed-off-b

[PATCH] drm/amd/display: Avoid -Wenum-float-conversion in add_margin_and_round_to_dfs_grainularity()

2024-04-24 Thread Nathan Chancellor
lear to the compiler. Fixes: 3df48ddedee4 ("drm/amd/display: Add new DCN401 sources") Signed-off-by: Nathan Chancellor --- Alternatively, perhaps the potential truncation could happen before the multiplication? divider = DFS_DIVIDER_RANGE_SCALE_FACTOR * (unsigned int)(vco_freq_khz / clo

[PATCH 0/2] drm/amd/display: Use frame_warn_flag consistently in dml2 Makefile

2024-04-24 Thread Nathan Chancellor
Hi all, This series resolves a couple instances of -Wframe-larger-than from the new display code that appear with newer versions of clang along without another inconsistency I noticed while fixing this, which have been accounted for with the $(frame_warn_flag) variable. --- Nathan Chancellor (2

[PATCH 1/2] drm/amd/display: Add frame_warn_flag to dml2_core_shared.o

2024-04-24 Thread Nathan Chancellor
drm/amd/display: Add misc DC changes for DCN401") Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/display/dc/dml2/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dml2/Makefile b/drivers/gpu/drm/amd/display/dc/dml2/Makefile

[PATCH 2/2] drm/amd/display: Fix CFLAGS for dml2_core_dcn4_calcs.o

2024-04-24 Thread Nathan Chancellor
: d546a39c6b10 ("drm/amd/display: Add misc DC changes for DCN401") Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/display/dc/dml2/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dml2/Makefile b/drivers/gpu/drm/amd/displ

[PATCH] drm/radeon: Remove __counted_by from StateArray.states[]

2024-05-29 Thread Nathan Chancellor
e to support this in future compiler releases. Cc: sta...@vger.kernel.org Closes: https://github.com/ClangBuiltLinux/linux/issues/2028 Fixes: efade6fe50e7 ("drm/radeon: silence UBSAN warning (v3)") Signed-off-by: Bill Wendling Co-developed-by: Nathan Chancellor Signed-off-by: Nathan Chan

Re: [PATCH] drm/amd/display: Increase frame-larger-than warning limit

2024-06-03 Thread Nathan Chancellor
Hi Palmer, On Thu, May 30, 2024 at 07:57:42AM -0700, Palmer Dabbelt wrote: > From: Palmer Dabbelt > > I get a handful of build errors along the lines of > > > linux/drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_32.c:58:13: > error: stack frame size (2352) exceeds lim

Re: [PATCH 3/3] drm/amd/display: Support DRM_AMD_DC_FP on RISC-V

2023-11-29 Thread Nathan Chancellor
On Thu, Nov 23, 2023 at 02:23:01PM +, Conor Dooley wrote: > On Tue, Nov 21, 2023 at 07:05:15PM -0800, Samuel Holland wrote: > > RISC-V uses kernel_fpu_begin()/kernel_fpu_end() like several other > > architectures. Enabling hardware FP requires overriding the ISA string > > for the relevant comp

[PATCH 0/3] Update LLVM Phabricator and Bugzilla links

2024-01-09 Thread Nathan Chancellor
al (famous last words...). --- Nathan Chancellor (3): selftests/bpf: Update LLVM Phabricator links arch and include: Update LLVM Phabricator links treewide: Update LLVM Bugzilla links arch/arm64/Kconfig | 4 +-- arch/powerp

[PATCH 1/3] selftests/bpf: Update LLVM Phabricator links

2024-01-09 Thread Nathan Chancellor
ation. Additionally, fix a typo in the xdpwall.c print ("LLMV" -> "LLVM") while in the area. Link: https://discourse.llvm.org/t/update-on-github-pull-requests/71540/172 Signed-off-by: Nathan Chancellor --- Cc: a...@kernel.org Cc: dan...@iogearbox.net Cc: and...@kernel.

[PATCH 2/3] arch and include: Update LLVM Phabricator links

2024-01-09 Thread Nathan Chancellor
Link: https://discourse.llvm.org/t/update-on-github-pull-requests/71540/172 Signed-off-by: Nathan Chancellor --- arch/arm64/Kconfig | 4 ++-- arch/riscv/Kconfig | 2 +- arch/riscv/include/asm/ftrace.h | 2 +- include/linux/compiler-clang.h | 2 +- 4 files changed, 5 inser

[PATCH 3/3] treewide: Update LLVM Bugzilla links

2024-01-09 Thread Nathan Chancellor
gs.llvm.org/show_bug.cgi?id=" links to the "https://llvm.org/pr" shortlink so that the links show the most up to date information. Each migrated issue links back to the Bugzilla entry, so there should be no loss of fidelity of information here. Signed-off-by: Nathan Chancellor

[PATCH] drm/amd/display: Avoid enum conversion warning

2024-01-10 Thread Nathan Chancellor
Request usb4 bw for mst streams") Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.c b/drivers/gpu/drm/a

Re: [PATCH 1/3] selftests/bpf: Update LLVM Phabricator links

2024-01-11 Thread Nathan Chancellor
Hi Yonghong, On Wed, Jan 10, 2024 at 08:05:36PM -0800, Yonghong Song wrote: > > On 1/9/24 2:16 PM, Nathan Chancellor wrote: > > reviews.llvm.org was LLVM's Phabricator instances for code review. It > > has been abandoned in favor of GitHub pull requests. While the major

Re: [PATCH 1/3] selftests/bpf: Update LLVM Phabricator links

2024-01-11 Thread Nathan Chancellor
Hi Alexei, On Thu, Jan 11, 2024 at 12:00:50PM -0800, Alexei Starovoitov wrote: > On Thu, Jan 11, 2024 at 11:40 AM Nathan Chancellor wrote: > > > > Hi Yonghong, > > > > On Wed, Jan 10, 2024 at 08:05:36PM -0800, Yonghong Song wrote: > > > > > &g

[PATCH] drm/radeon: Add break to switch statement in radeonfb_create_pinned_object()

2021-08-15 Thread Nathan Chancellor
default: ^ break; 1 warning generated. Clang's version of this warning is a little bit more pedantic than GCC's. Add the missing break to satisfy it to match what has been done all over the kernel tree. Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/radeon/radeo

Re: [PATCH 0/4] Fix stack usage of DML

2021-09-09 Thread Nathan Chancellor
other warnings in amdgpu with clang in various configurations but this is a great start. Thank you for taking a look at them. For the series: Build-tested-by: Nathan Chancellor > .../gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 55 ++-- > .../drm/amd/display/dc/dcn20/dcn20_resource.c |

Re: [Intel-gfx] [PATCH v3 03/13] drm/dp: add LTTPR DP 2.0 DPCD addresses

2021-09-21 Thread Nathan Chancellor
On Thu, Sep 09, 2021 at 03:51:55PM +0300, Jani Nikula wrote: > DP 2.0 brings some new DPCD addresses for PHY repeaters. > > Cc: dri-de...@lists.freedesktop.org > Reviewed-by: Manasi Navare > Signed-off-by: Jani Nikula > --- > include/drm/drm_dp_helper.h | 4 > 1 file changed, 4 insertions(

[PATCH] drm/amd: Guard IS_OLD_GCC assignment with CONFIG_CC_IS_GCC

2021-09-30 Thread Nathan Chancellor
GCC 7.1+") for more context. Fixes: ff7e396f822f ("drm/amd/display: add cyan_skillfish display support") Link: https://github.com/ClangBuiltLinux/linux/issues/1468 Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/display/dc/dcn201/Makefile | 2 ++ 1 file changed, 2 inser

[PATCH] drm/amd: Initialize remove_mpcc in dcn201_update_mpcc()

2021-09-30 Thread Nathan Chancellor
eginning of the function so it is never used uninitialized. Fixes: ff7e396f822f ("drm/amd/display: add cyan_skillfish display support") Link: https://github.com/ClangBuiltLinux/linux/issues/1469 Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c | 2 +-

[PATCH] drm/amd: Return NULL instead of false in dcn201_acquire_idle_pipe_for_layer()

2021-09-30 Thread Nathan Chancellor
^ 1 error generated. Use NULL instead of false since the function is returning a pointer rather than a boolean. Fixes: ff7e396f822f ("drm/amd/display: add cyan_skillfish display support") Link: https://github.com/ClangBuiltLinux/linux/issues/1470 Signed-off-by: Nathan Chancellor

Re: [PATCH V3 4/7] drm/amd/pm: correct the usage for 'supported' member of smu_feature structure

2022-02-08 Thread Nathan Chancellor
Hi Evan, On Fri, Jan 28, 2022 at 03:04:52PM +0800, Evan Quan wrote: > The supported features should be retrieved just after EnableAllDpmFeatures > message > complete. And the check(whether some dpm feature is supported) is only needed > when we > decide to enable or disable it. > > Signed-off-b

Re: [PATCH] drm/amd/pm: fix enabled features retrieving on Renoir and Cyan Skillfish

2022-02-09 Thread Nathan Chancellor
7;supported' member of > smu_feature structure") > > Signed-off-by: Evan Quan > Change-Id: I1231f146405a229a11aa7ac608c8c932d3c90ee4 Tested-by: Nathan Chancellor > -- > v1->v2: > - add back the logic for supporting those ASICs which have > no

[PATCH] drm/amd/display: Simplify condition in try_disable_dsc

2020-09-22 Thread Nathan Chancellor
eason about the logic and prevents the warning. Fixes: 0749ddeb7d6c ("drm/amd/display: Add DSC force disable to dsc_clock_en debugfs entry") Link: https://github.com/ClangBuiltLinux/linux/issues/1158 Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_typ

Re: [PATCH 09/14] drm/amd/display: Add Freesync HDMI support to DM

2021-02-18 Thread Nathan Chancellor
On Thu, Feb 11, 2021 at 04:44:39PM -0500, Qingqing Zhuo wrote: > From: Stylon Wang > > [Why] > Add necessary support for Freesync HDMI in Linux DM > > [How] > - Support Freesync HDMI by calling DC interace > - Report Freesync capability to vrr_range debugfs from DRM > - Depends on coming DMCU/DM

[PATCH] drm/amd/pm/swsmu: Avoid using structure_size uninitialized in smu_cmn_init_soft_gpu_metrics

2021-02-18 Thread Nathan Chancellor
t16_t structure_size; ^ = 0 1 warning generated. Return in the default case, as the size of the header will not be known. Fixes: de4b7cd8cb87 ("drm/amd/pm/swsmu: unify the init soft gpu metrics function") Link: https://github.com/ClangBuiltLinux/linux/iss

Re: [PATCH] drm/amdgpu/display: initialize the variable 'i'

2021-02-22 Thread Nathan Chancellor
On Mon, Feb 22, 2021 at 11:05:17PM +, Simon Ser wrote: > On Monday, February 22nd, 2021 at 8:25 PM, Souptick Joarder > wrote: > > > >> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9804:38: > > >> warning: variable 'i' is uninitialized when used here > > >> [-Wuninitialized] >

Re: [PATCH] drm/amdgpu/display: initialize the variable 'i'

2021-02-22 Thread Nathan Chancellor
On Mon, Feb 22, 2021 at 11:50:06PM +, Simon Ser wrote: > On Tuesday, February 23rd, 2021 at 12:44 AM, Nathan Chancellor > wrote: > > > On Mon, Feb 22, 2021 at 11:05:17PM +, Simon Ser wrote: > > > On Monday, February 22nd, 2021 at 8:25 PM, Soupti

Re: [PATCH 4/4] drm/amdgpu: fold CONFIG_DRM_AMD_DC_DCN3* into CONFIG_DRM_AMD_DC_DCN

2020-10-29 Thread Nathan Chancellor
On Fri, Oct 16, 2020 at 12:50:04PM -0400, Alex Deucher wrote: > Avoids confusion in configurations. > > Signed-off-by: Alex Deucher This patch causes a build failure with Fedora's aarch64 config (at commit 2e3a5bc5feeab1ed21f0105f1440a2ff0aef62f9): $ git bisect log # bad: [3f267ec60b922eff2a5c9

Re: [PATCH 4/4] drm/amdgpu: fold CONFIG_DRM_AMD_DC_DCN3* into CONFIG_DRM_AMD_DC_DCN

2020-11-03 Thread Nathan Chancellor
On Mon, Nov 02, 2020 at 05:33:14PM -0500, Alex Deucher wrote: > On Thu, Oct 29, 2020 at 6:14 PM Nathan Chancellor > wrote: > > > > On Fri, Oct 16, 2020 at 12:50:04PM -0400, Alex Deucher wrote: > > > Avoids confusion in configurations. > > > > > > Si

Re: [PATCH 4/4] drm/amdgpu: fold CONFIG_DRM_AMD_DC_DCN3* into CONFIG_DRM_AMD_DC_DCN

2020-11-03 Thread Nathan Chancellor
On Tue, Nov 03, 2020 at 12:41:27PM -0500, Alex Deucher wrote: > On Mon, Nov 2, 2020 at 8:01 PM Nathan Chancellor > wrote: > > > > On Mon, Nov 02, 2020 at 05:33:14PM -0500, Alex Deucher wrote: > > > On Thu, Oct 29, 2020 at 6:14 PM Nathan Chancellor > > > w

Re: [PATCH 4/4] drm/amdgpu: fold CONFIG_DRM_AMD_DC_DCN3* into CONFIG_DRM_AMD_DC_DCN

2020-11-03 Thread Nathan Chancellor
On Tue, Nov 03, 2020 at 04:36:05PM -0500, Alex Deucher wrote: > On Tue, Nov 3, 2020 at 1:27 PM Nathan Chancellor > wrote: > > > > On Tue, Nov 03, 2020 at 12:41:27PM -0500, Alex Deucher wrote: > > > On Mon, Nov 2, 2020 at 8:01 PM Nathan Chancellor > > > wrote:

Re: [PATCH] drm/amdgpu/display: FP fixes for DCN3.x (v4)

2020-11-03 Thread Nathan Chancellor
-by: Harry Wentland (v1) > Reviewed-by: Nicholas Kazlauskas (v1) > Signed-off-by: Alex Deucher This resolves all the build issues I have seen with both GCC and LLVM on aarch64: Build-tested-by: Nathan Chancellor > --- > .../gpu/drm/amd/display/dc/clk_mgr/Makefile | 26 +++

Re: [PATCH 4/4] drm/amdgpu: fold CONFIG_DRM_AMD_DC_DCN3* into CONFIG_DRM_AMD_DC_DCN

2020-11-03 Thread Nathan Chancellor
On Tue, Nov 03, 2020 at 06:12:14PM -0500, Alex Deucher wrote: > Whoops, missed those last time. Ok, 4th time's the charm. > > Alex This one looks good to me, I replied with a tag on the main patch thread. Cheers, Nathan ___ amd-gfx mailing list amd-gf

[PATCH] drm/amd/display: Fix -Wuninitialized in dm_helpers_dp_mst_send_payload_allocation()

2023-09-13 Thread Nathan Chancellor
of this function so allocate old_payload on the stack and pass it by reference to dm_helpers_construct_old_payload(), resolving the warning. Closes: https://github.com/ClangBuiltLinux/linux/issues/1931 Fixes: 5aa1dfcdf0a4 ("drm/mst: Refactor the flow for payload allocation/removement") Si

Re: [PATCH 0/2] Reduce stack size for DML2

2023-10-17 Thread Nathan Chancellor
Hi Rodrigo, On Mon, Oct 16, 2023 at 08:19:16AM -0600, Rodrigo Siqueira wrote: > Stephen discovers a stack size issue when compiling the latest amdgpu > code with allmodconfig. This patchset addresses that issue by splitting > a large function into two smaller parts. > > Thanks > Siqueira > > Rod

Re: [PATCH 0/2] Reduce stack size for DML2

2023-10-17 Thread Nathan Chancellor
On Tue, Oct 17, 2023 at 11:45:42AM -0600, Rodrigo Siqueira Jordao wrote: > Hi Nathan, > (+Hamza) > > First of all, thanks a lot for your feedback. You can see my comments > inline. > > On 10/17/23 11:22, Nathan Chancellor wrote: > > Hi Rodrigo, > > > > O

[PATCH] drm/amd/display: Respect CONFIG_FRAME_WARN=0 in DML2

2023-10-18 Thread Nathan Chancellor
t;drm/amd/display: Respect CONFIG_FRAME_WARN=0 in dml Makefile") but for DML2. Fixes: 7966f319c66d ("drm/amd/display: Introduce DML2") Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/display/dc/dml2/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH] drm/amd/display: Increase frame warning limit for clang in dml2

2023-11-02 Thread Nathan Chancellor
ves, the limit increase can be restricted to older clang versions. Signed-off-by: Nathan Chancellor --- If there is another DRM pull before 6.7-rc1, it would be much appreciated if this could make that so that other trees are not potentially broken by this. If not, no worries, as it was my fau

Re: [PATCH] drm/amd/display: Increase frame warning limit for clang in dml2

2023-11-02 Thread Nathan Chancellor
On Thu, Nov 02, 2023 at 12:59:00PM -0400, Hamza Mahfooz wrote: > On 11/2/23 12:24, Nathan Chancellor wrote: > > When building ARCH=x86_64 allmodconfig with clang, which have sanitizers > > enabled, there is a warning about a large stack frame. > > > > > > driv

[PATCH v2] drm/amd/display: Increase frame warning limit with KASAN or KCSAN in dml2

2023-11-02 Thread Nathan Chancellor
ady set to zero when it is enabled, which is accounted for by the check for CONFIG_FRAME_WARN=0 in the dml2 Makefile. Signed-off-by: Nathan Chancellor --- If there is another DRM pull before 6.7-rc1, it would be much appreciated if this could make that so that other trees are not potentially broken

[PATCH 0/5] drm/amd/display: Reduce stack usage for clang

2022-08-30 Thread Nathan Chancellor
.0 (ToT) and GCC 12.2.0 for x86_64. It has seen no runtime testing, as my only test system with AMD graphics is a Renoir one, which as far as I understand it uses DCN 2.1. Nathan Chancellor (5): drm/amd/display: Reduce number of arguments of dml32_CalculateWatermarksMALLUseAndDRAMSpeedChangeSuppo

[PATCH 1/5] drm/amd/display: Reduce number of arguments of dml32_CalculateWatermarksMALLUseAndDRAMSpeedChangeSupport()

2022-08-30 Thread Nathan Chancellor
of 'v' mixed with 'mode_lib->vba'. Link: https://github.com/ClangBuiltLinux/linux/issues/1681 Reported-by: "Sudip Mukherjee (Codethink)" Signed-off-by: Nathan Chancellor --- .../dc/dml/dcn32/display_mode_vba_32.c| 118 ++--- .../dc/dml/dcn32/displ

[PATCH 2/5] drm/amd/display: Reduce number of arguments of dml32_CalculatePrefetchSchedule()

2022-08-30 Thread Nathan Chancellor
iltLinux/linux/issues/1681 Reported-by: "Sudip Mukherjee (Codethink)" Signed-off-by: Nathan Chancellor --- .../dc/dml/dcn32/display_mode_vba_32.c| 118 +++--- .../dc/dml/dcn32/display_mode_vba_util_32.c | 75 +-- .../dc/dml/dcn32/display_mode_vba_util_

[PATCH 3/5] drm/amd/display: Reduce number of arguments of dml31's CalculateWatermarksAndDRAMSpeedChangeSupport()

2022-08-30 Thread Nathan Chancellor
onfigurationFull(struct display_mode_lib *mode_lib) ^ 1 error generated. Link: https://github.com/ClangBuiltLinux/linux/issues/1681 Reported-by: "Sudip Mukherjee (Codethink)" Signed-off-by: Nathan Chancellor --- .../dc/dml/dcn31/display_mode_vba_31.c| 248

[PATCH 4/5] drm/amd/display: Reduce number of arguments of dml31's CalculateFlipSchedule()

2022-08-30 Thread Nathan Chancellor
onfigurationFull(struct display_mode_lib *mode_lib) ^ 1 error generated. Link: https://github.com/ClangBuiltLinux/linux/issues/1681 Reported-by: "Sudip Mukherjee (Codethink)" Signed-off-by: Nathan Chancellor --- .../dc/dml/dcn31/display_mode_vba_31.c| 172 +---

[PATCH 5/5] drm/amd/display: Mark dml30's UseMinimumDCFCLK() as noinline for stack usage

2022-08-30 Thread Nathan Chancellor
uot;Sudip Mukherjee (Codethink)" Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c b/drivers/gpu/drm/amd/displ

Re: mainline build failure for x86_64 allmodconfig with clang

2022-08-30 Thread Nathan Chancellor
On Fri, Aug 26, 2022 at 10:31:34AM -0400, Alex Deucher wrote: > On Thu, Aug 25, 2022 at 6:34 PM Nathan Chancellor wrote: > > > > Hi AMD folks, > > > > Top posting because it might not have been obvious but I was looking for > > your feedback on this message (which

Re: [PATCH v2 3/5] Makefile.compiler: replace cc-ifversion with compiler-specific macros

2022-08-31 Thread Nathan Chancellor
;clang-is-at-least' and I don't really feel like painting sheds today, it's hot outside :) Reviewed-by: Nathan Chancellor Some comments below. > --- > Changes v1 -> v2: > * New patch. > > Documentation/kbuild/makefiles.rst | 44 +++-- &g

Re: [PATCH 0/5] drm/amd/display: Reduce stack usage for clang

2022-09-12 Thread Nathan Chancellor
Hi Rodrigo, On Mon, Sep 12, 2022 at 05:50:31PM -0400, Rodrigo Siqueira Jordao wrote: > > > On 2022-08-30 16:34, Nathan Chancellor wrote: > > Hi all, > > > > This series aims to address the following warnings, which are visible > > when building x86_64 all

[PATCH 1/2] drm/amd/display: Reduce number of arguments of dml314's CalculateWatermarksAndDRAMSpeedChangeSupport()

2022-09-16 Thread Nathan Chancellor
SystemConfigurationFull(struct display_mode_lib *mode_lib) ^ 1 error generated. Link: https://github.com/ClangBuiltLinux/linux/issues/1710 Reported-by: "kernelci.org bot" Signed-off-by: Nathan Chancellor --- This is just commit ab2ac59c32db ("drm/amd/display:

[PATCH 2/2] drm/amd/display: Reduce number of arguments of dml314's CalculateFlipSchedule()

2022-09-16 Thread Nathan Chancellor
SystemConfigurationFull(struct display_mode_lib *mode_lib) ^ 1 error generated. Link: https://github.com/ClangBuiltLinux/linux/issues/1710 Reported-by: "kernelci.org bot" Signed-off-by: Nathan Chancellor --- This is just commit 1dbec5b4b0ef ("drm/amd/display:

Re: [PATCH 1/2] drm/amd/display: Reduce number of arguments of dml314's CalculateWatermarksAndDRAMSpeedChangeSupport()

2022-09-16 Thread Nathan Chancellor
On Fri, Sep 16, 2022 at 03:04:53PM -0700, Tom Rix wrote: > > On 9/16/22 2:06 PM, Nathan Chancellor wrote: > > Most of the arguments are identical between the two call sites and they > > can be accessed through the 'struct vba_vars_st' pointer. This reduces > > th

Re: mainline build failure (new) for x86_64 allmodconfig with clang

2022-09-17 Thread Nathan Chancellor
Hi Sudip, On Sat, Sep 17, 2022 at 11:55:05AM +0100, Sudip Mukherjee (Codethink) wrote: > Hi All, > > The latest mainline kernel branch fails to build for x86_64 allmodconfig > with clang. The errors are: > > drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn314/display_mode_vba_314.c:4020:6: > er

Re: [PATCH 1/2] drm/amd/display: Reduce number of arguments of dml314's CalculateWatermarksAndDRAMSpeedChangeSupport()

2022-09-20 Thread Nathan Chancellor
to keep -Werror on for arm64 and x86_64 allmodconfig for this release. Cheers, Nathan > On Sat, Sep 17, 2022 at 8:38 AM Maíra Canal wrote: > > > > Hi Nathan, > > > > On 9/16/22 18:06, Nathan Chancellor wrote: > > > Most of the arguments are identical between t

[PATCH] drm/amd/display: Fix build breakage with CONFIG_DEBUG_FS=n

2022-10-14 Thread Nathan Chancellor
ace within the #ifdef so that the file can be built with or without CONFIG_DEBUG_FS. Fixes: 8799c0be89eb ("drm/amd/display: Fix vblank refcount in vrr transition") Signed-off-by: Nathan Chancellor --- I have sent this to Linus in case he wants to take this directly since this is a pr

[PATCH] drm/amdkfd: Fix type of reset_type parameter in hqd_destroy() callback

2022-10-17 Thread Nathan Chancellor
rd parameter type of 'enum kfd_preempt_type'. Update the function pointer prototype to match reality so that there is no more CFI violation. Link: https://github.com/ClangBuiltLinux/linux/issues/1738 Signed-off-by: Nathan Chancellor --- No Fixes tag, as I could not pin down exactly when

[PATCH] drm/amdgpu: Fix uninitialized warning in mmhub_v2_0_get_clockgating()

2022-10-24 Thread Nathan Chancellor
ccess for MMHUB 2.1.x") Link: https://github.com/ClangBuiltLinux/linux/issues/1748 Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c b/drivers/gpu/drm/am

Re: [PATCH RESEND 1/1] drm/amd/display: add DCN support for ARM64

2022-10-27 Thread Nathan Chancellor
Hi Rodrigo, On Thu, Oct 27, 2022 at 10:29:33AM -0400, Rodrigo Siqueira wrote: > Nathan/Stephen, > > Maybe I'm wrong, but I think you have access to some sort of CI that tests > multiple builds with different compiles and configs, right? Is it possible > to check this patch + amd-staging-drm-next

Re: [PATCH v3 1/1] drm/amd/display: add DCN support for ARM64

2022-10-28 Thread Nathan Chancellor
Hi Ao, On Thu, Oct 27, 2022 at 09:52:29PM +0200, Ao Zhong wrote: > After moving all FPU code to the DML folder, we can enable DCN support > for the ARM64 platform. Remove the -mgeneral-regs-only CFLAG from the > code in the DML folder that needs to use hardware FPU, and add a control > mechanism f

Re: [PATCH v3 1/1] drm/amd/display: add DCN support for ARM64

2022-10-28 Thread Nathan Chancellor
Hi Rodrigo, On Fri, Oct 28, 2022 at 11:35:32AM -0400, Rodrigo Siqueira Jordao wrote: > > > On 2022-10-28 11:09, Nathan Chancellor wrote: > > Hi Ao, > > > > On Thu, Oct 27, 2022 at 09:52:29PM +0200, Ao Zhong wrote: > > > After moving all FPU code to the D

Re: [PATCH v3 1/1] drm/amd/display: add DCN support for ARM64

2022-10-31 Thread Nathan Chancellor
Hi Rodrigo and Ao, On Fri, Oct 28, 2022 at 08:48:26AM -0700, Nathan Chancellor wrote: > On Fri, Oct 28, 2022 at 11:35:32AM -0400, Rodrigo Siqueira Jordao wrote: > > > > > > On 2022-10-28 11:09, Nathan Chancellor wrote: > > > Hi Ao, > > > > > > On

Re: [PATCH v4 1/1] drm/amd/display: add DCN support for ARM64

2022-11-01 Thread Nathan Chancellor
On Tue, Nov 01, 2022 at 10:36:08AM -0400, Rodrigo Siqueira Jordao wrote: > > > On 2022-10-31 15:37, Ao Zhong wrote: > > After moving all FPU code to the DML folder, we can enable DCN support > > for the ARM64 platform. Remove the -mgeneral-regs-only CFLAG from the > > code in the DML folder that

[PATCH 2/2] drm/amdgpu: Fix type of second parameter in odn_edit_dpm_table() callback

2022-11-02 Thread Nathan Chancellor
edit_dpm_table() from 'struct pp_hwmgr_func', which both have a second parameter type of 'enum PP_OD_DPM_TABLE_COMMAND'. Update the type parameter in both the prototype in 'struct amd_pm_funcs' and pp_odn_edit_dpm_table() to 'enum PP_OD_DPM_TABLE_COMMAND', which cleans up

[PATCH 1/2] drm/amdgpu: Fix type of second parameter in trans_msg() callback

2022-11-02 Thread Nathan Chancellor
er in the prototype should be 'enum idh_request' instead of 'u32'. Update it to clear up the warnings. Link: https://github.com/ClangBuiltLinux/linux/issues/1750 Reported-by: Sami Tolvanen Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 5 -

[PATCH] drm/amdkfd: Use proper enum in pm_unmap_queues_v9()

2022-02-17 Thread Nathan Chancellor
meric value of the proper type. Fixes: 009e9a158505 ("drm/amdkfd: navi2x requires extended engines to map and unmap sdma queues") Link: https://github.com/ClangBuiltLinux/linux/issues/1596 Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c | 2 +- 1

Re: [PATCH 1/2] drm/amdkfd: judge get_atc_vmid_pasid_mapping_info before call

2022-03-08 Thread Nathan Chancellor
On Thu, Mar 03, 2022 at 04:05:13PM +0800, Yifan Zhang wrote: > Fix the NULL point issue: > > [ 3076.255609] BUG: kernel NULL pointer dereference, address: > [ 3076.255624] #PF: supervisor instruction fetch in kernel mode > [ 3076.255637] #PF: error_code(0x0010) - not-present page

Re: [PATCH v2] drm/amkfd: bail out early if no get_atc_vmid_pasid_mapping_info

2022-03-09 Thread Nathan Chancellor
On Wed, Mar 09, 2022 at 10:22:42AM +0800, Yifan Zhang wrote: > it makes no sense to continue with an undefined vmid. > > Fixes: d21bcfc01eb1 (drm/amdkfd: judge get_atc_vmid_pasid_mapping_info before > call) > > Signed-off-by: Yifan Zhang > Reported-by: Nathan Chancello

Re: [PATCH] drm/amd/display: fix 64 bit divide in freesync code

2022-04-07 Thread Nathan Chancellor
On Thu, Apr 07, 2022 at 03:50:29PM -0400, Alex Deucher wrote: > Use do_div() rather than a a 64 bit divide. > > Fixes: 3fe5739db48843 ("drm/amd/display: Add flip interval workaround") > Reported-by: kernel test robot > Signed-off-by: Alex Deucher > Cc: Angus Wang > Cc: Anthony Koo > Cc: Aric C

Re: [PATCH] drm/amd/display: fix 64 bit divide in freesync code

2022-04-08 Thread Nathan Chancellor
gt; Cc: Anthony Koo > Cc: Aric Cyr > Cc: Nathan Chancellor This resolves the build failure for me. Reviewed-by: Nathan Chancellor > --- > drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/dri

[PATCH 5.4 0/2] Fix two instances of -Wstrict-prototypes in drm/amd

2022-04-11 Thread Nathan Chancellor
warning in the same manner as the prior patch, which is less risky and accomplishes the same end result of no warning. Colin Ian King (1): drm/amdkfd: add missing void argument to function kgd2kfd_init Nathan Chancellor (1): drm/amdkfd: Fix -Wstrict-prototypes from amdgpu_amdkfd_gf

[PATCH 5.4 1/2] drm/amdkfd: add missing void argument to function kgd2kfd_init

2022-04-11 Thread Nathan Chancellor
From: Colin Ian King commit 63617d8b125ed9f674133dd000b6df58d6b2965a upstream. Function kgd2kfd_init is missing a void argument, add it to clean up the non-ANSI function declaration. Acked-by: Randy Dunlap Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher Signed-off-by: Nathan

[PATCH 5.4 2/2] drm/amdkfd: Fix -Wstrict-prototypes from amdgpu_amdkfd_gfx_10_0_get_functions()

2022-04-11 Thread Nathan Chancellor
ds. Fixes: 6bdadb207224 ("drm/amdgpu: Add navi10 kfd support for amdgpu (v3)") Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c b/driver

Re: [PATCHv4] drm/amdgpu: disable ASPM on Intel Alder Lake based systems

2022-04-13 Thread Nathan Chancellor
Hi Richard, On Tue, Apr 12, 2022 at 04:50:00PM -0500, Richard Gong wrote: > Active State Power Management (ASPM) feature is enabled since kernel 5.14. > There are some AMD GFX cards (such as WX3200 and RX640) that won't work > with ASPM-enabled Intel Alder Lake based systems. Using these GFX cards

[PATCH] drm/amd/display: Fix indentation in dcn32_get_vco_frequency_from_reg()

2022-06-23 Thread Nathan Chancellor
ntended to be called unconditionally, which will fix the warning. Link: https://github.com/ClangBuiltLinux/linux/issues/1655 Fixes: 3e838f7ccf64 ("drm/amd/display: Get VCO frequency from registers") Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_m

Re: [PATCH 02/40] drm/amd/display: Add SubVP required code

2022-07-06 Thread Nathan Chancellor
On Thu, Jun 30, 2022 at 03:12:44PM -0400, Rodrigo Siqueira wrote: > From: Alvin Lee > > This commit enables the SubVP feature. To achieve that, we need to: > > - Don't force p-state disallow on SubVP (can't block dummy p-state) > - Send calculated watermark to DMCUB for SubVP > - Adjust CAB mode

Re: [PATCH 02/40] drm/amd/display: Add SubVP required code

2022-07-06 Thread Nathan Chancellor
On Wed, Jul 06, 2022 at 03:38:57PM -0400, Alex Deucher wrote: > On Wed, Jul 6, 2022 at 1:58 PM Nathan Chancellor wrote: > > > > On Thu, Jun 30, 2022 at 03:12:44PM -0400, Rodrigo Siqueira wrote: > > > From: Alvin Lee > > > > > > This commit enables the

Re: mainline build failure for x86_64 allmodconfig with clang

2022-08-04 Thread Nathan Chancellor
On Thu, Aug 04, 2022 at 09:24:41PM +0200, Arnd Bergmann wrote: > On Thu, Aug 4, 2022 at 8:52 PM Linus Torvalds > wrote: > > > > On Thu, Aug 4, 2022 at 11:37 AM Sudip Mukherjee (Codethink) > > wrote:cov_trace_cmp > > > > > > git bisect points to 3876a8b5e241 ("drm/amd/display: Enable building new

Re: mainline build failure for x86_64 allmodconfig with clang

2022-08-04 Thread Nathan Chancellor
On Thu, Aug 04, 2022 at 02:59:01PM -0700, Linus Torvalds wrote: > On Thu, Aug 4, 2022 at 1:43 PM Nathan Chancellor wrote: > > > > I do note that commit 1b54a0121dba ("drm/amd/display: Reduce stack size > > in the mode support function") did have a workaround for

Re: mainline build failure for x86_64 allmodconfig with clang

2022-08-05 Thread Nathan Chancellor
On Fri, Aug 05, 2022 at 06:16:45PM +0200, Arnd Bergmann wrote: > On Fri, Aug 5, 2022 at 5:32 PM Harry Wentland wrote: > > > I do notice that these files build with a non-configurable > > > -Wframe-large-than value: > > > > > > $ rg frame_warn_flag drivers/gpu/drm/amd/display/dc/dml/Makefile > > >

Re: mainline build failure for x86_64 allmodconfig with clang

2022-08-18 Thread Nathan Chancellor
Hi Arnd, Doubling back around to this now since I think this is the only thing breaking x86_64 allmodconfig with clang 11 through 15. On Fri, Aug 05, 2022 at 09:32:13PM +0200, Arnd Bergmann wrote: > On Fri, Aug 5, 2022 at 8:02 PM Nathan Chancellor wrote: > > On Fri, Aug 05, 2022 at 0

Re: mainline build failure for x86_64 allmodconfig with clang

2022-08-25 Thread Nathan Chancellor
consider suggesting another one or looking to see if this is something you all could look into. [1]: https://lore.kernel.org/Yv5h0rb3AgTZLVJv@dev-arch.thelio-3990X/ Cheers, Nathan On Thu, Aug 18, 2022 at 08:59:14AM -0700, Nathan Chancellor wrote: > Hi Arnd, > > Doubling back around to

[PATCH] drm/amdgpu: Fix return types of certain NBIOv7.9 callbacks

2023-05-24 Thread Nathan Chancellor
ypes to clear up the warning and avoid tripping kCFI at run time. Both functions return a value from ffs(), which is an integer that can fit into either int or unsigned int. Fixes: 11f64eb1472f ("drm/amdgpu: add sysfs node for compute partition mode") Fixes: 41a717ea8afc ("drm/amdgpu: dete

Re: [PATCH] drm/amdgpu: Mark mmhub_v1_8_mmea_err_status_reg as __maybe_unused

2023-05-25 Thread Nathan Chancellor
c: Christian König > Cc: Lijo Lazar > Cc: Luben Tuikov > Cc: Alex Deucher > Signed-off-by: Srinivasan Shanmugam Traditionally, this attribute would go between the [] and =, but that is a nit. Can someone please pick this up to unblock our builds on -next? Reviewed-by: Nathan Chan

Re: [PATCH v2] drm/amd/display: enable more strict compile checks

2023-05-25 Thread Nathan Chancellor
On Thu, May 25, 2023 at 08:37:07AM -0700, Kees Cook wrote: > Hi! > > On Wed, May 24, 2023 at 04:27:31PM -0400, Hamza Mahfooz wrote: > > + Kees > > > > On 5/24/23 15:50, Alex Deucher wrote: > > > On Wed, May 24, 2023 at 3:46 PM Felix Kuehling > > > wrote: > > > > > > > > Sure, I think we tried

Re: [PATCH] drm/amdgpu: Mark mmhub_v1_8_mmea_err_status_reg as __maybe_unused

2023-05-25 Thread Nathan Chancellor
On Thu, May 25, 2023 at 12:26:56PM -0400, Luben Tuikov wrote: > On 2023-05-25 11:22, Nathan Chancellor wrote: > > On Fri, May 19, 2023 at 06:14:38PM +0530, Srinivasan Shanmugam wrote: > >> Silencing the compiler from below compilation error: > >> > >> drivers/gp

Re: [PATCH] drm/amdgpu: Mark mmhub_v1_8_mmea_err_status_reg as __maybe_unused

2023-05-25 Thread Nathan Chancellor
On Thu, May 25, 2023 at 12:42:05PM -0400, Alex Deucher wrote: > On Thu, May 25, 2023 at 12:29 PM Nathan Chancellor wrote: > > > > On Thu, May 25, 2023 at 12:26:56PM -0400, Luben Tuikov wrote: > > > On 2023-05-25 11:22, Nathan Chancellor wrote: > > > > On F

Re: [PATCH] drm/amdgpu: Mark mmhub_v1_8_mmea_err_status_reg as __maybe_unused

2023-05-25 Thread Nathan Chancellor
On Thu, May 25, 2023 at 12:45:13PM -0400, Luben Tuikov wrote: > On 2023-05-25 12:29, Nathan Chancellor wrote: > > On Thu, May 25, 2023 at 12:26:56PM -0400, Luben Tuikov wrote: > >> On 2023-05-25 11:22, Nathan Chancellor wrote: > >>> On Fri, May 19, 2023 at 06:14:38

Re: [PATCH] drm/amdkfd: remove unused function get_reserved_sdma_queues_bitmap

2023-05-25 Thread Nathan Chancellor
On Thu, May 25, 2023 at 04:07:59PM -0400, Tom Rix wrote: > clang with W=1 reports > drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_device_queue_manager.c:122:24: error: > unused function 'get_reserved_sdma_queues_bitmap' > [-Werror,-Wunused-function] > static inline uint64_t get_reserved_sdma_queues_b

[PATCH] drm/amdgpu: Wrap -Wunused-but-set-variable in cc-option

2023-06-08 Thread Nathan Chancellor
ltLinux/linux/issues/1869 Fixes: a0fd5a5f676c ("drm/amd/amdgpu: introduce DRM_AMDGPU_WERROR") Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/Makefile b/drivers/gpu

Re: [PATCH] drm/amd/amdgpu: enable W=1 for amdgpu

2023-06-09 Thread Nathan Chancellor
;s enable > these checks unconditionally for the entire module to catch these errors > during development. > > Cc: Alex Deucher > Cc: Nathan Chancellor > Signed-off-by: Hamza Mahfooz I think this is fine, especially since it will help catch issues in amdgpu quickly and hopefully

Re: [PATCH] drm/amdgpu: Wrap -Wunused-but-set-variable in cc-option

2023-06-12 Thread Nathan Chancellor
On Sat, Jun 10, 2023 at 10:14:05AM +0300, Jani Nikula wrote: > On Thu, 08 Jun 2023, Nathan Chancellor wrote: > > -Wunused-but-set-variable was only supported in clang starting with > > 13.0.0, so earlier versions will emit a warning, which is turned into a > > hard error for

[PATCH 1/2] drm/amdgpu: Remove CONFIG_DEBUG_FS guard around body of amdgpu_rap_debugfs_init()

2023-06-15 Thread Nathan Chancellor
an error pointer in that situation. Remove the preprocessor guards so that the variable never appears unused, while not changing anything at run time. Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/driver

[PATCH 0/2] drm/amdgpu: Fix instances of -Wunused-const-variable with CONFIG_DEBUG_FS=n

2023-06-15 Thread Nathan Chancellor
Hi all, After commit a25a9dae2067 ("drm/amd/amdgpu: enable W=1 for amdgpu"), I see a few instances of -Wunused-const-variable with configurations that do not enable CONFIG_DEBUG_FS, such as Alpine Linux's. This series includes two patches to resolve each warning I see. --- Natha

[PATCH 2/2] drm/amdgpu: Move clocks closer to its only usage in amdgpu_parse_cg_state()

2023-06-15 Thread Nathan Chancellor
38 | static const struct cg_flag_name clocks[] = { | ^ 1 error generated. clocks is only used when CONFIG_DEBUG_FS is set, so move the definition into the CONFIG_DEBUG_FS block right above its only usage to clear up the warning. Signed-off-by: Nathan Chan

Re: [PATCH 11/22] drm/amd/display: Disable phantom OTG after enable for plane disable

2022-11-10 Thread Nathan Chancellor
Hi Alan, On Thu, Nov 03, 2022 at 12:01:06AM +0800, Alan Liu wrote: > From: Alvin Lee > > [Description] > - Need to disable phantom OTG after it's enabled > in order to restore it to it's original state. > - If it's enabled and then an MCLK switch comes in > we may not prefetch the correct da

  1   2   >