Re: [PATCH v1] docs/gpu: ci: update flake tests requirements

2024-09-23 Thread Dmitry Baryshkov
On Tue, 24 Sept 2024 at 04:26, Vignesh Raman wrote: > > Update the documentation to require linking to a relevant GitLab > issue for each new flake entry instead of an email report. Added > specific GitLab issue URLs for i915, xe and other drivers. > > Signed-off-by: Vignesh Raman > --- > Docume

[PATCH 2/2] drm/amdgpu: Show current compute partition on VF

2024-09-23 Thread Lijo Lazar
Enable sysfs node for current compute partition mode on VFs also. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 29 +++-- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 12 -- 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/driver

[PATCH 1/2] drm/amdgpu: Fetch NPS mode for GCv9.4.3 VFs

2024-09-23 Thread Lijo Lazar
Use the memory ranges published in discovery table to deduce NPS mode of GC v9.4.3 VFs. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 12 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 30 +++--

[PATCH 7/7] drm/amdgpu: Add NPS switch support for GC 9.4.3

2024-09-23 Thread Lijo Lazar
Add dynamic NPS switch support for GC 9.4.3 variants. Only GC v9.4.3 and GC v9.4.4 currently support this. NPS switch is only supported if an SOC supports multiple NPS modes. Signed-off-by: Lijo Lazar Signed-off-by: Rajneesh Bhardwaj --- drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.h | 1 + drivers/

[PATCH 6/7] drm/amdgpu: Check gmc requirement for reset on init

2024-09-23 Thread Lijo Lazar
Add a callback to check if there is any condition detected by GMC block for reset on init. One case is if a pending NPS change request is detected. If reset is done because of NPS switch, refresh NPS info from discovery table. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c

[PATCH 5/7] drm/amdgpu: Place NPS mode request on unload

2024-09-23 Thread Lijo Lazar
If a user has requested NPS mode switch, place the request through PSP during unload of the driver. For devices which are part of a hive, all requests are placed together. If one of them fails, revert back to the current NPS mode. Signed-off-by: Lijo Lazar Signed-off-by: Rajneesh Bhardwaj --- d

[PATCH 4/7] drm/amdgpu: Add sysfs interfaces for NPS mode

2024-09-23 Thread Lijo Lazar
Add a sysfs interface to see available NPS modes to switch to - cat /sys/bus/pci/devices/../available_memory_paritition Make the current_memory_partition sysfs node read/write for requesting a new NPS mode. The request is only cached and at a later point a driver unload/reload is required

[PATCH 3/7] drm/amdgpu: Add gmc interface to request NPS mode

2024-09-23 Thread Lijo Lazar
Add a common interface in GMC to request NPS mode through PSP. Also add a variable in hive and gmc control to track the last requested mode. Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 16 drivers/gpu/drm/amd/amdgpu/

[PATCH 2/7] drm/amdgpu: Add PSP interface for NPS switch

2024-09-23 Thread Lijo Lazar
Implement PSP ring command interface for memory partitioning on the fly on the supported asics. Signed-off-by: Rajneesh Bhardwaj --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 25 + drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 1 + drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h | 1

[PATCH 1/7] drm/amdgpu: Add option to refresh NPS data

2024-09-23 Thread Lijo Lazar
In certain use cases, NPS data needs to be refreshed again from discovery table. Add API parameter to refresh NPS data from discovery table. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 68 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.h | 2 +-

[PATCH 0/7] Add support for dynamic NPS switch

2024-09-23 Thread Lijo Lazar
This series adds supports for dynamic NPS switch on GC v9.4.3/9.4.4 SOC variants. In order to do dynamic NPS switch a sysfs interface is provided to request a new NPS mode. If the device is part of a hive, all hive devices are required to be in the same NPS mode. Hence a hive device request is sa

[PATCH] drm/amd/powerplay: skip enable mgpu fan boost in SRIOV

2024-09-23 Thread ZhenGuo Yin
SMU_MSG_SetMGpuFanBoostLimitRpm is unsupported for VF, skip enabling mgpu fan boost in SRIOV. Signed-off-by: ZhenGuo Yin --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/dr

[PATCH v1] docs/gpu: ci: update flake tests requirements

2024-09-23 Thread Vignesh Raman
Update the documentation to require linking to a relevant GitLab issue for each new flake entry instead of an email report. Added specific GitLab issue URLs for i915, xe and other drivers. Signed-off-by: Vignesh Raman --- Documentation/gpu/automated_testing.rst | 15 ++- 1 file chang

RE: [PATCHv3 2/2] drm/amdkfd: Fix CU occupancy for GFX 9.4.3

