RE: [PATCH v3 3/3] drm/amdgpu/sdma4.4.2: implement ring reset callback for sdma4.4.2

2024-10-14 Thread Deucher, Alexander
[AMD Official Use Only - AMD Internal Distribution Only] > -Original Message- > From: Zhu, Jiadong > Sent: Wednesday, October 9, 2024 5:23 AM > To: Lazar, Lijo ; amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander > Subject: RE: [PATCH v3 3/3] drm/amdgpu/sdma4.4.2: implement ring rese

[PATCH] drm/amdgpu: Save VCN shared memory with init reset

2024-10-14 Thread Lijo Lazar
VCN shared memory is in framebuffer and there are some flags initialized during sw_init. Ideally, such programming should be during hw_init. Make sure the flags are saved during reset on initialization since that reset will affect frame buffer region. For clarity, separate it out to another functi

RE: [PATCH] drm/amdgpu: Zero-initialize mqd backup memory

2024-10-14 Thread Wang, Yang(Kevin)
[AMD Official Use Only - AMD Internal Distribution Only] Reviewed-by: Yang Wang Best Regards, Kevin -Original Message- From: amd-gfx On Behalf Of Lijo Lazar Sent: Tuesday, October 15, 2024 1:34 PM To: amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Deucher, Alexander ; Koenig, Chri

Re: [PATCH v2] drm/amdkfd: change kfd process kref count at creation

2024-10-14 Thread Zhu Lingshan
On 10/14/2024 11:07 PM, Chen, Xiaogang wrote: > > On 10/13/2024 8:55 PM, Zhu Lingshan wrote: >> On 10/13/2024 1:30 AM, Chen, Xiaogang wrote: >>> On 10/11/2024 9:56 PM, Zhu Lingshan wrote: On 10/11/2024 10:41 PM, Xiaogang.Chen wrote: > From: Xiaogang Chen > > kfd process kref count

Re: [PATCH v2] drm/amdkfd: change kfd process kref count at creation

2024-10-14 Thread Chen, Xiaogang
On 10/14/2024 9:51 PM, Zhu Lingshan wrote: On 10/14/2024 11:07 PM, Chen, Xiaogang wrote: On 10/13/2024 8:55 PM, Zhu Lingshan wrote: On 10/13/2024 1:30 AM, Chen, Xiaogang wrote: On 10/11/2024 9:56 PM, Zhu Lingshan wrote: On 10/11/2024 10:41 PM, Xiaogang.Chen wrote: From: Xiaogang Chen kfd p

RE: [PATCH] drm/amdgpu: enable userqueue support for GFX12

2024-10-14 Thread Deucher, Alexander
[AMD Official Use Only - AMD Internal Distribution Only] > -Original Message- > From: Sharma, Shashank > Sent: Thursday, October 10, 2024 2:08 PM > To: amd-gfx@lists.freedesktop.org > Cc: Somalapuram, Amaranath ; Deucher, > Alexander ; Koenig, Christian > ; Yadav, Arvind ; Sharma, > Shash

[PATCH] drm/amdgpu: Zero-initialize mqd backup memory

2024-10-14 Thread Lijo Lazar
Zero-initialize mqd backup memory, otherwise the check for 'already-backed-up' could go wrong. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/dr

RE: [PATCH 1/2] drm/sched: adding a new scheduling policy

2024-10-14 Thread Deucher, Alexander
[AMD Official Use Only - AMD Internal Distribution Only] > -Original Message- > From: Zhang, Jesse(Jie) > Sent: Friday, October 11, 2024 9:45 PM > To: Koenig, Christian ; dri- > de...@lists.freedesktop.org; amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander > Subject: RE: [PATCH 1/2]

RE: [PATCH] drm/amdgpu: Use SPX as default in partition config

