[PATCH 09/22 V2] drm/amd/pm: check specific index for smu13

2024-05-10 Thread Jesse Zhang
Check for specific indexes that may be invalid values. Signed-off-by: Jesse Zhang Suggested-by: Tim Huang --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/drivers/gpu/drm/amd/pm

Re: [PATCH 19/22] drm/amdgpu: Fix the warning division or modulo by zero for the variable num_xcc_per_xcp

2024-05-10 Thread Lazar, Lijo
On 5/10/2024 8:20 AM, Jesse Zhang wrote: > Dividing expression num_xcc_per_xcp which may be zero has undefined behavior. > > Signed-off-by: Jesse Zhang > --- > drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/amd/amdgpu/aq

Re: [PATCH] drm/amd/display: Don't register panel_power_savings on OLED panels

2024-05-10 Thread Gergo Koteles
Hi Mario, On Thu, 2024-05-09 at 12:05 -0500, Mario Limonciello wrote: > OLED panels don't support the ABM, they shouldn't offer the > panel_power_savings attribute to the user. Check whether aux BL > control support was enabled to decide whether to offer it. > > Reported-by: Gergo Koteles > Clos

RE: [PATCH 09/22 V2] drm/amd/pm: check specific index for smu13

2024-05-10 Thread Huang, Tim
[AMD Official Use Only - General] This patch is, Reviewed-by: Tim Huang > -Original Message- > From: Jesse Zhang > Sent: Friday, May 10, 2024 3:07 PM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander ; Koenig, Christian > ; Huang, Tim ; Zhang, > Jesse(Jie) ; Zhang, Jesse(J

RE: [PATCH 19/22] drm/amdgpu: Fix the warning division or modulo by zero for the variable num_xcc_per_xcp

2024-05-10 Thread Zhang, Jesse(Jie)
[AMD Official Use Only - General] Hi Lijo, -Original Message- From: amd-gfx On Behalf Of Lazar, Lijo Sent: Friday, May 10, 2024 3:16 PM To: amd-gfx@lists.freedesktop.org Subject: Re: [PATCH 19/22] drm/amdgpu: Fix the warning division or modulo by zero for the variable num_xcc_per_xcp

RE: [PATCH 06/22] drm/amd/pm: check the return of send smc msg for sienna_cichild

2024-05-10 Thread Huang, Tim
[AMD Official Use Only - General] This patch is, Reviewed-by: Tim Huang > -Original Message- > From: amd-gfx On Behalf Of Jesse > Zhang > Sent: Friday, May 10, 2024 10:50 AM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander ; Koenig, Christian > ; Huang, Tim ; Zhang, > Jes

RE: [PATCH 07/22] drm/amd/pm: check the return of send smc msg for navi10

2024-05-10 Thread Huang, Tim
[AMD Official Use Only - General] This patch is, Reviewed-by: Tim Huang > -Original Message- > From: Jesse Zhang > Sent: Friday, May 10, 2024 10:50 AM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander ; Koenig, Christian > ; Huang, Tim ; Zhang, > Jesse(Jie) ; Zhang, Jesse(

RE: [PATCH 08/22] drm/amd/pm: check the return of send smc msg for smu_v13

2024-05-10 Thread Huang, Tim
[AMD Official Use Only - General] This patch is, Reviewed-by: Tim Huang > -Original Message- > From: amd-gfx On Behalf Of Jesse > Zhang > Sent: Friday, May 10, 2024 10:50 AM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander ; Koenig, Christian > ; Huang, Tim ; Zhang, > Jess

Re: [PATCH 19/22] drm/amdgpu: Fix the warning division or modulo by zero for the variable num_xcc_per_xcp

2024-05-10 Thread Lazar, Lijo
On 5/10/2024 1:09 PM, Zhang, Jesse(Jie) wrote: > [AMD Official Use Only - General] > > Hi Lijo, > > -Original Message- > From: amd-gfx On Behalf Of Lazar, Lijo > Sent: Friday, May 10, 2024 3:16 PM > To: amd-gfx@lists.freedesktop.org > Subject: Re: [PATCH 19/22] drm/amdgpu: Fix the war

[PATCH] drm/amdgpu: Use the slab allocator to reduce job allocation fragmentation

2024-05-10 Thread Prike Liang
Using kzalloc() results in about 50% memory fragmentation, therefore use the slab allocator to reproduce memory fragmentation. Signed-off-by: Prike Liang --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 26 - drivers/gpu/drm/am

[PATCH 19/22 V2] drm/amdgpu: Fix the warning division or modulo by zero for the variable num_xcc_per_xcp

2024-05-10 Thread Jesse Zhang
Checks the partition mode and returns an error for an invalid mode. Signed-off-by: Jesse Zhang Suggested-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c b/drivers/gpu/drm/amd/am

Re: [PATCH 19/22 V2] drm/amdgpu: Fix the warning division or modulo by zero for the variable num_xcc_per_xcp

2024-05-10 Thread Lazar, Lijo
On 5/10/2024 1:56 PM, Jesse Zhang wrote: > Checks the partition mode and returns an error for an invalid mode. > > Signed-off-by: Jesse Zhang > Suggested-by: Lijo Lazar > --- > drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/driver

[PATCH v10 2/6] drm/amdgpu: Add mqd support for the fence address

2024-05-10 Thread Arunpravin Paneer Selvam
- Add a field in struct v11_gfx_mqd for userqueue fence address. - Assign fence gpu VA address to the userqueue mqd fence address fields. v2: Remove the mask and replace with lower_32_bits (Christian) Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Christian König --- drivers/gpu/drm

[PATCH v10 3/6] drm/amdgpu: UAPI headers for userqueue secure semaphore

2024-05-10 Thread Arunpravin Paneer Selvam
Add UAPI header support for userqueue Secure semaphore v2: Worked on review comments from Christian for the following modifications - Add bo handles, bo flags and padding fields. - Include value/va in a combined array. v3: Worked on review comments from Christian - Add num_fence

[PATCH v10 5/6] drm/amdgpu: Remove the MES self test

2024-05-10 Thread Arunpravin Paneer Selvam
Remove MES self test as this conflicts the userqueue fence interrupts. Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 --- drivers/gpu/drm/amd/amdgpu/mes_v10_1.c | 12 +--- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 14 +- 3

[PATCH v10 1/6] drm/amdgpu: Implement a new userqueue fence driver

2024-05-10 Thread Arunpravin Paneer Selvam
Developed a userqueue fence driver for the userqueue process shared BO synchronization. Create a dma fence having write pointer as the seqno and allocate a seq64 memory for each user queue process and feed this memory address into the firmware/hardware, thus the firmware writes the read pointer in

[PATCH v10 4/6] drm/amdgpu: Implement userqueue signal/wait IOCTL

2024-05-10 Thread Arunpravin Paneer Selvam
This patch introduces new IOCTL for userqueue secure semaphore. The signal IOCTL called from userspace application creates a drm syncobj and array of bo GEM handles and passed in as parameter to the driver to install the fence into it. The wait IOCTL gets an array of drm syncobjs, finds the fence

[PATCH v10 6/6] drm/amdgpu: Enable userq fence interrupt support

2024-05-10 Thread Arunpravin Paneer Selvam
Add support to handle the userqueue protected fence signal hardware interrupt. Create a xarray which maps the doorbell index to the fence driver address. This would help to retrieve the fence driver information when an userq fence interrupt is triggered. Firmware sends the doorbell offset value an

RE: [PATCH] drm/mst: Fix NULL pointer dereference at drm_dp_add_payload_part2

2024-05-10 Thread Jani Nikula
On Fri, 10 May 2024, "Lin, Wayne" wrote: > [Public] > >> -Original Message- >> From: Limonciello, Mario >> Sent: Friday, May 10, 2024 3:18 AM >> To: Linux regressions mailing list ; Wentland, >> Harry >> ; Lin, Wayne >> Cc: ly...@redhat.com; imre.d...@intel.com; Leon Weiß > bochum.de>;

Re: [PATCH] drm/amdgpu: Use the slab allocator to reduce job allocation fragmentation

2024-05-10 Thread Christian König
Am 10.05.24 um 10:11 schrieb Prike Liang: Using kzalloc() results in about 50% memory fragmentation, therefore use the slab allocator to reproduce memory fragmentation. Signed-off-by: Prike Liang --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 26

[PATCH 1/3] drm/amdgpu/pm: Drop redundant setting code for pcie lanes

2024-05-10 Thread Ma Jun
Drop redundant setting code for pcie.lanes. It overwrites the value get from pptable Signed-off-by: Ma Jun --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/processpptables.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/processpptables.c b/drivers/gpu/drm

[PATCH 2/3] drm/amdgpu/pm: Fix the null pointer dereference to pcurrent

2024-05-10 Thread Ma Jun
Check pcurrent pointer before using it to fix the null pointer dereference Signed-off-by: Ma Jun --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c b/drivers/gpu/drm

[PATCH 3/3] drm/amdgpu/pm: Fix the null pointer dereference in apply_state_adjust_rules

2024-05-10 Thread Ma Jun
Check the pointer value to fix potential null pointer dereference Signed-off-by: Ma Jun --- .../gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c| 7 +-- .../gpu/drm/amd/pm/powerplay/hwmgr/smu8_hwmgr.c| 14 -- .../gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 7 +-- 3

[PATCH v3] drm/amd/display: Refactor construct_phy function in dc/link/link_factory.c

2024-05-10 Thread Srinivasan Shanmugam
This commit modifies the construct_phy function to handle the case where `bios->integrated_info` is NULL and to address a compiler warning about a large stack allocation. Upon examination, it was found that the local `integrated_info` structure was just used to copy values which is large and was b

Re: [PATCH] drm/amdkfd: Ensure gpu_id is unique

2024-05-10 Thread Lazar, Lijo
On 5/10/2024 1:36 AM, Harish Kasiviswanathan wrote: > gpu_id needs to be unique for user space to identify GPUs via KFD > interface. In the current implementation there is a very small > probability of having non unique gpu_ids. > > v2: Add check to confirm if gpu_id is unique. If not unique, f

RE: [PATCH] drm/amdgpu/vcn: set VCN5 power gating state to GATE on suspend

2024-05-10 Thread Liu, Leo
[AMD Official Use Only - General] Reviewed-by: Leo Liu > -Original Message- > From: Wu, David > Sent: Thursday, May 9, 2024 3:59 PM > To: amd-gfx@lists.freedesktop.org; Koenig, Christian > > Cc: Deucher, Alexander ; Liu, Leo > ; Jiang, Sonny > Subject: [PATCH] drm/amdgpu/vcn: set VCN5

RE: [PATCH 2/2] drm/amdkfd: Minor corrections to a previous commit

2024-05-10 Thread Russell, Kent
[AMD Official Use Only - General] You should add a Fixes tag for this patch. Kent > -Original Message- > From: amd-gfx On Behalf Of Sreekant > Somasekharan > Sent: Friday, May 10, 2024 12:56 AM > To: amd-gfx@lists.freedesktop.org > Cc: Kuehling, Felix ; Somasekharan, Sreekant > > Subj

RE: [PATCH 1/2] drm/amdkfd: Remove bo NULL check in gmc_v12_0_get_vm_pte() function

2024-05-10 Thread Russell, Kent
[AMD Official Use Only - General] Do we need to check whether bo is NULL in line 500 first? Or can it never be NULL? Kent > -Original Message- > From: amd-gfx On Behalf Of Sreekant > Somasekharan > Sent: Friday, May 10, 2024 12:56 AM > To: amd-gfx@lists.freedesktop.org > Cc: Kuehling,

Re: [pull] amdgpu, amdkfd drm-fixes-6.9

2024-05-10 Thread Alex Deucher
On Thu, May 9, 2024 at 11:22 PM Dave Airlie wrote: > > On Thu, 9 May 2024 at 09:00, Alex Deucher wrote: > > > > Hi Dave, Sima, > > > > Fixes for 6.9. > > > > The following changes since commit dd5a440a31fae6e459c0d627162825505361: > > > > Linux 6.9-rc7 (2024-05-05 14:06:01 -0700) > > > > ar

[PATCH v2] drm/amdkfd: Check correct memory types for is_system variable

2024-05-10 Thread Sreekant Somasekharan
To catch GPU mapping of system memory, TTM_PL_TT and AMDGPU_PL_PREEMPT must be checked. 'Fixes: 3b01ca1b860d ("drm/amdkfd: mark GFX12 system and peer GPU memory mappings as MTYPE_NC")' Signed-off-by: Sreekant Somasekharan --- drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 3 ++- 1 file changed, 2 inse

RE: [PATCH 1/2] drm/amdkfd: Remove bo NULL check in gmc_v12_0_get_vm_pte() function

2024-05-10 Thread Russell, Kent
[AMD Official Use Only - General] Never mind, we're good. This one is Reviewed-by: Kent Russell > -Original Message- > From: amd-gfx On Behalf Of Russell, > Kent > Sent: Friday, May 10, 2024 9:16 AM > To: Somasekharan, Sreekant ; amd- > g...@lists.freedesktop.org > Cc: Kuehling, Felix

[PATCH] drm/amdkfd: Add GFX1201 to svm_range_get_pte_flags function

2024-05-10 Thread Sreekant Somasekharan
GFX1201 was missed in the commit below. Adding it in. 'Fixes: 7c06cc729edc ("drm/amdkfd: mark GFX12 system and peer GPU memory mappings as MTYPE_NC")' Signed-off-by: Sreekant Somasekharan --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm

Re: [PATCH 2/2] drm/amdkfd: Minor corrections to a previous commit

2024-05-10 Thread Somasekharan, Sreekant
[AMD Official Use Only - General] Done. Split the fixes to 2 different patches as well. Regards, -Sreekant From: Russell, Kent Sent: Friday, May 10, 2024 9:15 AM To: Somasekharan, Sreekant ; amd-gfx@lists.freedesktop.org Cc: Kuehling, Felix ; Somasekharan, S

Re: [RESEND 0/6] drm, nouveau/radeon/amdpgu: edid_blob_ptr cleanups

2024-05-10 Thread Alex Deucher
On Fri, May 10, 2024 at 11:17 AM Jani Nikula wrote: > > I've sent this some moths ago, let's try again... > > BR, > Jani. > > Jani Nikula (6): > drm/nouveau: convert to using is_hdmi and has_audio from display info > drm/radeon: convert to using is_hdmi and has_audio from display info > drm/

Re: [PATCH] drm/amdkfd: Add GFX1201 to svm_range_get_pte_flags function

2024-05-10 Thread Alex Deucher
Reviewed-by: Alex Deucher On Fri, May 10, 2024 at 11:12 AM Sreekant Somasekharan wrote: > > GFX1201 was missed in the commit below. Adding it in. > > 'Fixes: 7c06cc729edc ("drm/amdkfd: mark GFX12 system and peer > GPU memory mappings as MTYPE_NC")' > Signed-off-by: Sreekant Somasekharan > --- >

Re: [pull] amdgpu, amdkfd drm-fixes-6.9

2024-05-10 Thread Alex Deucher
Never mind. I'll send a new PR now. Alex On Fri, May 10, 2024 at 10:01 AM Alex Deucher wrote: > > On Thu, May 9, 2024 at 11:22 PM Dave Airlie wrote: > > > > On Thu, 9 May 2024 at 09:00, Alex Deucher wrote: > > > > > > Hi Dave, Sima, > > > > > > Fixes for 6.9. > > > > > > The following changes

[pull] amdgpu, amdkfd drm-fixes-6.9

2024-05-10 Thread Alex Deucher
Hi Dave, Sima, Fixes for 6.9. Same as Wednesday, but drop unncessary patch. The following changes since commit dd5a440a31fae6e459c0d627162825505361: Linux 6.9-rc7 (2024-05-05 14:06:01 -0700) are available in the Git repository at: https://gitlab.freedesktop.org/agd5f/linux.git tags/a

[PATCH 02/20] drm/amdgpu: don't trample pdev drvdata

2024-05-10 Thread Matthew Auld
The driver release callback is called when a particular drm_device goes away, just like with drmm, so here we should never nuke the pdev drvdata pointer, since that could already be pointing to a new drvdata. For example something hotunplugs the device, for which we have an open driver fd, keeping

RE: [PATCH] drm/amdkfd: Fix CU Masking for GFX 9.4.3

2024-05-10 Thread Kasiviswanathan, Harish
[AMD Official Use Only - General] Reviewed-by: Harish Kasiviswanathan -Original Message- From: amd-gfx On Behalf Of Mukul Joshi Sent: Thursday, May 9, 2024 6:05 PM To: amd-gfx@lists.freedesktop.org Cc: Kuehling, Felix ; Joshi, Mukul Subject: [PATCH] drm/amdkfd: Fix CU Masking for GFX

Re: [RESEND 1/6] drm/nouveau: convert to using is_hdmi and has_audio from display info

2024-05-10 Thread Lyude Paul
Reviewed-by: Lyude Paul On Fri, 2024-05-10 at 18:08 +0300, Jani Nikula wrote: > Prefer the parsed results for is_hdmi and has_audio in display info > over > calling drm_detect_hdmi_monitor() and drm_detect_monitor_audio(), > respectively. > > Conveniently, this also removes the need to use edid_

Re: [PATCH] drm/amdkfd: Ensure gpu_id is unique

2024-05-10 Thread Felix Kuehling
On 2024-05-09 16:06, Harish Kasiviswanathan wrote: gpu_id needs to be unique for user space to identify GPUs via KFD interface. In the current implementation there is a very small probability of having non unique gpu_ids. v2: Add check to confirm if gpu_id is unique. If not unique, find one

Re: [PATCH v2] drm/amdkfd: Check correct memory types for is_system variable

2024-05-10 Thread Felix Kuehling
On 2024-05-10 10:06, Sreekant Somasekharan wrote: To catch GPU mapping of system memory, TTM_PL_TT and AMDGPU_PL_PREEMPT must be checked. 'Fixes: 3b01ca1b860d ("drm/amdkfd: mark GFX12 system and peer GPU memory mappings as MTYPE_NC")' I don't think that's a valid format for the Fixes tag. It

[PATCH] drm/amdgpu: drop MES 10.1 support v2

2024-05-10 Thread Alex Deucher
It was an enablement vehicle for MES 11 and was never productized. Remove it. v2: drop additional checks in the GFX10 code. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/Makefile |1 - drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 20 - drivers/gpu/drm/amd/amdgpu

Re: [PATCH 1/3] drm/amdgpu/gfx11: select HDP ref/mask according to gfx ring pipe

2024-05-10 Thread Alex Deucher
Ping again. This series enables a high priority gfx queue on gfx11, similar to gfx10. Alex On Tue, May 7, 2024 at 9:26 AM Alex Deucher wrote: > > Ping on this series? > > On Thu, May 2, 2024 at 6:02 PM Alex Deucher wrote: > > > > Use correct ref/mask for differnent gfx ring pipe. Ported from >

[PATCH v2] drm/amd/display: fix documentation warnings for mpc.h

2024-05-10 Thread Marcelo Mendes Spessoto Junior
Fix most of the display documentation compile warnings by documenting struct mpc_funcs functions in dc/inc/hw/mpc.h file. Remove the following warnings: ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'read_mpcc_state' not described in 'mpc_funcs' .

Re: [PATCH 3/3] drm/amdgpu/pm: Fix the null pointer dereference in apply_state_adjust_rules

2024-05-10 Thread Wang, Yang(Kevin)
[AMD Official Use Only - General] Series is Acked-by: Yang Wang Best Regards, Kevin From: Ma, Jun Sent: Friday, May 10, 2024 17:42 To: amd-gfx@lists.freedesktop.org Cc: Feng, Kenneth ; Deucher, Alexander ; Wang, Yang(Kevin) ; Koenig, Christian ; Ma, Jun Subj