Re: [PATCH 2/2] drm/amdgpu: Use drm_print_memory_stats helper from fdinfo

2024-10-07 Thread Alex Deucher
Applied the series. Thanks! Alex On Thu, May 30, 2024 at 6:20 AM Tvrtko Ursulin wrote: > > > Hi, > > On 20/05/2024 12:13, Tvrtko Ursulin wrote: > > From: Tvrtko Ursulin > > > > Convert fdinfo memory stats to use the common drm_print_memory_stats > > helper. > > > > This achieves alignment with

Re: [PATCH 3/3] drm/amdgpu: Remove the while loop from amdgpu_job_prepare_job

2024-10-07 Thread Alex Deucher
On Mon, Oct 7, 2024 at 8:52 AM Tvrtko Ursulin wrote: > > > On 04/10/2024 15:15, Alex Deucher wrote: > > Applied. Thanks! > > Thanks Alex! > > Could you perhaps also merge > https://lore.kernel.org/amd-gfx/20240813135712.82611-1-tursu...@igalia.com/ > via your tree? If it still applies that is. J

Re: [PATCH 11/18] drm/amdgpu: power vcn 2_5 by instance

2024-10-07 Thread Lazar, Lijo
On 10/7/2024 7:47 PM, Alex Deucher wrote: > On Mon, Oct 7, 2024 at 9:58 AM Lazar, Lijo wrote: >> >> >> >> On 10/7/2024 7:03 PM, Boyuan Zhang wrote: >>> >>> On 2024-10-07 01:22, Lazar, Lijo wrote: On 10/5/2024 12:14 AM, boyuan.zh...@amd.com wrote: > From: Boyuan Zhang > >

Re: [PATCH 11/18] drm/amdgpu: power vcn 2_5 by instance

2024-10-07 Thread Alex Deucher
On Mon, Oct 7, 2024 at 9:58 AM Lazar, Lijo wrote: > > > > On 10/7/2024 7:03 PM, Boyuan Zhang wrote: > > > > On 2024-10-07 01:22, Lazar, Lijo wrote: > >> > >> On 10/5/2024 12:14 AM, boyuan.zh...@amd.com wrote: > >>> From: Boyuan Zhang > >>> > >>> For vcn 2_5, add ip_block for each vcn instance dur

Re: [PATCH 11/18] drm/amdgpu: power vcn 2_5 by instance

2024-10-07 Thread Christian König
Am 07.10.24 um 16:17 schrieb Alex Deucher: On Mon, Oct 7, 2024 at 9:58 AM Lazar, Lijo wrote: On 10/7/2024 7:03 PM, Boyuan Zhang wrote: On 2024-10-07 01:22, Lazar, Lijo wrote: On 10/5/2024 12:14 AM, boyuan.zh...@amd.com wrote: From: Boyuan Zhang For vcn 2_5, add ip_block for each vcn instan

Re: NULL pointer dereference with kernel 6.12.0-rc1 and ARUBA GPU

2024-10-07 Thread Thomas Zimmermann
Hi Am 30.09.24 um 19:54 schrieb Christian König: I've been running into the same issue as well. Going to take a look. Any results? Christian. Am 30.09.24 um 17:25 schrieb Arthur Marsh: [   13.069630] [drm] radeon kernel modesetting enabled. [   13.069681] radeon :00:01.0: vgaarb: deac

Re: [PATCH] drm/radeon: add late_register for connector

2024-10-07 Thread Christian König
That's the issue I was working on, give me 10 minutes to send out the fix. Regards, Christian. Am 07.10.24 um 06:49 schrieb Hoi Pok Wu: Thank you. I am looking at the problem now. On Mon, Oct 7, 2024 at 1:37 AM Christophe Leroy wrote: Le 06/10/2024 à 18:56, Christian Zigotzky a écrit : On

Re: [PATCH] drm/amdgpu: fix typos

2024-10-07 Thread Alex Deucher
Applied. Thanks! On Sun, Oct 6, 2024 at 7:28 AM Andrew Kreimer wrote: > > Fix typos in comments: "wether -> whether". > > Signed-off-by: Andrew Kreimer > --- > drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 4 ++-- > drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 4 ++-- > drivers/gpu/drm/amd/amdgpu/gfx_v

[PATCH] drm/amdgpu: Wait for reset on init completion

2024-10-07 Thread Lijo Lazar
When reset on initialization is requested, wait for the reset to finish. In cases where module is loaded after boot, this makes sure all initialization work is done after a successful return of modprobe. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 9 - 1 file

Re: [PATCH 11/18] drm/amdgpu: power vcn 2_5 by instance

