[PATCH] drm/amdgpu: Fix size calculation when init onchip memory

2020-10-22 Thread xinhui pan
Size is page count here. Signed-off-by: xinhui pan --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 4a85f8cedd77..11dd3d9eac15 100644 ---

Re: [Outreachy kernel] [PATCH 4/5] gpu: drm: amdgpu: Replace snprintf() with sysfs_emit()

2020-10-22 Thread Sumera Priyadarsini
On Thu, Oct 22, 2020 at 7:24 PM Greg KH wrote: > On Thu, Oct 22, 2020 at 07:17:56PM +0530, Sumera Priyadarsini wrote: > > Using snprintf() for show() methods holds the risk of buffer overrun > > as snprintf() does not know the PAGE_SIZE maximum of the temporary > > buffer used to output sysfs

[PATCH] Fix bug to get average GPU power

2020-10-22 Thread Lei Guo
From 0277318fc1799d17878d9f407254773fc2bb964c Mon Sep 17 00:00:00 2001 From: Guo Lei Date: Fri, 16 Oct 2020 17:03:44 +0800 Subject: [PATCH] Fix bug to get average GPU power Synchronize emu amd_pp_sensors with kgd_pp_interface.h Signed-off-by: Guo Lei Change-Id:

Re: [PATCH 2/2] drm/amdgpu: disable DCN and VCN for navi10 blockchain SKU(v3)

2020-10-22 Thread Luben Tuikov
On 2020-10-21 23:45, Alex Deucher wrote: > On Wed, Oct 21, 2020 at 11:43 PM Tianci Yin wrote: >> >> From: "Tianci.Yin" >> >> The blockchain SKU has no display and video support, remove them. >> >> Change-Id: I419cfae8b00125f3bff18c0a8cd92f3266d5f04a >> Signed-off-by: Tianci.Yin >> --- >>

DROP: Re: [PATCH] drm/amd/amdgpu: Add checksun check for pf2vf message

2020-10-22 Thread Li, Xin (Justin)
[AMD Official Use Only - Internal Distribution Only] Please drop this patch, there’s some typo in the commit message Best Regards, Li, Xin (Justin) From: Li, Xin (Justin) Date: Friday, October 23, 2020 at 10:17 To: amd-gfx@lists.freedesktop.org Cc: Li, Xin (Justin) , Zhou, Tiecheng , Li, Xin

RE: [PATCH] drm/amdgpu: During compute disable GFXOFF for Sienna_Cichlid

2020-10-22 Thread Quan, Evan
[AMD Official Use Only - Internal Distribution Only] Acked-by: Evan Quan -Original Message- From: amd-gfx On Behalf Of Harish Kasiviswanathan Sent: Friday, October 23, 2020 3:41 AM To: amd-gfx@lists.freedesktop.org Cc: Kasiviswanathan, Harish Subject: [PATCH] drm/amdgpu: During

[PATCH] drm/amdgpu/display: fix 64 bit division in dcn30_hwseq.c

2020-10-22 Thread Alex Deucher
Use div_u64 helpers. Reviewed-by: Slava Abramov Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c

Re: [PATCH] drm/amdgpu: During compute disable GFXOFF for Sienna_Cichlid

2020-10-22 Thread Alex Deucher
On Thu, Oct 22, 2020 at 3:41 PM Harish Kasiviswanathan wrote: > Please include a patch description. With that fixed: Reviewed-by: Alex Deucher > Signed-off-by: Harish Kasiviswanathan > Change-Id: Ia9f8872b7654b99864bbef1afb9998d0cf39b7e5 > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c |

[PATCH] drm/amdgpu: During compute disable GFXOFF for Sienna_Cichlid

2020-10-22 Thread Harish Kasiviswanathan
Signed-off-by: Harish Kasiviswanathan Change-Id: Ia9f8872b7654b99864bbef1afb9998d0cf39b7e5 --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c index

Re: [PATCH v3 00/11] amd/display: Add GFX9+ modifier support.

2020-10-22 Thread Alex Deucher
I don't claim to be an expert with modifiers, but the changes all look logical to me. With VGH added to patch 10, this series is: Reviewed-by: Alex Deucher On Wed, Oct 21, 2020 at 7:31 PM Bas Nieuwenhuizen wrote: > > This adds modifier support to the amdgpu kernel drivers for GFX9 and > later

Re: [PATCH v3 03/11] drm/amd/display: Honor the offset for plane 0.

2020-10-22 Thread Greg KH
On Thu, Oct 22, 2020 at 11:36:12AM -0400, Alex Deucher wrote: > On Wed, Oct 21, 2020 at 7:31 PM Bas Nieuwenhuizen > wrote: > > > > With modifiers I'd like to support non-dedicated buffers for > > images. > > > > Signed-off-by: Bas Nieuwenhuizen > > Cc: sta...@vger.kernel.org # 5.1.0 > > I think

Re: [PATCH v3 04/11] drm/fourcc: Add AMD DRM modifiers.

