Re: [PATCH] drm/amdgpu/powerplay: partial revert of endian fixes

2016-07-28 Thread Arnd Bergmann
On Thursday, July 28, 2016 10:00:46 AM CEST Alex Deucher wrote: > This fixes a warning on big endian. Bitfields need to > be handled properly. > > Cc: Arnd Bergmann <a...@arndb.de> > Signed-off-by: Alex Deucher <alexander.deuc...@amd.com> > Acked-by: Arnd Be

[PATCH] drm/amdgpu: fix warning on older gcc releases

2017-02-03 Thread Arnd Bergmann
versions. Fixes: acad2b2a7b70 ("drm/amdgpu:implement CE/DE meta-init routines") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/dri

[PATCH] drm/amdgpu: shut up #warning for compile testing

2017-02-01 Thread Arnd Bergmann
there. In this version, I'm making the warning conditional on CONFIG_COMPILE_TEST, which shuts it up for me, but not people that may actually want to run the kernel as a compromize. Fixes: a2e2f29970aa ("drm/amdgpu: Bring bo creation in line with radeon driver (v2)") Signed-of

Re: next build: 208 builds: 3 failed, 205 passed, 5 errors, 23 warnings (next-20170215)

2017-02-15 Thread Arnd Bergmann
On Wed, Feb 15, 2017 at 9:30 AM, kernelci.org bot wrote: > next build: 208 builds: 3 failed, 205 passed, 5 errors, 23 warnings > Errors and Warnings Detected: > > arm64: gcc version 5.3.1 20160412 (Linaro GCC 5.3-2016.05) > defconfig+CONFIG_KASAN=y 4 warnings > arm: gcc

[PATCH] drm/amdgpu: fix typo in amdgpu_debugfs_test_ib_init

2017-06-21 Thread Arnd Bergmann
: error: 'amdgpu_debugfs_test_ib_init' defined but not used [-Werror=unused-function] This fixes the function name. Fixes: 4f0955fcc052 ("drm/amdgpu: export test ib debugfs interface") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1

[PATCH] drm/radeon: properly initialize r600_audio_status() data

2017-09-15 Thread Arnd Bergmann
the fields that got initialized, so newer compilers don't warn about it, but initializing the entire structure feels like the right thing to do here and avoids the warning. Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/gpu/drm/radeon/r600_hdmi.c | 2 +- 1 file changed, 1 insertion

Re: [PATCH 1/3] drm/amdgpu/display: provide ASSERT macros unconditionally

2017-11-02 Thread Arnd Bergmann
On Thu, Nov 2, 2017 at 3:09 PM, Felix Kuehling <felix.kuehl...@amd.com> wrote: > On 2017-11-02 07:26 AM, Arnd Bergmann wrote: >> It seems impossible to build this driver without setting either >> CONFIG_DEBUG_KERNEL or CONFIG_DEBUG_DRIVER: >> >> drivers

[PATCH v2] drm/amdgpu/display: provide ASSERT macros unconditionally

2017-11-02 Thread Arnd Bergmann
of function 'ASSERT'; did you mean 'IS_ERR'? [-Werror=implicit-function-declaration] This moves the ASSERT() macro and related helpers outside of the #ifdef to get it to build again. Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/gpu/drm/amd/display/dc/os_types.h | 4 1 file c

[PATCH] drm/amdgpu/virt: don't dereference undefined 'module' struct

2017-11-02 Thread Arnd Bergmann
using the module version altogether. Fixes: 2dc8f81e4f82 ("drm/amdgpu: SR-IOV data exchange between PF") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_v

[PATCH 3/3] drm/amdgpu/display: fix integer arithmetic problem

2017-11-02 Thread Arnd Bergmann
->lb_line_pitch = bw_ceil2(bw_mul(bw_div(bw_frc_to_fixed(2401171875, 1), bw_int_to_fixed(3)), bw_ceil2(data->source_width_in_lb, bw_int_to_fixed(8))), bw_int_to_fixed(48)); ^~~~ Marking the constant as explicitly unsigned makes it work fine everywhere without warnings. Signed-off-by

Re: [PATCH] drm: amd: dc: don't use FP math when Kcov is enabled

2017-12-05 Thread Arnd Bergmann
On Mon, Dec 4, 2017 at 9:34 PM, Harry Wentland <harry.wentl...@amd.com> wrote: > On 2017-12-04 08:08 AM, Arnd Bergmann wrote: >> Building the DCN 1.0 Raven display driver with CONFIG_KCOV_INSTRUMENT_ALL=y >> and CONFIG_KCOV_ENABLE_COMPARISONS=y results in warnings about many

[PATCH] drm: amd: dc: don't use FP math when Kcov is enabled

2017-12-04 Thread Arnd Bergmann
as a bugfix. Fixes: bf2e2e2e0ea9 ("drm/amd/display: Limit DCN to x86 arch") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/gpu/drm/amd/display/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/display/Kconfig b/drivers/gpu/drm/amd/displ

[PATCH 2/8] drm/amdgpu: fix 32-bit build warning