2024-10-07 Thread Boyuan Zhang
On 2024-10-07 01:22, Lazar, Lijo wrote: On 10/5/2024 12:14 AM, boyuan.zh...@amd.com wrote: From: Boyuan Zhang For vcn 2_5, add ip_block for each vcn instance during discovery stage. And only powering on/off one of the vcn instance using the instance value stored in ip_block, instead of pow

Re: [PATCH 1/2] drm/amdgpu: move error log from ring write to commit

2024-10-07 Thread Christian König
Am 03.10.24 um 10:13 schrieb Sunil Khatri: Move the error message from ring write as an optimization to avoid printing that message on every write instead print once during commit if it exceeds write the allocated size i.e ring->count_dw. Also we do not want to log the error message in between a

Re: [PATCH 2/2] drm/amdgpu: no need to log error in multi ring write

2024-10-07 Thread Christian König
Am 03.10.24 um 10:13 schrieb Sunil Khatri: No need to log error in multi ring write as its taken care during ring commit. Signed-off-by: Sunil Khatri Suggested-by: Christian König Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 3 --- 1 file changed, 3 delet

Re: [PATCH v2 1/2] drm/amdgpu: move error log from ring write to commit

2024-10-07 Thread Christian König
Am 03.10.24 um 10:28 schrieb Sunil Khatri: Move the error message from ring write as an optimization to avoid printing that message on every write instead print once during commit if it exceeds write the allocated size i.e ring->count_dw. Also we do not want to log the error message in between a

[PATCH] drm/radeon: add late_register for connector

2024-10-07 Thread Christian Zigotzky
On 06 October 2024 at 7:37pm, Christophe Leroy wrote: Le 06/10/2024 à 18:56, Christian Zigotzky a écrit : Hello Wu Hoi Pok, Thanks a lot for your patch. Unfortunately there is a new issue after patching the RC1. Could you please fix the following issue? Thanks, Christian --- Linux fienix

Re: [PATCH] drm/radeon: add late_register for connector

2024-10-07 Thread Christophe Leroy
Le 06/10/2024 à 18:56, Christian Zigotzky a écrit : On 03 October 2024 at 08:06 am, Wu Hoi Pok wrote: This is a fix patch not tested yet, for a bug I introduce in previous rework of radeon driver. The bug is a null dereference in 'aux.dev', which is the 'device' not registered, resulting in k

Re: [PATCH 08/28] drm/loongson: Use video aperture helpers

2024-10-07 Thread Sui Jingfeng
Hi, On 2024/9/30 21:03, Thomas Zimmermann wrote: DRM's aperture functions have long been implemented as helpers under drivers/video/ for use with fbdev. Avoid the DRM wrappers by calling the video functions directly. Okay! Sometimes the aperture_remove_conflicting_devices() is more easier to

[bug report] drm/amdgpu/mes: use ring for kernel queue submission

2024-10-07 Thread Dan Carpenter
Hello Jack Xiao, Commit d0c423b64765 ("drm/amdgpu/mes: use ring for kernel queue submission") from Mar 27, 2020 (linux-next), leads to the following Smatch static checker warning: drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c:1240 amdgpu_mes_add_ring() warn: double unlock '&adev->mes.mu

Re: [PATCH 13/26] drm/amd/display: Clear update flags after update has been applied

2024-10-07 Thread Matthew Schwartz
On Fri, 4 Oct 2024, Melissa Wen wrote: On 03/10/2024 20:33, Rodrigo Siqueira wrote: From: Josip Pavic [Why] Since the surface/stream update flags aren't cleared after applying updates, those same updates may be applied again in a future call to update surfaces/streams for surfaces/

[PATCH] drm/amd/display: Remove unused regamma functions

2024-10-07 Thread linux
From: "Dr. David Alan Gilbert" calculate_user_regamma_coeff() and calculate_user_regamma_ramp() were added in 2018 in commit 55a01d4023ce ("drm/amd/display: Add user_regamma to color module") but never used. Remove them and their helpers. Signed-off-by: Dr. David Alan Gilbert --- .../amd/dis

Re: [PATCH v2 1/2] drm/ttm: Change ttm_device_init to use a struct instead of multiple bools

2024-10-07 Thread Thomas Hellström
On Thu, 2024-10-03 at 00:28 -0400, Zack Rusin wrote: > On Wed, Oct 2, 2024 at 8:24 AM Thomas Hellström > wrote: > > > > The ttm_device_init funcition uses multiple bool arguments. That > > means > > readability in the caller becomes poor, and all callers need to > > change if > > yet another bool