2020-10-22 Thread Bas Nieuwenhuizen
On Thu, Oct 22, 2020 at 5:41 PM Alex Deucher wrote: > > On Wed, Oct 21, 2020 at 7:31 PM Bas Nieuwenhuizen > wrote: > > > > This adds modifiers for GFX9+ AMD GPUs. > > > > As the modifiers need a lot of parameters I split things out in > > getters and setters. > > - Advantage: simplifies the

Re: [PATCH v3 04/11] drm/fourcc: Add AMD DRM modifiers.

2020-10-22 Thread Alex Deucher
On Wed, Oct 21, 2020 at 7:31 PM Bas Nieuwenhuizen wrote: > > This adds modifiers for GFX9+ AMD GPUs. > > As the modifiers need a lot of parameters I split things out in > getters and setters. > - Advantage: simplifies the code a lot > - Disadvantage: Makes it harder to check that you're

Re: [PATCH v3 03/11] drm/amd/display: Honor the offset for plane 0.

2020-10-22 Thread Alex Deucher
On Wed, Oct 21, 2020 at 7:31 PM Bas Nieuwenhuizen wrote: > > With modifiers I'd like to support non-dedicated buffers for > images. > > Signed-off-by: Bas Nieuwenhuizen > Cc: sta...@vger.kernel.org # 5.1.0 I think you need # 5.1.x- for it to be applied to all stable kernels since 5.1 otherwise

Re: [Outreachy kernel][PATCH 0/5] drm/amdgpu: Replace snprintf() with sysfs_emit

2020-10-22 Thread Daniel Vetter
On Thu, Oct 22, 2020 at 07:07:50PM +0530, Sumera Priyadarsini wrote: > Using snprintf() for show() methods holds the risk of buffer overrun > as snprintf() does not know the PAGE_SIZE maximum of the temporary > buffer used to output sysfs content. > > This patchset is a series of Coccinelle

[PATCH 5/5] gpu: drm: amdgpu: Replace snprintf() with sysfs_emit()

2020-10-22 Thread Sumera Priyadarsini
Using snprintf() for show() methods holds the risk of buffer overrun as snprintf() does not know the PAGE_SIZE maximum of the temporary buffer used to output sysfs content. Modify amdgpu_ras.c to use sysfs_emit() instead which knows the size of the temporary buffer. Issue found with Coccinelle.

[Outreachy kernel][PATCH 0/5] drm/amdgpu: Replace snprintf() with sysfs_emit

2020-10-22 Thread Sumera Priyadarsini
Using snprintf() for show() methods holds the risk of buffer overrun as snprintf() does not know the PAGE_SIZE maximum of the temporary buffer used to output sysfs content. This patchset is a series of Coccinelle cleanups across the staging directory to convert snprintf with scnprintf in the

Re: [Outreachy kernel] [PATCH 4/5] gpu: drm: amdgpu: Replace snprintf() with sysfs_emit()

2020-10-22 Thread Greg KH
On Thu, Oct 22, 2020 at 07:17:56PM +0530, Sumera Priyadarsini wrote: > Using snprintf() for show() methods holds the risk of buffer overrun > as snprintf() does not know the PAGE_SIZE maximum of the temporary > buffer used to output sysfs content. > > Modify amdgpu_psp.c to use sysfs_emit()

[PATCH 2/5] gpu: drm: amdgpu: Replace snprintf() with sysfs_emit()

2020-10-22 Thread Sumera Priyadarsini
Using snprintf() for show() methods holds the risk of buffer overrun as snprintf() does not know the PAGE_SIZE maximum of the temporary buffer used to output sysfs content. Modify amdgpu_device.c to use sysfs_emit() instead which knows the size of the temporary buffer. Issue found with

[PATCH 4/5] gpu: drm: amdgpu: Replace snprintf() with sysfs_emit()

2020-10-22 Thread Sumera Priyadarsini
Using snprintf() for show() methods holds the risk of buffer overrun as snprintf() does not know the PAGE_SIZE maximum of the temporary buffer used to output sysfs content. Modify amdgpu_psp.c to use sysfs_emit() instead which knows the size of the temporary buffer. Issue found with Coccinelle.

[PATCH 1/5] gpu: drm: amdgpu: Replace snprintf() with sysfs_emit()

2020-10-22 Thread Sumera Priyadarsini
Using snprintf() for show() methods holds the risk of buffer overrun as snprintf() does not know the PAGE_SIZE maximum of the temporary buffer used to output sysfs content. Modify amdgpu_atombios.c to use sysfs_emit() instead which knows the size of the temporary buffer. Issue found with

[PATCH 3/5] gpu: drm: amdgpu: Replace snprintf() with sysfs_emit()

2020-10-22 Thread Sumera Priyadarsini
Using snprintf() for show() methods holds the risk of buffer overrun as snprintf() does not know the PAGE_SIZE maximum of the temporary buffer used to output sysfs content. Modify amdgpu_gtt_mgr.c to use sysfs_emit() instead which knows the size of the temporary buffer. Issue found with

Re: [PATCH] drm/amd/pm: fix the wrong fan speed in fan1_input