2018-05-26 Thread Arnd Bergmann
' lower_32_bits((uint64_t)wptr)); ^ The correct method is to cast to 'uintptr_t'. Fixes: d5a114a6c5f7 ("drm/amdgpu: Add GFXv9 kfd2kgd interface functions") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 4 ++--

[PATCH 2/2] amdgpu: kfd: use modern ktime accessors

2018-06-18 Thread Arnd Bergmann
getrawmonotonic64() and get_monotonic_boottime64() are deprecated because of the nonstandard naming. The replacement functions ktime_get_raw_ns() and ktime_get_boot_ns() also simplify the callers. Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 8 ++-- 1 file

[PATCH 1/2] amdgpu: display: use modern ktime accessors

2018-06-18 Thread Arnd Bergmann
getrawmonotonic64() is deprecated because of the nonstandard naming. The replacement functions ktime_get_raw_ns() also simplifies the callers. Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 8 drivers/gpu/drm/amd/display/dc/dm_services.h

[PATCH] drm/amdgpu: use %pap format string for phys_addr_t

2018-01-08 Thread Arnd Bergmann
, Passing the address by reference to the special %pap format string will produce the correct output and avoid the warning. Fixes: 30f1c0421ec5 ("drm/amdgpu: Implement get_local_mem_info") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c |

Re: [PATCH] drm: amd: dc: don't use FP math when Kcov is enabled

2018-01-16 Thread Arnd Bergmann
On Tue, Dec 5, 2017 at 6:01 PM, Harry Wentland wrote: >> > > Thanks, Arnd. This is what I was missing. I'll take another look. > > It would still work without KCOV, although I agree that's not ideal by any > means. Any update on this? I see building DCN1.0 with KCOV

Re: [PATCH] drm/amd/display: fix incompatible structure layouts

2018-02-02 Thread Arnd Bergmann
On Fri, Feb 2, 2018 at 4:39 PM, Harry Wentland <harry.wentl...@amd.com> wrote: > On 2018-02-02 07:31 AM, Arnd Bergmann wrote: >> Building the amd display driver with link-time optimizations revealed a bug > > Curious how I'd go about building with link-time optimizations. I g

[PATCH] radeon: hide pointless #warning when compile testing

2018-02-17 Thread Arnd Bergmann
l.org Link: https://patchwork.kernel.org/patch/9550009/ Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/gpu/drm/radeon/radeon_object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeo

Re: [PATCH] [v3] drm: amd: dc: don't use FP math when Kcov is enabled

2018-08-16 Thread Arnd Bergmann
On Thu, Aug 16, 2018 at 9:56 PM Leo Li wrote: > On 2018-08-11 11:54 AM, Arnd Bergmann wrote: > > > > I tried implementing the two functions in KCOV: __sanitizer_cov_trace_cmpd > > and __sanitizer_cov_trace_cmpf, but that fails to build on architectures > > that do not

Re: [PATCH 2/2] drm/amd/display: Don't build DCN1 when kcov is enabled

2018-08-16 Thread Arnd Bergmann
> > Signed-off-by: Leo (Sunpeng) Li Looks good to me, Acked-by: Arnd Bergmann ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[PATCH] [v3] drm: amd: dc: don't use FP math when Kcov is enabled

2018-08-13 Thread Arnd Bergmann
as a bugfix. Fixes: bf2e2e2e0ea9 ("drm/amd/display: Limit DCN to x86 arch") Fixes: 4841203102a3 ("drm/amdgpu/display: Replace CONFIG_DRM_AMD_DC_DCN1_0 with CONFIG_X86") Link: drm: amd: dc: don't use FP math when Kcov is enabled Signed-off-by: Arnd Bergmann --- v3: rebase on top of

Re: [PATCH] [v3] drm: amd: dc: don't use FP math when Kcov is enabled