2024-10-14 Thread Kamal, Asad
[AMD Official Use Only - AMD Internal Distribution Only] Reviewed-by: Asad Kamal Thanks & Regards Asad -Original Message- From: Lazar, Lijo Sent: Monday, October 14, 2024 2:49 PM To: amd-gfx@lists.freedesktop.org; Kamal, Asad Cc: Zhang, Hawking ; Deucher, Alexander ; Zhou, Hao (Clair

[PATCH] amdkfd: Explicitly specify data type amdkfd_process_info in related functions

2024-10-14 Thread Zhu Lingshan
This commit specifies data type struct amdkfd_process_info rather than general void* in ralted functions. kfd_process->kgd_process_info is initialized in init_kfd_vm() by such code: static int init_kfd_vm(struct amdgpu_vm *vm, void **process_info, struct dma_fence **ef) {

[PATCH v4 08/12] drm/amdgpu: Suspend and resume internal clients with client helpers

2024-10-14 Thread Thomas Zimmermann
Replace calls to drm_fb_helper_set_suspend_unlocked() with calls to the client functions drm_client_dev_suspend() and drm_client_dev_resume(). Any registered in-kernel client will now receive suspend and resume events. Signed-off-by: Thomas Zimmermann Cc: Alex Deucher Cc: "Christian König" Cc:

[PATCH v4 06/12] drm/client: Move client event handlers to drm_client_event.c

2024-10-14 Thread Thomas Zimmermann
A number of DRM-client functions serve as entry points from device operations to client code. Moving them info a separate file will later allow for a more fine-grained kernel configuration. For most of the users it is sufficient to include instead of the full driver-side interface in v2: - renam

[PATCH v4 09/12] drm/nouveau: Suspend and resume clients with client helpers

2024-10-14 Thread Thomas Zimmermann
Replace calls to drm_fb_helper_set_suspend_unlocked() with calls to the client functions drm_client_dev_suspend() and drm_client_dev_resume(). Any registered in-kernel client will now receive suspend and resume events. Signed-off-by: Thomas Zimmermann Cc: Karol Herbst Cc: Lyude Paul Cc: Danilo

[PATCH v4 07/12] drm/client: Move suspend/resume into DRM client callbacks

2024-10-14 Thread Thomas Zimmermann
Suspend and resume is still tied to fbdev emulation. Modeset helpers and several drivers call drm_fb_helper_set_suspend_unlocked() to inform the fbdev client about suspend/resume events. To make it work with arbitrary clients, add per-client callback functions for suspend and resume. Implement the

[PATCH v4 10/12] drm/radeon: Suspend and resume clients with client helpers

2024-10-14 Thread Thomas Zimmermann
Replace calls to radeon_fbdev_set_suspend() with calls to the client functions drm_client_dev_suspend() and drm_client_dev_resume(). Any registered in-kernel client will now receive suspend and resume events. v4: - refer to radeon_fbdev_set_suspend() in commit description (Jonathan) Signed-off-by

[PATCH v4 00/12] drm: Introduce DRM client library

2024-10-14 Thread Thomas Zimmermann
With the next DRM client coming soon (drm_log) and most of DRM's fbdev emulation consolidated in a few places, it is time to provide a single place for the clients. The base client code and client event handling is now optional. It still remains in the DRM core, which simplifies module dependencie

[PATCH v4 03/12] drm/fbdev-dma: Select FB_DEFERRED_IO

2024-10-14 Thread Thomas Zimmermann
Commit 808a40b69468 ("drm/fbdev-dma: Implement damage handling and deferred I/O") added deferred I/O for fbdev-dma. Also select the Kconfig symbol FB_DEFERRED_IO (via FB_DMAMEM_HELPERS_DEFERRED). Fixes build errors about missing fbdefio, such as drivers/gpu/drm/drm_fbdev_dma.c:218:26: error: 'stru

[PATCH v4 02/12] drm/xe: Select DRM_CLIENT_SELECTION

2024-10-14 Thread Thomas Zimmermann
The Kconfig token DRM_CLIENT_SELECTION will make DRM clients available to drivers. Select it from xe. Signed-off-by: Thomas Zimmermann Cc: Lucas De Marchi Cc: "Thomas Hellström" Cc: Rodrigo Vivi Reviewed-by: Jonathan Cavitt --- drivers/gpu/drm/xe/Kconfig | 1 + 1 file changed, 1 insertion(+)

[PATCH v4 04/12] drm/fbdev: Select fbdev I/O helpers from modules that require them

2024-10-14 Thread Thomas Zimmermann
Fbdev emulation for SHMEM and TTM requires helpers from the fbdev subsystem. Select them from the modules that use them instead of the core DRM module. Signed-off-by: Thomas Zimmermann Reviewed-by: Jonathan Cavitt --- drivers/gpu/drm/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(

[PATCH v4 05/12] drm/fbdev: Store fbdev module parameters in separate file

2024-10-14 Thread Thomas Zimmermann
The fbdev code does not really belong into drm_kms_helper.ko. But there are module parameters that control the behavior of the fbdev emulation. It is not possible to remove them from the module without breaking someone's installation. Therefore move the fbdev module parameters to drm_kms_helper_co

[PATCH v4 12/12] drm/client: Add client-lib module

2024-10-14 Thread Thomas Zimmermann
Add drm_client_lib.ko to contain DRM's built-in client. Move the existing client for fbdev emulation into the new module. Protect the new module behind CONFIG_DRM_CLIENT_LIB. The Kconfig rules separate the DRM drivers from the DRM clients. A driver can opt into the default clients, but the user co

[PATCH v4 11/12] drm/client: Make client support optional

2024-10-14 Thread Thomas Zimmermann
Only build client code if DRM_CLIENT has been selected. Automatially do so if one of the default clients has been enabled. If client support has been disabled, the helpers for client-related events are empty and the regular client functions are not present. Amdgpu has an internal DRM client, so it

[PATCH v4 01/12] drm/i915: Select DRM_CLIENT_SELECTION

2024-10-14 Thread Thomas Zimmermann
The Kconfig token DRM_CLIENT_SELECTION will make DRM clients available to drivers. Select it from i915. Signed-off-by: Thomas Zimmermann Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Reviewed-by: Jonathan Cavitt --- drivers/gpu/drm/i915/Kconfig | 1 + 1 file change

[PATCH v2 2/2] drm/amdgpu: clean up the suspend_complete

2024-10-14 Thread Prike Liang
To check the status of S3 suspend completion, use the PM core pm_suspend_global_flags bit(1) to detect S3 abort events. Therefore, clean up the AMDGPU driver's private flag suspend_complete. Signed-off-by: Prike Liang --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 -- drivers/gpu/drm/amd/amdgpu

[PATCH v2 1/2] drm/amdgpu: correct the S3 abort check condition

2024-10-14 Thread Prike Liang
In the normal S3 entry, the TOS cycle counter is not reset during BIOS execution the _S3 method, so it doesn't determine whether the _S3 method is executed exactly. Howerver, the PM core performs the S3 suspend will set the PM_SUSPEND_FLAG_FW_RESUME bit if all the devices suspend successfully. Ther

[PATCH] drm/amdgpu: Use SPX as default in partition config

2024-10-14 Thread Lijo Lazar
In certain cases - ex: when a reset is required on initialization - XCP manager won't have a valid partition mode. In such cases, use SPX as the default selected mode for which partition configuration details are populated. Signed-off-by: Lijo Lazar Reported-by: Hao Zhou Fixes: c7de57033d9b ("d

[PATCH] drm/radeon: Fix encoder->possible_clones

2024-10-14 Thread Ville Syrjala
From: Ville Syrjälä Include the encoder itself in its possible_clones bitmask. In the past nothing validated that drivers were populating possible_clones correctly, but that changed in commit 74d2aacbe840 ("drm: Validate encoder->possible_clones"). Looks like radeon never got the memo and is stil

Re: [PATCH v3 07/12] drm/client: Move suspend/resume into DRM client callbacks

2024-10-14 Thread Thomas Zimmermann
Hi Am 08.10.24 um 23:21 schrieb Cavitt, Jonathan: -Original Message- From: Intel-xe On Behalf Of Thomas Zimmermann Sent: Tuesday, October 8, 2024 4:59 AM To: sim...@ffwll.ch; airl...@gmail.com; javi...@redhat.com; jfale...@redhat.com Cc: dri-de...@lists.freedesktop.org; amd-gfx@lists.f

re: drm/amd/display: Introduce DML2

2024-10-14 Thread Colin King (gmail)
Hi, Static analysis on linux-next has found a potential issue in function dml_rq_dlg_get_rq_reg in drivers/gpu/drm/amd/display/dc/dml2/dml_display_rq_dlg_calc.c The issue is as follows: if (min_meta_chunk_bytes == 0) rq_regs->rq_regs_l.min_meta_chunk_size = 0;

Re: [PATCH] drm/amd/display: Disable PSR-SU on Parade 08-01 TCON too

2024-10-14 Thread Stuart Hayhurst
Hi, can this be considered again please? Still facing issues with the 660M in my Lenovo Yoga 7 14ARB7. This fixes the weird behaviour I have with black screens, back-traces and flickering.

Re: [PATCHES] drm/radeon issues

2024-10-14 Thread Jeff Johnson
On 10/10/24 06:57, Christian Zigotzky wrote: > Hi All, > > There is another issue with the Radeon DRM driver but there is already a > patch available for this issue. > > Link: > https://lists.freedesktop.org/archives/dri-devel/2024-October/473314.html > > I compiled a new RC2 of kernel 6.12 wi

[PATCH] drm/amd/display: Remove last parts of timing_trace

2024-10-14 Thread linux
From: "Dr. David Alan Gilbert" Commit c2c2ce1e9623 ("drm/amd/display: Optimize passive update planes.") removed the last caller of context_timing_trace. Remove it. With that gone, no one is now looking at the 'timing_trace' flag, remove it and all the places that set it. Signed-off-by: Dr. Davi

[PATCHES] drm/radeon issues

2024-10-14 Thread Christian Zigotzky
On 11 October 2024 at 01:49am, Jeff Johnson wrote: Can you provide links to all 3 patches? 6.12-rc2 was back merged to my ath.git project, but then my laptop stopped booting correctly and I discovered a few Radeon KASAN reports. Based upon my search of lore I found: 20241003060650.18454-1-wuhoi

[PATCH next] drm/amdgpu: Fix off by one in current_memory_partition_show()

2024-10-14 Thread Dan Carpenter
The >= ARRAY_SIZE() should be > ARRAY_SIZE() to prevent an out of bounds read. Fixes: 012be6f22c01 ("drm/amdgpu: Add sysfs interfaces for NPS mode") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver

Re: [PATCHES] drm/radeon issues

2024-10-14 Thread Alex Deucher
On Thu, Oct 10, 2024 at 11:54 PM Christian Zigotzky wrote: > > On 11 October 2024 at 01:49am, Jeff Johnson wrote: > > Can you provide links to all 3 patches? > > 6.12-rc2 was back merged to my ath.git project, but then my laptop > stopped booting correctly and I discovered a few Radeon KASAN repo

Re: [PATCH v2] drm/amdkfd: change kfd process kref count at creation

2024-10-14 Thread Chen, Xiaogang
On 10/13/2024 8:55 PM, Zhu Lingshan wrote: On 10/13/2024 1:30 AM, Chen, Xiaogang wrote: On 10/11/2024 9:56 PM, Zhu Lingshan wrote: On 10/11/2024 10:41 PM, Xiaogang.Chen wrote: From: Xiaogang Chen kfd process kref count(process->ref) is initialized to 1 by kref_init. After it is created not

Re: [PATCH] drm/radeon: Fix encoder->possible_clones

2024-10-14 Thread Alex Deucher
Applied. Thanks! Alex On Mon, Oct 14, 2024 at 12:09 PM Ville Syrjala wrote: > > From: Ville Syrjälä > > Include the encoder itself in its possible_clones bitmask. > In the past nothing validated that drivers were populating > possible_clones correctly, but that changed in commit > 74d2aacbe840

Re: [PATCH next] drm/amdgpu: Fix off by one in current_memory_partition_show()

2024-10-14 Thread Alex Deucher
Applied. Thanks! Alex On Thu, Oct 10, 2024 at 11:18 PM Lazar, Lijo wrote: > > > > On 10/11/2024 12:05 AM, Dan Carpenter wrote: > > The >= ARRAY_SIZE() should be > ARRAY_SIZE() to prevent an out of > > bounds read. > > > > Fixes: 012be6f22c01 ("drm/amdgpu: Add sysfs interfaces for NPS mode") > >

RE: [PATCH] drm/amd/display: Disable PSR-SU on Parade 08-01 TCON too

2024-10-14 Thread Limonciello, Mario
[AMD Official Use Only - AMD Internal Distribution Only] Hi Stuart, Is this on a mainline 6.11.y or 6.12-rc3 kernel? Can you please open up a new issue with all the details? You can ping it back here. Thanks, > -Original Message- > From: Stuart Hayhurst > Sent: Sunday, October 13, 2