2020-10-22 Thread Alex Deucher
On Thu, Oct 22, 2020 at 9:10 AM Alex Deucher wrote: > > On Thu, Oct 22, 2020 at 9:09 AM Alex Deucher wrote: > > > > On Thu, Oct 22, 2020 at 2:10 AM Feng, Kenneth wrote: > > > > > > [AMD Official Use Only - Internal Distribution Only] > > > > > > Hi Alex, > > > As I confirmed, this is Arcturus

Re: [PATCH] drm/amd/pm: fix the wrong fan speed in fan1_input

2020-10-22 Thread Alex Deucher
On Thu, Oct 22, 2020 at 9:09 AM Alex Deucher wrote: > > On Thu, Oct 22, 2020 at 2:10 AM Feng, Kenneth wrote: > > > > [AMD Official Use Only - Internal Distribution Only] > > > > Hi Alex, > > As I confirmed, this is Arcturus specific. > > On Arcturus we don't have fan control feature and the fan

Re: [PATCH v3 10/11] drm/amd/display: Expose modifiers.

2020-10-22 Thread Bas Nieuwenhuizen
You are totally right! Added that locally. Thanks! On Thu, Oct 22, 2020 at 7:51 AM Alex Deucher wrote: > > On Wed, Oct 21, 2020 at 7:31 PM Bas Nieuwenhuizen > wrote: > > > > This expose modifier support on GFX9+. > > > > Only modifiers that can be rendered on the current GPU are > > added.

Re: [PATCH v5 08/10] drm/gem: Store client buffer mappings as struct dma_buf_map

2020-10-22 Thread Daniel Vetter
On Thu, Oct 22, 2020 at 11:18 AM Thomas Zimmermann wrote: > > Hi > > On 22.10.20 10:49, Daniel Vetter wrote: > > On Tue, Oct 20, 2020 at 02:20:44PM +0200, Thomas Zimmermann wrote: > >> Kernel DRM clients now store their framebuffer address in an instance > >> of struct dma_buf_map. Depending on

Re: [PATCH v5 08/10] drm/gem: Store client buffer mappings as struct dma_buf_map

2020-10-22 Thread Thomas Zimmermann
Hi On 22.10.20 10:49, Daniel Vetter wrote: > On Tue, Oct 20, 2020 at 02:20:44PM +0200, Thomas Zimmermann wrote: >> Kernel DRM clients now store their framebuffer address in an instance >> of struct dma_buf_map. Depending on the buffer's location, the address >> refers to system or I/O memory. >>

kgdb_breakpoint() usage leads to kernel panic

2020-10-22 Thread Takashi Iwai
Hi, we recently stumbled on a kernel crash in amdgpu [*], and the kernel messages indicated that it's from kgdb_breakpoint() call in ASSERT_CRITICAL() macro. Since CONFIG_KGDB=y is set on the openSUSE distro kernels, the breakpoint is enabled even though CONFIG_DEBUG_KERNEL_DC=n, and this leads

Re: [PATCH v5 10/10] drm/fb_helper: Support framebuffers in I/O memory

2020-10-22 Thread Daniel Vetter
On Thu, Oct 22, 2020 at 10:37:56AM +0200, Thomas Zimmermann wrote: > Hi > > On 22.10.20 10:05, Daniel Vetter wrote: > > On Tue, Oct 20, 2020 at 02:20:46PM +0200, Thomas Zimmermann wrote: > >> At least sparc64 requires I/O-specific access to framebuffers. This > >> patch updates the fbdev console

Re: [PATCH v5 08/10] drm/gem: Store client buffer mappings as struct dma_buf_map

2020-10-22 Thread Daniel Vetter
On Tue, Oct 20, 2020 at 02:20:44PM +0200, Thomas Zimmermann wrote: > Kernel DRM clients now store their framebuffer address in an instance > of struct dma_buf_map. Depending on the buffer's location, the address > refers to system or I/O memory. > > Callers of drm_client_buffer_vmap() receive a

Re: [PATCH v5 10/10] drm/fb_helper: Support framebuffers in I/O memory

2020-10-22 Thread Thomas Zimmermann
Hi On 22.10.20 10:05, Daniel Vetter wrote: > On Tue, Oct 20, 2020 at 02:20:46PM +0200, Thomas Zimmermann wrote: >> At least sparc64 requires I/O-specific access to framebuffers. This >> patch updates the fbdev console accordingly. >> >> For drivers with direct access to the framebuffer memory,

Re: [PATCH v5 10/10] drm/fb_helper: Support framebuffers in I/O memory

2020-10-22 Thread Daniel Vetter
On Tue, Oct 20, 2020 at 02:20:46PM +0200, Thomas Zimmermann wrote: > At least sparc64 requires I/O-specific access to framebuffers. This > patch updates the fbdev console accordingly. > > For drivers with direct access to the framebuffer memory, the callback > functions in struct fb_ops test for

RE: [PATCH] drm/amd/pm: fix the wrong fan speed in fan1_input

2020-10-22 Thread Feng, Kenneth
[AMD Official Use Only - Internal Distribution Only] Hi Alex, As I confirmed, this is Arcturus specific. On Arcturus we don't have fan control feature and the fan speed is always 0 from the metrics table. For navi series, I'm sure we don't need it. Looks like we can't just revert it. Thanks.