2018-08-13 Thread Arnd Bergmann
On Mon, Aug 13, 2018 at 4:49 PM Alex Deucher wrote: > > On Sun, Aug 12, 2018 at 3:55 AM Christian König > wrote: > > Adding Harry as well. > > Am 11.08.2018 um 17:54 schrieb Arnd Bergmann: > > > > > > Fixes: bf2e2e2e0ea9 ("drm/amd/display: Limit DCN t

Re: [PATCH] [v3] drm: amd: dc: don't use FP math when Kcov is enabled

2018-08-14 Thread Arnd Bergmann
On Tue, Aug 14, 2018 at 10:54 AM Michel Dänzer wrote: > > On 2018-08-13 05:23 PM, Arnd Bergmann wrote: > > On Mon, Aug 13, 2018 at 4:49 PM Alex Deucher wrote: > >> > >> On Sun, Aug 12, 2018 at 3:55 AM Christian König > >> wrote: > >>> Adding

[PATCH] [RESEND] amdgpu: kfd: use modern ktime accessors

2018-07-11 Thread Arnd Bergmann
getrawmonotonic64() and get_monotonic_boottime64() are deprecated because of the nonstandard naming. The replacement functions ktime_get_raw_ns() and ktime_get_boot_ns() also simplify the callers. Reviewed-by: Felix Kuehling . Signed-off-by: Arnd Bergmann --- Patch was originall sent on Jun 18

[PATCH] drm/amdkfd: fix uninitialized variable use

2018-03-15 Thread Arnd Bergmann
it. Fixes: 520b8fb755cc ("drm/amdkfd: Add topology support for CPUs") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c b/drivers/gp

[PATCH] amdkfd: always select MMU_NOTIFIER

2018-03-28 Thread Arnd Bergmann
the time. Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/gpu/drm/amd/amdkfd/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdkfd/Kconfig b/drivers/gpu/drm/amd/amdkfd/Kconfig index ed2f06c9f346..5a26acb90e19 100644 --- a/drivers/gpu/drm/amd/

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-24 Thread Arnd Bergmann
On Tue, Sep 18, 2018 at 7:59 PM Jason Gunthorpe wrote: > > On Tue, Sep 18, 2018 at 10:51:08AM -0700, Darren Hart wrote: > > On Fri, Sep 14, 2018 at 09:57:48PM +0100, Al Viro wrote: > > > On Fri, Sep 14, 2018 at 01:35:06PM -0700, Darren Hart wrote: > > > > > > > Acked-by: Darren Hart (VMware) > >

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-24 Thread Arnd Bergmann
On Mon, Sep 24, 2018 at 10:35 PM Jason Gunthorpe wrote: > On Mon, Sep 24, 2018 at 10:18:52PM +0200, Arnd Bergmann wrote: > > On Tue, Sep 18, 2018 at 7:59 PM Jason Gunthorpe wrote: > > > On Tue, Sep 18, 2018 at 10:51:08AM -0700, Darren Hart wrote: > > > > On Fri, Se

[PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-12 Thread Arnd Bergmann
, but are not interpreted as integer values. Signed-off-by: Arnd Bergmann --- drivers/android/binder.c| 2 +- drivers/crypto/qat/qat_common/adf_ctl_drv.c | 2 +- drivers/dma-buf/dma-buf.c | 4 +--- drivers/dma-buf/sw_sync.c | 2 +- drivers/dma-buf

[PATCH] drm/amd/display: avoid passing enum as NULL pointer

2019-03-07 Thread Arnd Bergmann
and more conventional but should not change the behavior at all. Fixes: c2791297013e ("drm/amd/display: Add color bit info to freesync infoframe") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 7 +++ drivers/gpu/drm/amd/display/m

Re: [PATCH v3 00/26] compat_ioctl: cleanups

2019-04-18 Thread Arnd Bergmann
On Wed, Apr 17, 2019 at 12:33 AM Douglas Gilbert wrote: > > On 2019-04-16 4:19 p.m., Arnd Bergmann wrote: > > Hi Al, > > > > It took me way longer than I had hoped to revisit this series, see > > https://lore.kernel.org/lkml/20180912150142.157913-1-a...@arndb.de/

[PATCH v3 00/26] compat_ioctl: cleanups

2019-04-17 Thread Arnd Bergmann
. I hope you can still take these for the coming merge window, unless new problems come up. Arnd Arnd Bergmann (26): compat_ioctl: pppoe: fix PPPOEIOCSFWD handling compat_ioctl: move simple ppp command handling into driver compat_ioctl: avoid unused function warning for do_ioctl

[PATCH v3 12/26] compat_ioctl: move more drivers to compat_ptr_ioctl

2019-04-17 Thread Arnd Bergmann
, but are not interpreted as integer values. Acked-by: Jason Gunthorpe Acked-by: Daniel Vetter Acked-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman Acked-by: David Sterba Acked-by: Darren Hart (VMware) Acked-by: Jonathan Cameron Acked-by: Bjorn Andersson Signed-off-by: Arnd Bergmann --- drivers

Re: [PATCH] drm/amd/display: include missing linux/delay.h

2019-06-17 Thread Arnd Bergmann
On Mon, Jun 17, 2019 at 4:41 PM Sam Ravnborg wrote: > On Mon, Jun 17, 2019 at 02:38:55PM +0200, Arnd Bergmann wrote: > > Some randconfig builds fail to compile the dcn10 code because of > > a missing declaration: > > > > drivers/gpu/drm/amd/amdgpu/../display/dc

[PATCH] drm/amd/display: include missing linux/delay.h

2019-06-17 Thread Arnd Bergmann
declaration of function 'udelay' [-Werror=implicit-function-declaration] Include the appropriate kernel header. Fixes: 9ed43ef84d9d ("drm/amd/display: Add Underflow Asserts to dc") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 1 + 1 file

[PATCH] drm/amdgpu: fix error handling in df_v3_6_pmc_start

2019-06-17 Thread Arnd Bergmann
val; ^~ Make it return a proper error code that we can catch in the caller. Fixes: 992af942a6cf ("drm/amdgpu: add df perfmon regs and funcs for xgmi") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/amdgpu/df_v3_6.c | 13 + 1 file changed, 9 insertions(+), 4 delet

Re: [PATCH v3 12/26] compat_ioctl: move more drivers to compat_ptr_ioctl

2019-04-26 Thread Arnd Bergmann
On Thu, Apr 25, 2019 at 11:25 PM Johannes Berg wrote: > On Thu, 2019-04-25 at 17:55 +0200, Arnd Bergmann wrote: > > On Thu, Apr 25, 2019 at 5:35 PM Al Viro wrote: > > > > > > On Thu, Apr 25, 2019 at 12:21:53PM -0300, Mauro Carvalho Chehab wrote: > > >

[PATCH] drm/amd: work around llvm bug #42576

2019-07-12 Thread Arnd Bergmann
it by inserting a barrier() that prevents the optimization. Link: https://bugs.llvm.org/show_bug.cgi?id=42576 Signed-off-by: Arnd Bergmann --- Sending this for completeness, please decide for yourselves whether to apply it or not, given that it's a trivial workaround but probably not needed in the long run

[PATCH] drm/amd/display: return 'NULL' instead of 'false' from dcn20_acquire_idle_pipe_for_layer

2019-07-12 Thread Arnd Bergmann
; Changing it to 'NULL' looks like the right thing that will shut up the warning and make it easier to read, while not changing behavior. Fixes: 7ed4e6352c16 ("drm/amd/display: Add DCN2 HW Sequencer and Resource") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/displa

[PATCH] drm/amd/display: Support clang option for stack alignment

2019-07-12 Thread Arnd Bergmann
and Resource") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/display/dc/dcn20/Makefile | 8 +++- drivers/gpu/drm/amd/display/dc/dsc/Makefile | 16 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/Makefile b/driver

[PATCH] drm/amd/amdgpu: hide #warning for missing DC config

2019-07-12 Thread Arnd Bergmann
navi." Remove these and rely on the users to turn these on. Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/amdgpu/nv.c| 2 -- drivers/gpu/drm/amd/amdgpu/soc15.c | 4 2 files changed, 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.

Re: [PATCH] drm/amd/amdgpu: hide #warning for missing DC config

2019-07-12 Thread Arnd Bergmann
On Fri, Jul 12, 2019 at 8:02 PM Alex Deucher wrote: > > On Fri, Jul 12, 2019 at 5:41 AM Arnd Bergmann wrote: > > > > It is annoying to have #warnings that trigger in randconfig > > builds like > > > > drivers/gpu/drm/amd/amdgpu/soc15.c:653:3: error: "

Re: [PATCH] drm/amd/display: Support clang option for stack alignment

2019-07-12 Thread Arnd Bergmann
On Fri, Jul 12, 2019 at 8:49 PM 'Nick Desaulniers' via Clang Built Linux wrote: > > On Fri, Jul 12, 2019 at 2:37 AM Arnd Bergmann wrote: > > > > As previously fixed for dml in commit 4769278e5c7f ("amdgpu/dc/dml: > > Support clang option for stack alignment") an

[PATCH] drm/amd/powerplay: work around enum conversion warnings

2019-07-08 Thread Arnd Bergmann
explict case is an easy way to shut up the warnings. Fixes: bc0fcffd36ba ("drm/amd/powerplay: Unify smu handle task function (v2)") Fixes: 096761014227 ("drm/amd/powerplay: support sysfs to get socclk, fclk, dcefclk") Signed-off-by: Arnd Bergmann --- Please check carefully if the warnin

Re: [1/2] drm/amd/powerplay: smu_v11_0: fix uninitialized variable use

2019-07-08 Thread Arnd Bergmann
On Mon, Jul 8, 2019 at 5:02 PM Nathan Chancellor wrote: > On Mon, Jul 08, 2019 at 04:07:58PM +0200, Arnd Bergmann wrote: > > /* if don't has GetDpmClockFreq Message, try get current clock by > > SmuMetrics_t */ > > - if (smu_msg_get_index(smu, SMU_MSG_

Re: [PATCH] drm/amd/powerplay: work around enum conversion warnings

2019-07-08 Thread Arnd Bergmann
On Mon, Jul 8, 2019 at 4:54 PM Nathan Chancellor wrote: > > Hi Arnd, > > On Mon, Jul 08, 2019 at 03:57:06PM +0200, Arnd Bergmann wrote: > > A couple of calls to smu_get_current_clk_freq() and smu_force_clk_levels() > > pass constants of the wrong type, leading

Re: [PATCH 2/2] amdgpu: make SOC15/navi support conditional

2019-07-08 Thread Arnd Bergmann
On Mon, Jul 8, 2019 at 4:46 PM Alex Deucher wrote: > > On Mon, Jul 8, 2019 at 10:42 AM Arnd Bergmann wrote: > > > > Enabling amdgpu but not CONFIG_DRM_AMD_DC leads to a warning: > > > > drivers/gpu/drm/amd/amdgpu/nv.c: In function 'nv_set_ip_blocks': > > d

[PATCH] drm/amdgpu: fix building without CONFIG_HMM_MIRROR

2019-07-08 Thread Arnd Bergmann
on it. Fixes: 7590f6d211ec ("drm/amdgpu: Prepare for hmm_range_register API change") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_

[PATCH] amdgpu: fix warning about misplaced initializers

2019-07-08 Thread Arnd Bergmann
it to {} instead of {0} is correct and more portable here. Fixes: ab43c4bf1cc8 ("drm/amd/powerplay: fix fan speed show error (for hwmon pwm)") Fixes: 98e1a543c7b1 ("drm/amd/powerplay: add function get current clock freq interface for navi10") Signed-off-by: Arnd Bergmann ---

[PATCH 2/2] drm/amd/powerplay: vega20: fix uninitialized variable use

2019-07-08 Thread Arnd Bergmann
ses into asic level") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/vega20_ppt.c b/drivers/gpu/drm/amd/powerplay/vega20_ppt.c index 9ce3f1c8ae0f..20d477f8dc84 10064

[PATCH 1/2] drm/amd/powerplay: smu_v11_0: fix uninitialized variable use

2019-07-08 Thread Arnd Bergmann
ng uint32_t freq; ^ = 0 Bail out of smu_v11_0_get_current_clk_freq() before we get there. Fixes: e36182490dec ("drm/amd/powerplay: fix dpm freq unit error (10KHz -> Mhz)") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/pow

[PATCH 2/2] amdgpu: make SOC15/navi support conditional

2019-07-08 Thread Arnd Bergmann
only be enabled on x86, so we cannot do that when building for other architectures. Add another Kconfig symbol to handle the SOC15 and navi, making sure that we implicitly enable DC. Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/amdgpu/Kconfig | 7 + drivers/gpu/drm/a

[PATCH 1/2] amdgpu: make pmu support optional

2019-07-08 Thread Arnd Bergmann
drm/amd/amdgpu/amdgpu_pmu.c:51:13: error: no member named 'attr' in 'struct perf_event' if (event->attr.type != event->pmu->type) ~ ^ ... Use conditional compilation for this file. Fixes: 9c7c85f7ea1f ("drm/amdgpu: add pmu counters") Signed-off-by: Arnd

[PATCH] drm/amd/display: avoid 64-bit division

2019-07-08 Thread Arnd Bergmann
lay: update calculated bounding box logic for NV") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/

[PATCH] drm/amd/display: dcn20: include linux/delay.h

2019-07-08 Thread Arnd Bergmann
itself may be problematic, as can occupy the CPU for 200ms in a busy-loop here. Fixes: 7ed4e6352c16 ("drm/amd/display: Add DCN2 HW Sequencer and Resource") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 1 + 1 file changed, 1 insertion(+)

Re: [PATCH 1/7] drm/amdgpu/mes10.1: Fix header guard

2019-07-08 Thread Arnd Bergmann
e one now, and saw your version before sending an identical patch. Acked-by: Arnd Bergmann

Re: [PATCH] drm/amd/powerplay: work around enum conversion warnings

2019-07-15 Thread Arnd Bergmann
On Mon, Jul 8, 2019 at 6:05 PM Arnd Bergmann wrote: > On Mon, Jul 8, 2019 at 4:54 PM Nathan Chancellor > wrote: > > On Mon, Jul 08, 2019 at 03:57:06PM +0200, Arnd Bergmann wrote: > > > A couple of calls to smu_get_current_clk_freq() and smu_force_clk_levels() > > &g

Re: [PATCH 6/7] drm/amd/powerplay: Use proper enums in vega20_print_clk_levels

2019-07-15 Thread Arnd Bergmann
On Thu, Jul 4, 2019 at 7:52 AM Nathan Chancellor wrote: > > clang warns: > > drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:995:39: warning: > implicit conversion from enumeration type 'PPCLK_e' to different > enumeration type 'enum smu_clk_type' [-Wenum-conversion] > ret =

Re: [PATCH v3 12/26] compat_ioctl: move more drivers to compat_ptr_ioctl

2019-04-25 Thread Arnd Bergmann
On Thu, Apr 25, 2019 at 5:22 PM Mauro Carvalho Chehab wrote: > Em Tue, 16 Apr 2019 22:25:33 +0200 Arnd Bergmann escreveu: > > If I understand your patch description well, using compat_ptr_ioctl > only works if the driver is not for s390, right? No, the purpose of compat_ptr_ioctl(

Re: [PATCH v3 12/26] compat_ioctl: move more drivers to compat_ptr_ioctl

2019-04-25 Thread Arnd Bergmann
On Thu, Apr 25, 2019 at 5:35 PM Al Viro wrote: > > On Thu, Apr 25, 2019 at 12:21:53PM -0300, Mauro Carvalho Chehab wrote: > > > If I understand your patch description well, using compat_ptr_ioctl > > only works if the driver is not for s390, right? > > No; s390 is where "oh, just set

[PATCH] drm/amd/display: hide an unused variable

2019-09-18 Thread Arnd Bergmann
: add functionality to grab DPRX CRC entries.") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index e1

[PATCH v5 13/29] compat_ioctl: move more drivers to compat_ptr_ioctl

2019-07-30 Thread Arnd Bergmann
, but are not interpreted as integer values. Acked-by: Jason Gunthorpe Acked-by: Daniel Vetter Acked-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman Acked-by: David Sterba Acked-by: Darren Hart (VMware) Acked-by: Jonathan Cameron Acked-by: Bjorn Andersson Signed-off-by: Arnd Bergmann --- drivers

[PATCH 3/6] drm/amdgpu: display_mode_vba_21: remove uint typedef

2019-10-02 Thread Arnd Bergmann
is here Just remove this type and use plain 'unsigned int' consistently, as it is already use almost everywhere in this file. Fixes: b04641a3f4c5 ("drm/amd/display: Add Renoir DML") Signed-off-by: Arnd Bergmann --- .../amd/display/dc/dml/dcn21/display_mode_vba_21.c | 13 +--

[PATCH 5/6] [RESEND] drm/amd/display: hide an unused variable

2019-10-02 Thread Arnd Bergmann
: add functionality to grab DPRX CRC entries.") Reviewed-by: Harry Wentland Signed-off-by: Arnd Bergmann --- This was a bugfix for a commit that landed in v5.4-rc1. The fix was applied by Alex Deucher on Sep 19, but is still not seen in linux-next. Resending to make sure this makes it into

[PATCH 4/6] drm/amd/display: fix dcn21 Makefile for clang

2019-10-02 Thread Arnd Bergmann
' failed Use the same variant that we have for dcn20 to fix compilation. Fixes: eced51f9babb ("drm/amd/display: Add hubp block for Renoir (v2)") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/display/dc/dcn21/Makefile | 12 +++- 1 file changed, 11 insertions(+), 1 deletio

[PATCH 2/6] drm/amdgpu: hide another #warning

2019-10-02 Thread Arnd Bergmann
dgpu: Enable DC on Renoir") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/amdgpu/soc15.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c index f70658a536a9..a337d980b434 100644 --- a/drivers/gpu/drm/amd/

[PATCH 0/6] amdgpu build fixes

2019-10-02 Thread Arnd Bergmann
Here are a couple of build fixes from my backlog in the randconfig tree. It would be good to get them all into linux-5.4. Arnd Arnd Bergmann (6): drm/amdgpu: make pmu support optional, again drm/amdgpu: hide another #warning drm/amdgpu: display_mode_vba_21: remove uint typedef drm

[PATCH 1/6] drm/amdgpu: make pmu support optional, again

2019-10-02 Thread Arnd Bergmann
ain by what looks like an incorrectly rebased patch. Fixes: 64f55e629237 ("drm/amdgpu: Add RAS EEPROM table.") Signed-off-by: Arnd Bergmann --- 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/g

[PATCH 6/6] [RESEND] drm/amdgpu: work around llvm bug #42576

2019-10-02 Thread Arnd Bergmann
it by inserting a barrier() that prevents the optimization. Link: https://bugs.llvm.org/show_bug.cgi?id=42576 Signed-off-by: Arnd Bergmann --- Apparently this bug is still present in both the released clang-9 and the current development version of clang-10. I was hoping we would not need a workaround in clang

Re: [PATCH 4/6] drm/amd/display: fix dcn21 Makefile for clang

2019-10-02 Thread Arnd Bergmann
On Wed, Oct 2, 2019 at 4:17 PM Alex Deucher wrote: > > I'm getting an error with gcc with this patch: > CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.o > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c: In > function ‘calculate_wm_set_for_vlevel’: >

Re: [PATCH 4/6] drm/amd/display: fix dcn21 Makefile for clang

2019-10-02 Thread Arnd Bergmann
On Wed, Oct 2, 2019 at 5:12 PM Alex Deucher wrote: > On Wed, Oct 2, 2019 at 10:51 AM Arnd Bergmann wrote: > > > > Nothing should really change with regards to the -msse flag here, only > > the stack alignment flag changed. Maybe there was some other change > > in y

Re: [PATCH 0/6] amdgpu build fixes

2019-10-02 Thread Arnd Bergmann
On Wed, Oct 2, 2019 at 8:47 PM Alex Deucher wrote: > > On Wed, Oct 2, 2019 at 8:02 AM Arnd Bergmann wrote: > > > > Here are a couple of build fixes from my backlog in the randconfig > > tree. It would be good to get them all into linux-5.4. > > > > Arnd

Re: [PATCH] drm/amd/display: avoid 64-bit division

2019-07-09 Thread Arnd Bergmann
On Tue, Jul 9, 2019 at 6:40 PM Deucher, Alexander wrote: > > I'll just apply Arnd's patch. If the display team wants to adjust it later > to clarify the > operation, they should go ahead as a follow up patch. Thanks! > From: Abramov, Slava > Sent: Tuesday, July 9, 2019 12:31 PM > > Thanks for

Re: [PATCH 5/7] drm/amd/display: Use proper enum conversion functions

2019-07-09 Thread Arnd Bergmann
n assumes that the code works correctly, but the types are wrong (a false positive warning). One of the two patches is correct, the other one is broken, but I have no idea which one. Arnd >From 61316b80c852d103bb61e1ce9904002414600125 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date

Re: [PATCH] drm/amd/display: fix undefined struct member reference

2019-12-10 Thread Arnd Bergmann
On Tue, Dec 10, 2019 at 9:56 PM Kazlauskas, Nicholas wrote: > On 2019-12-10 3:54 p.m., Liu, Zhan wrote: > >> > >> Fixes: c3d03c5a196f ("drm/amd/display: Include num_vmid and num_dsc > >> within NV14's resource caps") > >> Signed-off-by: Arnd Be

Re: [PATCH] drm/amd/display: include linux/slab.h where needed

2019-12-10 Thread Arnd Bergmann
On Tue, Dec 10, 2019 at 9:30 PM Kazlauskas, Nicholas wrote: > > On 2019-12-10 2:59 p.m., Arnd Bergmann wrote: > > Calling kzalloc() and related functions requires the > > linux/slab.h header to be included: > > > > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn2

[PATCH] drm/amd/display: fix undefined struct member reference

2019-12-10 Thread Arnd Bergmann
: error: excess elements in struct initializer [-Werror] .num_dsc = 5, Add another #ifdef around the assignment. Fixes: c3d03c5a196f ("drm/amd/display: Include num_vmid and num_dsc within NV14's resource caps") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/displa

[PATCH] drm/amd/display: include linux/slab.h where needed

2019-12-10 Thread Arnd Bergmann
of function 'kzalloc'; did you mean 'd_alloc'? [-Werror=implicit-function-declaration] kzalloc(sizeof(struct dcn10_ipp), GFP_KERNEL); A lot of other headers also miss a direct include in this file, but this is the only one that causes a problem for now. Signed-off-by: Arnd Bergmann --- drivers/gpu/drm

Re: AMDGPU and 16B stack alignment

2019-10-15 Thread Arnd Bergmann
On Tue, Oct 15, 2019 at 9:08 AM S, Shirish wrote: > On 10/15/2019 3:52 AM, Nick Desaulniers wrote: > My gcc build fails with below errors: > > dcn_calcs.c:1:0: error: -mpreferred-stack-boundary=3 is not between 4 and 12 > > dcn_calc_math.c:1:0: error: -mpreferred-stack-boundary=3 is not between

[PATCH] drm/amdgpu/display: avoid unused-variable warning

2020-04-08 Thread Arnd Bergmann
*amdgpu_dm_connector = | ^~~ Use an IS_ENABLED() check instead to let the compiler see what is going on. Fixes: 14f04fa4834a ("drm/amdgpu/display: add a late register connector callback") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/a

[PATCH] amdgpu: fix gcc-4.8 build warnings

2020-04-29 Thread Arnd Bergmann
}; ^ Change all instances in the amd gpu driver to using the GNU empty initializer extension. Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c| 2 +- drivers/gpu/drm/amd/display

[PATCH] [v2] amdgpu: fix gcc-4.8 build warnings

2020-04-29 Thread Arnd Bergmann
}; ^ Change all instances in the amd gpu driver to using the GNU empty initializer extension. Reviewed-by: Rodrigo Siqueira Signed-off-by: Arnd Bergmann --- v2: some context changes linux-next stopped yesterday's patch from applying today. --- drivers/gpu/drm/amd/display/amdgpu_dm

Re: [PATCH] [v2] amdgpu: fix gcc-4.8 build warnings

2020-04-29 Thread Arnd Bergmann
On Wed, Apr 29, 2020 at 3:42 PM Kazlauskas, Nicholas wrote: > > On 2020-04-29 5:20 a.m., Arnd Bergmann wrote: > > Older compilers warn about initializers with incorrect curly > > braces: > > > > drivers/gpu/drm/drm_dp_mst_topology.c: In function > > 'drm_dp_ms

[PATCH] amdgpu: fix integer overflow on 32-bit architectures

2020-05-05 Thread Arnd Bergmann
* 4L; ^ Make this a 'long long' constant instead. Fixes: 3f12acc8d6d4 ("drm/amdgpu: put the audio codec into suspend state before gpu reset V3") Signed-off-by: Arnd Bergmann --- I'm not sure the ktime_get_mono_fast

[PATCH] drm/amdgpu: allocate large structures dynamically

2020-05-05 Thread Arnd Bergmann
' [-Werror,-Wframe-larger-than=] int amdgpu_ras_feature_enable(struct amdgpu_device *adev, ^ Use kzalloc() instead to get it from the heap. Fixes: a0d254820f43 ("drm/amdgpu: update RAS TA to Host interface") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/amdgpu/amdgpu_

[PATCH] drm/amdgpu/dc: don't pass -mhard-float to clang

2020-05-05 Thread Arnd Bergmann
Clang does not appear to care, and instead prints a warning: clang: warning: argument unused during compilation: '-mhard-float' [-Wunused-command-line-argument] Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/display/dc/calcs/Makefile | 5 +++-- drivers/gpu/drm/amd/display/dc/dcn20

[PATCH 1/5] drm/amdgpu: fix enum mismatches

2020-10-26 Thread Arnd Bergmann
From: Arnd Bergmann gcc -Wextra warns about an incorrect prototype causing multiple mismatched enums: display/dc/gpio/gpio_service.c: In function 'dal_gpio_service_create': display/dc/gpio/gpio_service.c:70:50: warning: implicit conversion from 'enum dce_environment' to 'enum dce_version

[PATCH 3/5] drm/amdgpu: fix enum odm_combine_mode mismatch

2020-10-26 Thread Arnd Bergmann
From: Arnd Bergmann A conversion from 'bool' to 'enum odm_combine_mode' was incomplete, and gcc warns about this with many instances of display/dc/dml/dcn20/display_mode_vba_20.c:3899:44: warning: implicit conversion from 'enum ' to 'enum odm_combine_mode' [-Wenum-conversion] 3899

[PATCH 2/5] drm/amdgpu: fix incorrect enum type

2020-10-26 Thread Arnd Bergmann
From: Arnd Bergmann core_link_write_dpcd() returns enum dc_status, not ddc_result: display/dc/core/dc_link_dp.c: In function 'dp_set_panel_mode': display/dc/core/dc_link_dp.c:4237:11: warning: implicit conversion from 'enum dc_status' to 'enum ddc_result' [-Wenum-conversion] Avoid the warning

[PATCH 5/5] drm/amdgpu: disable -Woverride-init warning

2020-10-26 Thread Arnd Bergmann
From: Arnd Bergmann Building with 'make W=1' produces countless warnings like amdgpu/../include/vega10_ip_offset.h:276:51: warning: initialized field overwritten [-Woverride-init] Shut these up by disabling the particular warning in the amdgpu driver. Signed-off-by: Arnd Bergmann

[PATCH 4/5] drm/amdgpu: fix build_coefficients() argument

2020-10-26 Thread Arnd Bergmann
From: Arnd Bergmann gcc -Wextra warns about a function taking an enum argument being called with a bool: drivers/gpu/drm/amd/amdgpu/../display/modules/color/color_gamma.c: In function 'apply_degamma_for_user_regamma': drivers/gpu/drm/amd/amdgpu/../display/modules/color/color_gamma.c:1617:29

Re: [Linux-kernel-mentees] [PATCH] drm/amdgpu: Prevent kernel-infoleak in amdgpu_info_ioctl()

2020-08-03 Thread Arnd Bergmann
On Thu, Jul 30, 2020 at 11:09 PM Luben Tuikov wrote: > On 2020-07-29 9:49 a.m., Alex Deucher wrote: > > On Wed, Jul 29, 2020 at 4:11 AM Christian König > > wrote: > >> > >> Am 28.07.20 um 21:29 schrieb Peilin Ye: > >>> Compiler leaves a 4-byte hole near the end of `dev_info`, causing > >>>

[PATCH] drm/amdgpu: fw_attestation: fix unused function warning

2020-12-04 Thread Arnd Bergmann
From: Arnd Bergmann Without debugfs, the compiler notices one function that is not used at all: drivers/gpu/drm/amd/amdgpu/amdgpu_fw_attestation.c:123:12: error: unused function 'amdgpu_is_fw_attestation_supported' [-Werror,-Wunused-function] In fact the static const

[PATCH] drm/amdgpu: fix debugfs creation/removal, again

2020-12-03 Thread Arnd Bergmann
From: Arnd Bergmann There is still a warning when CONFIG_DEBUG_FS is disabled: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1145:13: error: 'amdgpu_ras_debugfs_create_ctrl_node' defined but not used [-Werror=unused-function] 1145 | static void amdgpu_ras_debugfs_create_ctrl_node(struct

[PATCH] drm/amdgpu: make DRM_AMD_DC x86-only again

2020-12-04 Thread Arnd Bergmann
From: Arnd Bergmann As the DRM_AMD_DC_DCN3_0 code was x86-only and fails to build on arm64, merging it into DRM_AMD_DC means that the top-level symbol is now x86-only as well. Compilation fails on arm64 with clang-12 with drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn30/display_mode_vba_30.c

Re: [PATCH] drm/amdgpu: make DRM_AMD_DC x86-only again

2020-12-07 Thread Arnd Bergmann
On Mon, Dec 7, 2020 at 9:50 PM Christian König wrote: > Am 07.12.20 um 21:47 schrieb Alex Deucher: > > On Fri, Dec 4, 2020 at 3:13 AM Arnd Bergmann wrote: > >> From: Arnd Bergmann > >> > >> As the DRM_AMD_DC_DCN3_0 code was x86-only and fails to build on &g

Re: [PATCH] drm/amdgpu: make DRM_AMD_DC x86-only again

2020-12-07 Thread Arnd Bergmann
On Mon, Dec 7, 2020 at 11:08 PM 'Nick Desaulniers' via Clang Built Linux wrote: > > On Mon, Dec 7, 2020 at 1:57 PM Arnd Bergmann wrote: > > > > Right, looking at my latest randconfig logs, I see the same problem on x86 > > builds with clang as well, though I'm not e

Re: [PATCH] drm/amdgpu: make DRM_AMD_DC x86-only again

2020-12-08 Thread Arnd Bergmann
On Tue, Dec 8, 2020 at 7:21 PM 'Nick Desaulniers' via Clang Built Linux wrote: > > On Tue, Dec 8, 2020 at 6:26 AM Arnd Bergmann wrote: > > > > On Mon, Dec 7, 2020 at 11:28 PM 'Nick Desaulniers' via Clang Built > > Linux wrote: > Hmm...no warnings for me with t

[PATCH] drm/amd/display: use div_s64() for 64-bit division

2021-01-25 Thread Arnd Bergmann
From: Arnd Bergmann The open-coded 64-bit division causes a link error on 32-bit machines: ERROR: modpost: "__udivdi3" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! ERROR: modpost: "__divdi3" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! Use the div_s64() to perfo

  1   2   >