[PATCH] drm/amdgpu: prevent BO_HANDLES error from being overwritten

2024-10-07 Thread Mohammed Anees
Before this patch, if multiple BO_HANDLES chunks were submitted, the error -EINVAL would be correctly set but could be overwritten by the return value from amdgpu_cs_p1_bo_handles(). This patch ensures that once an error condition is detected, the function returns immediately, avoiding the overwrit

Re: [PATCH v2 1/2] drm/ttm: Change ttm_device_init to use a struct instead of multiple bools

2024-10-07 Thread Thomas Hellström
On Wed, 2024-10-02 at 14:54 +0200, Thomas Hellström wrote: > On Wed, 2024-10-02 at 14:45 +0200, Christian König wrote: > > Am 02.10.24 um 14:24 schrieb Thomas Hellström: > > > The ttm_device_init funcition uses multiple bool arguments. That > > > means > > > readability in the caller becomes poor,

Kernel doesn't boot after DRM updates (drm-next-2024-09-19)

2024-10-07 Thread Christian Zigotzky
On 06 October 2024 at 8:01pm, Christian Zigotzky wrote: On 06 October 2024 at 7:37pm, Christophe Leroy wrote: Le 06/10/2024 à 18:56, Christian Zigotzky a écrit : Hello Wu Hoi Pok, Thanks a lot for your patch. Unfortunately there is a new issue after patching the RC1. Could you please fix the

Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()

2024-10-07 Thread Ulf Hansson
On Fri, 4 Oct 2024 at 11:41, Sakari Ailus wrote: > > Hello everyone, > > This set will switch the users of pm_runtime_put_autosuspend() to > __pm_runtime_put_autosuspend() while the former will soon be re-purposed > to include a call to pm_runtime_mark_last_busy(). The two are almost > always used

[PATCH] drm/radeon: add late_register for connector

2024-10-07 Thread Christian Zigotzky
On 03 October 2024 at 08:06 am, Wu Hoi Pok wrote: This is a fix patch not tested yet, for a bug I introduce in previous rework of radeon driver. The bug is a null dereference in 'aux.dev', which is the 'device' not registered, resulting in kernel panic. By having 'late_register', the connector sh

[PATCH v2] drm/radeon: add late_register for connector - Please test

2024-10-07 Thread Christian Zigotzky
Hi All, I compiled a new RC1 of kernel 6.12 with this patch today. Please test it. Downloads: - https://github.com/chzigotzky/kernels/releases/tag/v6.12.0-rc1-2 - https://www.xenosoft.de/linux-image-6.12-rc1-2-X1000_X5000.tar.gz Thanks, Christian On 04 October 2024 at 4:00pm, Alex Deucher wro

[PATCH] drm/amdgpu: fix typos

2024-10-07 Thread Andrew Kreimer
Fix typos in comments: "wether -> whether". Signed-off-by: Andrew Kreimer --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 4 ++-- drivers/gpu/drm/amd/amdg

Re: [PATCH 3/3] drm/amdgpu: Remove the while loop from amdgpu_job_prepare_job

2024-10-07 Thread Tvrtko Ursulin
On 04/10/2024 15:15, Alex Deucher wrote: Applied. Thanks! Thanks Alex! Could you perhaps also merge https://lore.kernel.org/amd-gfx/20240813135712.82611-1-tursu...@igalia.com/ via your tree? If it still applies that is. Regards, Tvrtko On Fri, Oct 4, 2024 at 3:28 AM Tvrtko Ursulin w

[PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()

2024-10-07 Thread Sakari Ailus
Hello everyone, This set will switch the users of pm_runtime_put_autosuspend() to __pm_runtime_put_autosuspend() while the former will soon be re-purposed to include a call to pm_runtime_mark_last_busy(). The two are almost always used together, apart from bugs which are likely common. Going forwa

[PATCH 11/51] drm/radeon: Switch to __pm_runtime_put_autosuspend()

2024-10-07 Thread Sakari Ailus
pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend(). Signed-off-by: Sakari Ailus --- drivers/g

[PATCH-next] Fix unintentional integer overflow

2024-10-07 Thread Advait Dhamorikar
Fix shift-count-overflow when creating mask. The expression's value may not be what the programmer intended, because the expression is evaluated using a narrower integer type. Fixes: f0b19b84d391 ("drm/amdgpu: add amdgpu_jpeg_sched_mask debugfs") Signed-off-by: Advait Dhamorikar --- drivers/gpu/

[PATCH 09/51] drm/amd: Switch to __pm_runtime_put_autosuspend()

2024-10-07 Thread Sakari Ailus
pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend(). Signed-off-by: Sakari Ailus --- drivers/g

Re: [PATCH-next] Fix unintentional integer overflow

2024-10-07 Thread Shuah Khan
On 10/4/24 03:15, Sundararaju, Sathishkumar wrote: All occurrences of this error fix should have been together in a single patch both in _get and _set callbacks corresponding to f0b19b84d391, please avoid separate patch for each occurrence. Sorry Alex, I missed to note this yesterday. Regar

Re: [PATCH-next] Fix unintentional integer overflow

2024-10-07 Thread Advait Dhamorikar
Hi Sathish, > Please collate the changes together with Lijo's suggestion as well, > "1ULL <<" instead of typecast, there are 3 occurrences of the error in > f0b19b84d391. I could only observe two instances of this error in f0b19b84d391 at: 'mask = (1 << (adev->jpeg.num_jpeg_inst * adev->jpeg.num_

Re: [PATCH] drm/radeon: add late_register for connector

2024-10-07 Thread Hoi Pok Wu
Thank you. I am looking at the problem now. On Mon, Oct 7, 2024 at 1:37 AM Christophe Leroy wrote: > > > > Le 06/10/2024 à 18:56, Christian Zigotzky a écrit : > > On 03 October 2024 at 08:06 am, Wu Hoi Pok wrote: > >> This is a fix patch not tested yet, > >> for a bug I introduce in previous rewo

Re: [PATCH] drm/radeon: add late_register for connector

2024-10-07 Thread Alex Deucher
This is a different issue related to the radeon ttm to gem conversion. @Christian Koenig is working on the fix. Alex On Mon, Oct 7, 2024 at 4:23 AM Christophe Leroy wrote: > > > > Le 06/10/2024 à 18:56, Christian Zigotzky a écrit : > > On 03 October 2024 at 08:06 am, Wu Hoi Pok wrote: > >> This

Re: [PATCH v2 1/2] drm/amdgpu: move error log from ring write to commit

2024-10-07 Thread Khatri, Sunil
On 10/7/2024 7:18 PM, Christian König wrote: Am 03.10.24 um 10:28 schrieb Sunil Khatri: Move the error message from ring write as an optimization to avoid printing that message on every write instead print once during commit if it exceeds write the allocated size i.e ring->count_dw. Also we d

Re: [PATCH-next] Fix unintentional integer overflow

2024-10-07 Thread Christian König
Am 05.10.24 um 09:05 schrieb Advait Dhamorikar: Hi Sathish, Please collate the changes together with Lijo's suggestion as well, "1ULL <<" instead of typecast, there are 3 occurrences of the error in f0b19b84d391. I could only observe two instances of this error in f0b19b84d391 at: 'mask = (1 <

Re: [PATCH 11/18] drm/amdgpu: power vcn 2_5 by instance

2024-10-07 Thread Lazar, Lijo
On 10/7/2024 7:03 PM, Boyuan Zhang wrote: > > On 2024-10-07 01:22, Lazar, Lijo wrote: >> >> On 10/5/2024 12:14 AM, boyuan.zh...@amd.com wrote: >>> From: Boyuan Zhang >>> >>> For vcn 2_5, add ip_block for each vcn instance during discovery stage. >>> >>> And only powering on/off one of the vcn

Re: [PATCH 11/18] drm/amdgpu: power vcn 2_5 by instance

2024-10-07 Thread Alex Deucher
On Mon, Oct 7, 2024 at 10:32 AM Lazar, Lijo wrote: > > > > On 10/7/2024 7:47 PM, Alex Deucher wrote: > > On Mon, Oct 7, 2024 at 9:58 AM Lazar, Lijo wrote: > >> > >> > >> > >> On 10/7/2024 7:03 PM, Boyuan Zhang wrote: > >>> > >>> On 2024-10-07 01:22, Lazar, Lijo wrote: > > On 10/5/2024 1

[PATCH] drm/radeon: always set GEM function pointer

2024-10-07 Thread Christian König
Make sure to always set the GEM function pointer even for in kernel allocations. This fixes a NULL pointer deref caused by switching to GEM references. Signed-off-by: Christian König Fixes: fd69ef05029f ("drm/radeon: use GEM references instead of TTMs") --- drivers/gpu/drm/radeon/radeon_gem.c

Re: [PATCH] drm/radeon: always set GEM function pointer

2024-10-07 Thread Alex Deucher
Add a few people. This should fix the radeon ttm gem conversion. Alex On Mon, Oct 7, 2024 at 2:33 PM Christian König wrote: > > Make sure to always set the GEM function pointer even for in kernel > allocations. This fixes a NULL pointer deref caused by switching to GEM > references. > > Signe

Re: [PATCH] drm/amdgpu: partially revert powerplay `__counted_by` changes

2024-10-07 Thread Mario Limonciello
On 10/4/2024 09:17, Alex Deucher wrote: Ping? On Thu, Oct 3, 2024 at 10:06 AM Alex Deucher wrote: Partially revert commit 0ca9f757a0e2 ("drm/amd/pm: powerplay: Add `__counted_by` attribute for flexible arrays") The count attribute for these arrays does not get set until after the arrays are

Re: [PATCH] drm/radeon: always set GEM function pointer

2024-10-07 Thread Alex Deucher
On Mon, Oct 7, 2024 at 2:33 PM Christian König wrote: > > Make sure to always set the GEM function pointer even for in kernel > allocations. This fixes a NULL pointer deref caused by switching to GEM > references. > > Signed-off-by: Christian König > Fixes: fd69ef05029f ("drm/radeon: use GEM refe

Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()

2024-10-07 Thread Laurent Pinchart
Hi Ulf, On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote: > On Fri, 4 Oct 2024 at 11:41, Sakari Ailus > wrote: > > > > Hello everyone, > > > > This set will switch the users of pm_runtime_put_autosuspend() to > > __pm_runtime_put_autosuspend() while the former will soon be re-purposed

[PATCH] drm/amdgpu: fix dm_suspend/resume arguments to ip_block

2024-10-07 Thread Sunil Khatri
"build failure after merge of the amdgpu tree" dm_suspend/dm_resume functions argument mismatch not caught in validation as it was under config CONFIG_DEBUG_KERNEL_DC which wasnt enabled by default. Change argument from adev to ip_block. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/displ

Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()

2024-10-07 Thread Laurent Pinchart
Hi Ulf, On Tue, Oct 08, 2024 at 12:08:24AM +0200, Ulf Hansson wrote: > On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart wrote: > > On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote: > > > On Fri, 4 Oct 2024 at 11:41, Sakari Ailus wrote: > > > > > > > > Hello everyone, > > > > > > > > This s

[PATCH] drm/amdgpu: Remove extra check for CPX

2024-10-07 Thread Amber Lin
(num_xcc % adev->gmc.num_mem_partitions) == 0 is not a requirement for CPX. It breaks NPS4/CPX support on APU. Signed-off-by: Amber Lin --- drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c

Re: [PATCH AUTOSEL 6.11 72/76] drm/amdgpu: nuke the VM PD/PT shadow handling

2024-10-07 Thread Christian König
Hi Sasha, Am 04.10.24 um 20:17 schrieb Sasha Levin: From: Christian König [ Upstream commit 7181faaa4703705939580abffaf9cb5d6b50dbb7 ] This was only used as workaround for recovering the page tables after VRAM was lost and is no longer necessary after the function amdgpu_vm_bo_reset_state_mac

Re: [PATCH-next] Fix unintentional integer overflow

2024-10-07 Thread Christian König
Am 08.10.24 um 05:38 schrieb Advait Dhamorikar: Hi Christian, I am not sure if I correctly understood what you meant, just to clarify When you say this No, all of this are numerical problems where not taken into account the size of the destination type. Saying that all of that are basically j

Re: [PATCH] drm/amdgpu: fix dm_suspend/resume arguments to ip_block

2024-10-07 Thread Christian König
Am 08.10.24 um 05:59 schrieb Sunil Khatri: "build failure after merge of the amdgpu tree" dm_suspend/dm_resume functions argument mismatch not caught in validation as it was under config CONFIG_DEBUG_KERNEL_DC which wasnt enabled by default. Change argument from adev to ip_block. Signed-off-by:

Re: [PATCH v1] drm/amdgpu: Clean up duplicate ip_block object

2024-10-07 Thread Christian König
Am 03.10.24 um 15:49 schrieb Sunil Khatri: remove the duplicate ip_block object in the isp_hw_init function. Signed-off-by: Sunil Khatri You probably already pushed this, but Reviewed-by: Christian König anyway. Regards, Christian. --- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 -

Re: [PATCH v1] drm/amdgpu: Clean up duplicate ip_block object

2024-10-07 Thread Khatri, Sunil
Yes Already Pushed. Thanks for the review. On 10/8/2024 11:47 AM, Christian König wrote: Am 03.10.24 um 15:49 schrieb Sunil Khatri: remove the duplicate ip_block object in the isp_hw_init function. Signed-off-by: Sunil Khatri You probably already pushed this, but Reviewed-by: Christian Kön