2024-09-23 Thread Kasiviswanathan, Harish
[AMD Official Use Only - AMD Internal Distribution Only] This patch series reviewed by: Harish Kasiviswanathan -Original Message- From: Joshi, Mukul Sent: Monday, September 23, 2024 1:41 PM To: amd-gfx@lists.freedesktop.org Cc: Kasiviswanathan, Harish ; Joshi, Mukul ; Kasiviswanathan,

[PATCHv3 2/2] drm/amdkfd: Fix CU occupancy for GFX 9.4.3

2024-09-23 Thread Mukul Joshi
Make CU occupancy calculations work on GFX 9.4.3 by updating the logic to handle multiple XCCs correctly. Signed-off-by: Mukul Joshi Reviewed-by: Harish Kasiviswanathan (v2) --- v1->v2: - Break into 2 patches, one for the generic change and the other for GFX v9.4.3. - Incorporate Harish's comm

[PATCHv3 1/2] drm/amdkfd: Update logic for CU occupancy calculations

2024-09-23 Thread Mukul Joshi
Currently, the code use the IH_VMID_X_LUT register to map a queue's vmid to the corresponding PASID. This logic is racy since the CP can update the VMID-PASID mapping anytime especially when there are more processes than number of vmids. Update the logic to calculate CU occupancy by matching doorbe

Re: [PATCH v3 1/6] drm: add DRM_SET_NAME ioctl

2024-09-23 Thread Pierre-Eric Pelloux-Prayer
Hi Dmitry, Le 23/09/2024 à 12:28, Dmitry Osipenko a écrit : On 9/20/24 12:06, Pierre-Eric Pelloux-Prayer wrote: Giving the opportunity to userspace to associate a free-form name with a drm_file struct is helpful for tracking and debugging. This is similar to the existing DMA_BUF_SET_NAME ioctl

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

2024-09-23 Thread Kasiviswanathan, Harish
[AMD Official Use Only - AMD Internal Distribution Only] One comment below. With that addressed Reviewed-by: Harish Kasiviswanathan -Original Message- From: Joshi, Mukul Sent: Friday, September 20, 2024 5:07 PM To: amd-gfx@lists.freedesktop.org Cc: Kasiviswanathan, Harish ; Joshi, Muku

RE: [PATCHv2 1/2] drm/amdkfd: Update logic for CU occupancy calculations

2024-09-23 Thread Kasiviswanathan, Harish
[AMD Official Use Only - AMD Internal Distribution Only] One very minor comment below. Apart from that Reviewed-by: Harish Kasiviswanathan -Original Message- From: Joshi, Mukul Sent: Friday, September 20, 2024 5:07 PM To: amd-gfx@lists.freedesktop.org Cc: Kasiviswanathan, Harish ; Jos

Re: [PATCH] Staging: drivers/gpu/drm/amd/amdgpu: Fix null pointer deference in amdkfd_fence_get_timeline_name

2024-09-23 Thread Christian König
Am 21.09.24 um 06:25 schrieb Dipendra Khadka: On Sat, 21 Sept 2024 at 00:43, Christian König wrote: Am 20.09.24 um 18:31 schrieb Dipendra Khadka: On Fri, 20 Sept 2024 at 16:01, Christian König wrote: Am 20.09.24 um 11:09 schrieb Dipendra Khadka: ''' drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_

RE: [PATCH] drm/amdgpu/vcn: enable AV1 on both instances

2024-09-23 Thread Liu, Leo
[AMD Official Use Only - AMD Internal Distribution Only] Reviewed-by: Leo Liu > -Original Message- > From: Jamadar, Saleemkhan > Sent: September 21, 2024 3:14 AM > To: Jamadar, Saleemkhan ; Liu, Leo > ; Rao, Srinath ; Gopalakrishnan, > Veerabadhran (Veera) ; > Sundararaju, Sathishkumar

[PATCH] drm/amdkfd: Remove an unused parameter in queue creation

2024-09-23 Thread Lang Yu
struct file *f is unused in queue creation, remove it. Signed-off-by: Lang Yu --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 1 - drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 10 -- 3 files changed

[PATCH] drm/amdgpu: simplify vram alloc logic since 2GB limitation removed

2024-09-23 Thread Yifan Zhang
Make vram alloc loop simpler after 2GB limitation removed. Signed-off-by: Yifan Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c b/drivers/gpu/drm/amd/amdgpu/a

[PATCH 1/1] drm/amdgpu: drop the UCODE_MAX_PSP_PACKAGING checking

2024-09-23 Thread Le Ma
This checking is not suitable any more after introducing psp aux firmware binary. Signed-off-by: Le Ma Suggested-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 11 --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 2 -- 2 files changed, 13 deletions(-) diff --git a/drive

[PATCH 0/5] AMDGPU deadcode

2024-09-23 Thread linux
From: "Dr. David Alan Gilbert" Hi, This is a bunch of deadcode removal in amdgpu; some of the functions are ones which were previously used but haven't been for a while, others are functions that were added a few years ago and haven't ever been used. There are some others that I've not remov

[PATCH] drm/amd/display: fix typos in several function pointer checks

2024-09-23 Thread Vitaliy Shevtsov
Fix several copypaste mistakes in *_disable_link_output() functions where an improper function pointer is checked before dereference. Found by Linux Verification Center (linuxtesting.org) with Svace. Signed-off-by: Vitaliy Shevtsov --- drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c |

[PATCH 4/5] drm/amdgpu: Remove unused amdgpu_gfx_bit_to_me_queue

2024-09-23 Thread linux
From: "Dr. David Alan Gilbert" amdgpu_gfx_bit_to_me_queue has been unused since it was added in commit 7470bfcf2014 ("drm/amdgpu: add helper function for gfx queue/bitmap transition") Remove it. Signed-off-by: Dr. David Alan Gilbert --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 10 --

[PATCH 3/5] drm/amdgpu: Remove unused amdgpu_gmc_vram_cpu_pa

2024-09-23 Thread linux
From: "Dr. David Alan Gilbert" amdgpu_gmc_vram_cpu_pa has been unused since commit 087451f372bf ("drm/amdgpu: use generic fb helpers instead of setting up AMD own's.") Remove it. Signed-off-by: Dr. David Alan Gilbert --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 12 drivers/gpu/

[PATCH 2/5] drm/amdgpu: Remove unused amdgpu_atpx functions

2024-09-23 Thread linux
From: "Dr. David Alan Gilbert" amdgpu_atpx_dgpu_req_power_for_displays has been unused since commit bdb1ccb080da ("drm/amdgpu: remove ATPX_DGPU_REQ_POWER_FOR_DISPLAYS check when hotplug-in") amdgpu_atpx_get_dhandle has been unused since commit f9b7f3703ff9 ("drm/amdgpu/acpi: make ATPX/ATCS struc

[PATCH 1/5] drm/amdgpu: Remove unused amdgpu_device_ip_is_idle

2024-09-23 Thread linux
From: "Dr. David Alan Gilbert" amdgpu_device_ip_is_idle is unused. It was renamed from 'amdgpu_is_idle' which was originally added in commit 5dbbb60ba61e ("drm/amdgpu: add IP helpers for wait_for_idle and is_idle") but hasn't been used. Remove it. Signed-off-by: Dr. David Alan Gilbert --- dr

[PATCH 5/5] drm/amdgpu: Remove unused amdgpu_i2c functions

2024-09-23 Thread linux
From: "Dr. David Alan Gilbert" amdgpu_i2c_add and amdgpu_i2c_init were added in 2015's commit d38ceaf99ed0 ("drm/amdgpu: add core driver (v4)") but never used. Remove them. Signed-off-by: Dr. David Alan Gilbert --- drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 25 - driver

Re: [PATCH] Staging: drivers/gpu/drm/amd/amdgpu: Fix null pointer deference in amdkfd_fence_get_timeline_name

2024-09-23 Thread Dipendra Khadka
On Fri, 20 Sept 2024 at 16:01, Christian König wrote: > > Am 20.09.24 um 11:09 schrieb Dipendra Khadka: > > ''' > > drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c:108:9: error: Null pointer > > dereference: fence [nullPointer] > > return fence->timeline_name; > > ^ > > ''' > > > > Th

Re: [PATCH] Staging: drivers/gpu/drm/amd/amdgpu: Fix null pointer deference in amdkfd_fence_get_timeline_name

2024-09-23 Thread Dipendra Khadka
On Sat, 21 Sept 2024 at 00:43, Christian König wrote: > > Am 20.09.24 um 18:31 schrieb Dipendra Khadka: > > On Fri, 20 Sept 2024 at 16:01, Christian König > > wrote: > >> Am 20.09.24 um 11:09 schrieb Dipendra Khadka: > >>> ''' > >>> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c:108:9: error:

[PATCH] Staging: drivers/gpu/drm/amd/amdgpu: Fix null pointer deference in amdkfd_fence_get_timeline_name

2024-09-23 Thread Dipendra Khadka
''' drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c:108:9: error: Null pointer dereference: fence [nullPointer] return fence->timeline_name; ^ ''' The method to_amdgpu_amdkfd_fence can return NULL incase of empty f or f->ops != &amdkfd_fence_ops.Hence, check has been added . If fence is