Re: [PATCH] drm/amdgpu: Retire un-used write in JPEG v4.0.3

2024-09-09 Thread Lazar, Lijo
On 9/10/2024 10:45 AM, Jane Jian wrote: > write OP of HDP_DEBUG1(0x3fbc) is no longer functional, so remove it. > You may copy the title/description from the one I shared - Subj: Remove unneeded write in JPEG v4.0.3 Desc: HDP_DEBUG1(offset = 0x3fbc) is no longer functional, remove the redun

Re: [PATCH] drm/amdgpu: always allocate cleared VRAM for GEM allocations

2024-09-09 Thread Paneer Selvam, Arunpravin
Thanks, I will try clearing with compute and check the performance. Regards, Arun. On 9/6/2024 7:37 PM, Marek Olšák wrote: Can you also bump the DRM version, so that userspace knows when to skip its own clear? Also, clearing with SDMA takes up to 33 times more time (= is up to 97% slower) than

RE: [PATCH] drm/amdgpu: update suspend status for aborting from deeper suspend

2024-09-09 Thread Liang, Prike
[AMD Official Use Only - AMD Internal Distribution Only] Yes, thank you for the suggestion. There will be a separate patch for cleaning up the setting and checking of the suspend_complete flag. Thanks, Prike > -Original Message- > From: Alex Deucher > Sent: Monday, September 9, 2024 11

Re: [PATCH] drm/amdgpu: disable GPU RAS bad page feature for specific ASIC

2024-09-09 Thread Lazar, Lijo
On 9/10/2024 9:29 AM, Tao Zhou wrote: > The feature is not applicable to specific app platform. > > v2: update the disablement condition and commit description > > Signed-off-by: Tao Zhou > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 5 + > 1 file changed, 5 insertions(+) > > diff -

[PATCH] drm/amdgpu: Retire un-used write in JPEG v4.0.3

2024-09-09 Thread Jane Jian
write OP of HDP_DEBUG1(0x3fbc) is no longer functional, so remove it. Signed-off-by: Jane Jian --- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v4

RE: [PATCH] drm/amdgpu: disable GPU RAS bad page feature for specific ASIC

2024-09-09 Thread Zhang, Hawking
[AMD Official Use Only - AMD Internal Distribution Only] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: amd-gfx On Behalf Of Tao Zhou Sent: Tuesday, September 10, 2024 11:59 To: amd-gfx@lists.freedesktop.org Cc: Zhou1, Tao Subject: [PATCH] drm/amdgpu: disable GPU

[PATCH] drm/amdgpu: disable GPU RAS bad page feature for specific ASIC

2024-09-09 Thread Tao Zhou
The feature is not applicable to specific app platform. v2: update the disablement condition and commit description Signed-off-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu

[PATCH v2 3/3] drm/amdgpu/sdma6: implement ring reset callback for sdma6

2024-09-09 Thread jiadong.zhu
From: Jiadong Zhu Implement sdma queue reset callback using mes_reset_queue_mmio. v2: check instance id before reset queue. Signed-off-by: Jiadong Zhu --- drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/gpu/drm/amd

[PATCH v2 1/3] drm/amdgpu/mes11: update mes_reset_queue function to support sdma queue

2024-09-09 Thread jiadong.zhu
From: Jiadong Zhu Reset sdma queue through mmio based on me_id and queue_id. v2: simplify callflows and register calculation. Signed-off-by: Jiadong Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 2 +- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 27 - 2 files changed

[PATCH v2 2/3] drm/amdgpu/sdma6: split out per instance resume function

2024-09-09 Thread jiadong.zhu
From: Jiadong Zhu Extract the resume sequence for individual sdma instance from sdma_v6_0_gfx_resume. The function could be used for start/restart scenario on a certain instance. Signed-off-by: Jiadong Zhu --- drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 240 ++--- 1 file chan

Re: drm-ci: flaky tests for amdgpu driver testing

2024-09-09 Thread Vignesh Raman
Hi Maintainers, On 28/05/24 10:19, Vignesh Raman wrote: Hi Maintainers, There are some flaky tests reported for amdgpu driver testing in drm-ci. # Board Name: hp-11A-G6-EE-grunt # IGT Version: 1.28-g0df7b9b97 # Linux Version: 6.9.0-rc7 # Failure Rate: 50 kms_async_flips@async-flip-with-page-fl

Re: [PATCH 10/10] drm/amdgpu: Add PSP reload case to reset-on-init

2024-09-09 Thread Alex Deucher
On Mon, Sep 2, 2024 at 4:03 AM Lijo Lazar wrote: > > A reset on initialization will be needed if a new PSP TOS needs to be > loaded than the one currently active on the system. This is possible > only on SOCs which support a full device reset which results in unload > of active PSP TOS. > > Signed

Re: [PATCH 09/10] drm/amdgpu: Add interface for TOS reload cases

2024-09-09 Thread Alex Deucher
On Mon, Sep 2, 2024 at 3:34 AM Lijo Lazar wrote: > > Add interface to check if a different TOS needs to be loaded than the > one which is which is already active on the SOC. Presently the interface > is restricted to specific variants of PSPv13.0. > > Signed-off-by: Lijo Lazar Reviewed-by: Alex

Re: [PATCH 08/10] drm/amdgpu: Support reset-on-init on select SOCs

2024-09-09 Thread Alex Deucher
On Mon, Sep 2, 2024 at 3:34 AM Lijo Lazar wrote: > > Add XGMI reset on init support to aldebaran and SOCs with GC v9.4.3. > > Signed-off-by: Lijo Lazar Reviewed-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/aldebaran.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu

Re: [PATCH 07/10] drm/amdgpu: Drop delayed reset work handler

2024-09-09 Thread Alex Deucher
On Mon, Sep 2, 2024 at 3:34 AM Lijo Lazar wrote: > > Drop delayed reset work handler as it is no longer used. > > Signed-off-by: Lijo Lazar Reviewed-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 -- > drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 80 ---

Re: [PATCH 06/10] drm/amdgpu: Refactor XGMI reset on init handling

2024-09-09 Thread Alex Deucher
On Mon, Sep 2, 2024 at 3:34 AM Lijo Lazar wrote: > > Use XGMI hive information to rely on resetting XGMI devices on > initialization rather than using mgpu structure. mgpu structure may have > other devices as well. > > Signed-off-by: Lijo Lazar > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Re: [PATCH 05/10] drm/amdgpu: Add helper to initialize badpage info

2024-09-09 Thread Alex Deucher
On Mon, Sep 2, 2024 at 3:53 AM Lijo Lazar wrote: > > Add a separate function to read badpage data during initialization. > Reading bad pages will need hardware access and cannot be done during > reset. Hence in cases where device needs a full reset during > init itself, attempting to read will cau

Re: [PATCH 04/10] drm/amdgpu: Add reset on init handler for XGMI

2024-09-09 Thread Alex Deucher
On Mon, Sep 2, 2024 at 3:34 AM Lijo Lazar wrote: > > In some cases, device needs to be reset before first use. Add handlers > for doing device reset during driver init sequence. > > Signed-off-by: Lijo Lazar > --- > drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + > drivers/gpu/drm/amd/amdgpu/

Re: [PATCH 03/10] drm/amdgpu: Separate reinitialization after reset

2024-09-09 Thread Alex Deucher
On Mon, Sep 2, 2024 at 3:34 AM Lijo Lazar wrote: > > Move the reinitialization part after a reset to another function. No > functional changes. > > Signed-off-by: Lijo Lazar Acked-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/amdgpu.h| 2 + > drivers/gpu/drm/amd/amdgpu/amdgpu_

Re: [PATCH 02/10] drm/amdgpu: Use init level for pending_reset flag

2024-09-09 Thread Alex Deucher
With the error Feifei mentioned fixed, Reviewed-by: Alex Deucher On Mon, Sep 2, 2024 at 4:13 AM Lijo Lazar wrote: > > Drop pending_reset flag in gmc block. Instead use init level to > determine which type of init is preferred - in this case MINIMAL. > > Signed-off-by: Lijo Lazar > --- > driver

Re: [PATCH 01/10] drm/amdgpu: Add init levels

2024-09-09 Thread Alex Deucher
On Mon, Sep 9, 2024 at 4:57 PM Alex Deucher wrote: > > On Mon, Sep 2, 2024 at 3:34 AM Lijo Lazar wrote: > > > > Add init levels to define the level to which device needs to be > > initialized. > > > > Signed-off-by: Lijo Lazar > > --- > > drivers/gpu/drm/amd/amdgpu/amdgpu.h| 14 ++ >

Re: [PATCH 01/10] drm/amdgpu: Add init levels

2024-09-09 Thread Alex Deucher
On Mon, Sep 2, 2024 at 3:34 AM Lijo Lazar wrote: > > Add init levels to define the level to which device needs to be > initialized. > > Signed-off-by: Lijo Lazar > --- > drivers/gpu/drm/amd/amdgpu/amdgpu.h| 14 ++ > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 54

Re: [PATCH v11 27/28] Revert "drm/amdgpu/gfx11: only enable CP GFX shadowing on SR-IOV"

2024-09-09 Thread Alex Deucher
On Mon, Sep 9, 2024 at 4:18 PM Shashank Sharma wrote: > > From: Shashank Sharma > > This reverts commit 81af32520e7aaa337fe132f16c12ce54170187ea. > > This commit prevents a usermode queue client to get the shadow related > information. > > Signed-off-by: Shashank Sharma > --- > drivers/gpu/drm/

RE: [PATCH] drm/amdgpu: Fix JPEG v4.0.3 register write

2024-09-09 Thread Liu, Leo
[AMD Official Use Only - AMD Internal Distribution Only] Acked-by: Leo Liu > -Original Message- > From: Lazar, Lijo > Sent: September 6, 2024 4:46 AM > To: amd-gfx@lists.freedesktop.org > Cc: Zhang, Hawking ; Deucher, Alexander > ; Liu, Leo ; Jian, Jane > ; Lu, Victor Cheng Chi (Victor)

[PATCH v11 22/28] drm/amdgpu: add userqueue suspend/resume functions

2024-09-09 Thread Shashank Sharma
This patch adds userqueue suspend/resume functions at core MES V11 IP level. V2: use true/false for queue_active status (Christian) added Christian's R-B V3: reset/set queue status in mqd.create and mqd.destroy Cc: Alex Deucher Cc: Christian Koenig Reviewed-by: Christian Koenig Signed-off

[PATCH v11 27/28] Revert "drm/amdgpu/gfx11: only enable CP GFX shadowing on SR-IOV"

2024-09-09 Thread Shashank Sharma
From: Shashank Sharma This reverts commit 81af32520e7aaa337fe132f16c12ce54170187ea. This commit prevents a usermode queue client to get the shadow related information. Signed-off-by: Shashank Sharma --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 8 ++-- 1 file changed, 2 insertions(+), 6 de

[PATCH v11 24/28] drm/amdgpu: resume gfx userqueues

2024-09-09 Thread Shashank Sharma
This patch adds support for userqueue resume. What it typically does is this: - adds a new delayed work for resuming all the queues. - schedules this delayed work from the suspend work. - validates the BOs and replaces the eviction fence before resuming all the queues running under this instance

[PATCH v11 28/28] Revert "drm/amdgpu: don't allow userspace to create a doorbell BO"

2024-09-09 Thread Shashank Sharma
From: Arvind Yadav This reverts commit 6be2ad4f0073c541146caa66c5ae936c955a8224. --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index 7823faa3dbaa..2e3c974a3340

[PATCH v11 26/28] drm/amdgpu: fix MES GFX mask

2024-09-09 Thread Shashank Sharma
From: Arvind Yadav Current MES GFX mask prevents FW to enable oversubscription. This patch does the following: - Fixes the mask values and adds a description for the same - Removes the central mask setup and makes it IP specific, as it would be different when the number of pipes and queues are

[PATCH v11 23/28] drm/amdgpu: suspend gfx userqueues

2024-09-09 Thread Shashank Sharma
This patch adds suspend support for gfx userqueues. It typically does the following: - adds an enable_signaling function for the eviction fence, so that it can trigger the userqueue suspend, - adds a delayed function for suspending the userqueues, to suspend all the queues under this userq mana

[PATCH v11 25/28] drm/amdgpu: Add input fence to sync bo unmap

2024-09-09 Thread Shashank Sharma
From: Arvind Yadav This patch adds input fences to VM_IOCTL for unmapping an object. The kernel will unmap the BO only when the fence is signaled. V2: Bug fix (Arvind) V3: Bug fix (Arvind) V4: Rename UAPI objects as per UAPI review (Marek) Cc: Alex Deucher Cc: Christian Koenig Signed-off-by:

[PATCH v11 15/28] drm/amdgpu: add kernel config for gfx-userqueue

2024-09-09 Thread Shashank Sharma
This patch: - adds a kernel config option "CONFIG_DRM_AMD_USERQ_GFX" - moves the usequeue initialization code for all IPs under this flag so that the userqueue works only when the config is enabled. V9: Introduce this patch V10: Call it CONFIG_DRM_AMDGPU_NAVI3X_USERQ instead of CONFIG_DRM

[PATCH v11 21/28] drm/amdgpu: add gfx eviction fence helpers

2024-09-09 Thread Shashank Sharma
This patch adds basic eviction fence framework for the gfx buffers. The idea is to: - One eviction fence is created per gfx process, at kms_open. - This fence is attached to all the gem buffers created by this process. - This fence is detached to all the gem buffers at postclose_kms. This framew

[PATCH v11 12/28] drm/amdgpu: enable SDMA usermode queues

2024-09-09 Thread Shashank Sharma
From: Arvind Yadav This patch does necessary modifications to enable the SDMA usermode queues using the existing userqueue infrastructure. V9: introduced this patch in the series V10: use header file instead of extern (Alex) V11: rename drm_amdgpu_userq_mqd_sdma_gfx_v11 to drm_amdgpu_userq

[PATCH v11 14/28] drm/amdgpu: update userqueue BOs and PDs

2024-09-09 Thread Shashank Sharma
This patch updates the VM_IOCTL to allow userspace to synchronize the mapping/unmapping of a BO in the page table. The major changes are: - it adds a drm_timeline object as an input parameter to the VM IOCTL. - this object is used by the kernel to sync the update of the BO in the page table duri

[PATCH v11 11/28] drm/amdgpu: enable GFX-V11 userqueue support

2024-09-09 Thread Shashank Sharma
This patch enables GFX-v11 IP support in the usermode queue base code. It typically: - adds a GFX_v11 specific MQD structure - sets IP functions to create and destroy MQDs - sets MQD objects coming from userspace V10: introduced this spearate patch for GFX V11 enabling (Alex). V11: Addressed revie

[PATCH v11 13/28] drm/amdgpu: enable compute/gfx usermode queue

2024-09-09 Thread Shashank Sharma
This patch does the necessary changes required to enable compute workload support using the existing usermode queues infrastructure. V9: Patch introduced V10: Add custom IP specific mqd strcuture for compute (Alex) V11: Rename drm_amdgpu_userq_mqd_compute_gfx_v11 to drm_amdgpu_userq_mqd_comp

[PATCH v11 09/28] drm/amdgpu: generate doorbell index for userqueue

2024-09-09 Thread Shashank Sharma
The userspace sends us the doorbell object and the relative doobell index in the object to be used for the usermode queue, but the FW expects the absolute doorbell index on the PCI BAR in the MQD. This patch adds a function to convert this relative doorbell index to absolute doorbell index. V5: F

[PATCH v11 08/28] drm/amdgpu: map wptr BO into GART

2024-09-09 Thread Shashank Sharma
To support oversubscription, MES FW expects WPTR BOs to be mapped into GART, before they are submitted to usermode queues. This patch adds a function for the same. V4: fix the wptr value before mapping lookup (Bas, Christian). V5: Addressed review comments from Christian: - Either pin object

[PATCH v11 10/28] drm/amdgpu: cleanup leftover queues

2024-09-09 Thread Shashank Sharma
This patch adds code to cleanup any leftover userqueues which a user might have missed to destroy due to a crash or any other programming error. V7: Added Alex's R-B V8: Rebase V9: Rebase V10: Rebase Cc: Alex Deucher Cc: Christian Koenig Reviewed-by: Alex Deucher Suggested-by: Bas Nieuwenhu

[PATCH v11 07/28] drm/amdgpu: map usermode queue into MES

2024-09-09 Thread Shashank Sharma
This patch adds new functions to map/unmap a usermode queue into the FW, using the MES ring. As soon as this mapping is done, the queue would be considered ready to accept the workload. V1: Addressed review comments from Alex on the RFC patch series - Map/Unmap should be IP specific. V2:

[PATCH v11 06/28] drm/amdgpu: create context space for usermode queue

2024-09-09 Thread Shashank Sharma
The MES FW expects us to allocate at least one page as context space to process gang and process related context data. This patch creates a joint object for the same, and calculates GPU space offsets of these spaces. V1: Addressed review comments on RFC patch: Alex: Make this function IP speci

[PATCH v11 05/28] drm/amdgpu: create MES-V11 usermode queue for GFX

2024-09-09 Thread Shashank Sharma
A Memory queue descriptor (MQD) of a userqueue defines it in the hw's context. As MQD format can vary between different graphics IPs, we need gfx GEN specific handlers to create MQDs. This patch: - Adds a new file which will be used for MES based userqueue functions targeting GFX and SDMA IP. -

[PATCH v11 04/28] drm/amdgpu: add helpers to create userqueue object

2024-09-09 Thread Shashank Sharma
This patch introduces amdgpu_userqueue_object and its helper functions to creates and destroy this object. The helper functions creates/destroys a base amdgpu_bo, kmap/unmap it and save the respective GPU and CPU addresses in the encapsulating userqueue object. These helpers will be used to create

[PATCH v11 03/28] drm/amdgpu: add new IOCTL for usermode queue

2024-09-09 Thread Shashank Sharma
This patch adds: - A new IOCTL function to create and destroy - A new structure to keep all the user queue data in one place. - A function to generate unique index for the queue. V1: Worked on review comments from RFC patch series: - Alex: Keep a list of queues, instead of single queue per proce

[PATCH v11 02/28] drm/amdgpu: add usermode queue base code

2024-09-09 Thread Shashank Sharma
This patch adds IP independent skeleton code for amdgpu usermode queue. It contains: - A new files with init functions of usermode queues. - A queue context manager in driver private data. V1: Worked on design review comments from RFC patch series: (https://patchwork.freedesktop.org/series/112214/

[PATCH v11 01/28] drm/amdgpu: UAPI for user queue management

2024-09-09 Thread Shashank Sharma
From: Alex Deucher This patch intorduces new UAPI/IOCTL for usermode graphics queue. The userspace app will fill this structure and request the graphics driver to add a graphics work queue for it. The output of this UAPI is a queue id. This UAPI maps the queue into GPU, so the graphics app can s

[PATCH v11 00/28] AMDGPU usermode queues

2024-09-09 Thread Shashank Sharma
This patch series introduces base code of AMDGPU usermode queues for gfx workloads. Usermode queues is a method of GPU workload submission into the graphics hardware without any interaction with kernel/DRM schedulers. In this method, a userspace graphics application can create its own workqueue and

Re: [PATCH] drm/amdkfd: fix vm-pasid lookup for multiple partitions

2024-09-09 Thread Christian König
Am 09.09.24 um 18:02 schrieb Kim, Jonathan: [Public] -Original Message- From: Christian König Sent: Thursday, September 5, 2024 10:24 AM To: Kim, Jonathan ; amd-gfx@lists.freedesktop.org Cc: Kuehling, Felix ; Deucher, Alexander ; Joshi, Mukul Subject: Re: [PATCH] drm/amdkfd: fix vm-pa

RE: [PATCH] drm/amdkfd: Fix resource leak in riu rsetore queue

2024-09-09 Thread Russell, Kent
[AMD Official Use Only - AMD Internal Distribution Only] Should also probably fix rsetore -> restore as well Kent > -Original Message- > From: amd-gfx On Behalf Of Alex > Deucher > Sent: Monday, September 9, 2024 1:56 PM > To: Zhang, Jesse(Jie) > Cc: amd-gfx@lists.freedesktop.org; D

Re: [PATCH v5 00/44] Color Pipeline API w/ VKMS

2024-09-09 Thread Harry Wentland
On 2024-08-29 10:55, Xaver Hugl wrote: > Hi, > > I have a WIP implementation of this for KWin at > https://invent.kde.org/plasma/kwin/-/commits/work/zamundaaa/drm-colorop. > It maps KWin's color pipeline to the drm one to get (primary plane > only, for now) direct scanout of HDR content on SDR

Re: [PATCH] drm/amdkfd: Fix resource leak in riu rsetore queue

2024-09-09 Thread Alex Deucher
On Sun, Sep 8, 2024 at 9:20 PM jesse.zh...@amd.com wrote: > > To avoid memory leaks, release q_extra_data when exiting the restore queue. > v2: Correct the proto (Alex) should be criu, not riu. Alex > > Signed-off-by: Jesse Zhang > --- > drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c

Re: [PATCH v4 71/80] drm/vmwgfx: Run DRM default client setup

2024-09-09 Thread Zack Rusin
On Mon, Sep 9, 2024 at 7:37 AM Thomas Zimmermann wrote: > > Call drm_client_setup() to run the kernel's default client setup > for DRM. Set fbdev_probe in struct drm_driver, so that the client > setup can start the common fbdev client. > > Signed-off-by: Thomas Zimmermann > Cc: Zack Rusin > Cc:

Re: [PATCH] drm/amdgpu/atomfirmware: Silence UBSAN warning

2024-09-09 Thread Harry Wentland
On 2024-09-09 13:19, Alex Deucher wrote: > Ping? > > Alex > > On Fri, Sep 6, 2024 at 12:43 PM Alex Deucher > wrote: >> >> Per the comments, these are variable sized arrays. >> >> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3613 >> Signed-off-by: Alex Deucher Reviewed-by: Harry Wen

Re: [PATCH RESEND] drm/amd/display: Add null check before access structs in dcn32_enable_phantom_plane

2024-09-09 Thread Alex Deucher
On Mon, Sep 9, 2024 at 2:48 AM Ma Ke wrote: > > In dcn32_enable_phantom_plane, we should better check null pointer before > accessing various structs. > > Cc: sta...@vger.kernel.org > Fixes: 235c67634230 ("drm/amd/display: add DCN32/321 specific files for > Display Core") > Signed-off-by: Ma Ke

Re: [PATCH] drm/amdgpu/atomfirmware: Silence UBSAN warning

2024-09-09 Thread Alex Deucher
Ping? Alex On Fri, Sep 6, 2024 at 12:43 PM Alex Deucher wrote: > > Per the comments, these are variable sized arrays. > > Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3613 > Signed-off-by: Alex Deucher > --- > drivers/gpu/drm/amd/include/atomfirmware.h | 4 ++-- > 1 file changed, 2

[PATCH 7/8] drm/sched: Re-group and rename the entity run-queue lock

2024-09-09 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Christian suggested to rename the lock and improve the documentation of what it protects. And to also re-order the structure members so all protected by the lock are together in a block. Signed-off-by: Tvrtko Ursulin Cc: Christian König Cc: Alex Deucher Cc: Luben Tuikov

[PATCH 8/8] drm/sched: Further optimise drm_sched_entity_push_job

2024-09-09 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Having removed one re-lock cycle on the entity->lock in a patch titled "drm/sched: Optimise drm_sched_entity_push_job", with only a tiny bit larger refactoring we can do the same optimisation on the rq->lock. (Currently both drm_sched_rq_add_entity() and drm_sched_rq_update_f

[PATCH 5/8] drm/sched: Stop setting current entity in FIFO mode

2024-09-09 Thread Tvrtko Ursulin
From: Tvrtko Ursulin It does not seem there is a need to set the current entity in FIFO mode since ot only serves as being a "cursor" in round-robin mode. Even if scheduling mode is changed at runtime the change in behaviour is simply to restart from the first entity, instead of continuing in RR

[PATCH 3/8] drm/sched: Always increment correct scheduler score

2024-09-09 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Entities run queue can change during drm_sched_entity_push_job() so make sure to update the score consistently. Signed-off-by: Tvrtko Ursulin Fixes: d41a39dda140 ("drm/scheduler: improve job distribution with multiple queues") Cc: Nirmoy Das Cc: Christian König Cc: Luben

[PATCH 1/8] drm/sched: Add locking to drm_sched_entity_modify_sched

2024-09-09 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Without the locking amdgpu currently can race between amdgpu_ctx_set_entity_priority() (via drm_sched_entity_modify_sched()) and drm_sched_job_arm(), leading to the latter accesing potentially inconsitent entity->sched_list and entity->num_sched_list pair. v2: * Improve com

[PATCH 6/8] drm/sched: Re-order struct drm_sched_rq members for clarity

2024-09-09 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Lets re-order the members to make it clear which are protected by the lock and at the same time document it via kerneldoc. Signed-off-by: Tvrtko Ursulin Cc: Christian König Cc: Alex Deucher Cc: Luben Tuikov Cc: Matthew Brost Cc: Philipp Stanner --- include/drm/gpu_sch

[PATCH 4/8] drm/sched: Optimise drm_sched_entity_push_job

2024-09-09 Thread Tvrtko Ursulin
From: Tvrtko Ursulin In FIFO mode We can avoid dropping the lock only to immediately re-acquire by adding a new drm_sched_rq_update_fifo_locked() helper. Signed-off-by: Tvrtko Ursulin Cc: Christian König Cc: Alex Deucher Cc: Luben Tuikov Cc: Matthew Brost Cc: Philipp Stanner --- drivers/g

[PATCH 2/8] drm/sched: Always wake up correct scheduler in drm_sched_entity_push_job

2024-09-09 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Since drm_sched_entity_modify_sched() can modify the entities run queue, lets make sure to only dereference the pointer once so both adding and waking up are guaranteed to be consistent. Alternative of moving the spin_unlock to after the wake up would for now be more problem

[PATCH v2 0/8] DRM scheduler fixes, or not, or incorrect kind

2024-09-09 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Re-spin of the series from two days ago with review feedback addressed and some new patches added. Changelog is in individual patches but essentially new patches are renames and struct members re-ordering as discussed in v1, plus one more optimisation when I noticed we can s

Re: [PATCH 0/2] drm/amd: fix VRR race condition during IRQ handling

2024-09-09 Thread Harry Wentland
On 2024-09-09 13:11, Alex Deucher wrote: > On Sun, Sep 8, 2024 at 7:23 AM Tobias Jakobi > wrote: >> >> On 9/8/24 09:35, Christopher Snowhill wrote: >> >>> On Mon Sep 2, 2024 at 2:40 AM PDT, tjakobi wrote: From: Tobias Jakobi Hello, this fixes a nasty race condition in

Re: [PATCH 0/2] drm/amd: fix VRR race condition during IRQ handling

2024-09-09 Thread Alex Deucher
On Sun, Sep 8, 2024 at 7:23 AM Tobias Jakobi wrote: > > On 9/8/24 09:35, Christopher Snowhill wrote: > > > On Mon Sep 2, 2024 at 2:40 AM PDT, tjakobi wrote: > >> From: Tobias Jakobi > >> > >> Hello, > >> > >> this fixes a nasty race condition in the set_drr() callbacks for DCN10 > >> and DCN35 th

Re: [PATCH 2/2] drm/amdgpu/sdma6: implement ring reset callback for sdma6

2024-09-09 Thread Alex Deucher
On Mon, Sep 9, 2024 at 5:54 AM wrote: > > From: Jiadong Zhu > > Implement sdma queue reset callback using mes_reset_queue_mmio. > Extract sdma resume sequence from sdma_v6_0_gfx_resume for queue restarting. Might make more sense to split this patch in two. One patch to split out the per instanc

Re: [PATCH 1/2] drm/amdgpu/mes11: update mes_reset_queue function to support sdma queue

2024-09-09 Thread Alex Deucher
On Mon, Sep 9, 2024 at 5:54 AM wrote: > > From: Jiadong Zhu > > Reset sdma queue through mmio based on me_id and queue_id. > > Signed-off-by: Jiadong Zhu > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 2 +- > drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 53 - > 2 files

Re: [RFC 1/2] drm/amdgpu: Remove dynamic DRM scheduling priority override

2024-09-09 Thread Alex Deucher
On Mon, Sep 9, 2024 at 8:23 AM Christian König wrote: > > Adding Leo as well. > > Am 06.09.24 um 20:06 schrieb Tvrtko Ursulin: > > From: Tvrtko Ursulin > > > > According to Christian the dynamic DRM priority override was only > > interesting before the hardware priority (dona via > > drm_sched_en

Re: [RFC 0/4] DRM scheduler fixes, or not, or incorrect kind

2024-09-09 Thread Matthew Brost
On Fri, Sep 06, 2024 at 07:06:14PM +0100, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin > > In a recent conversation with Christian there was a thought that > drm_sched_entity_modify_sched() should start using the entity->rq_lock to be > safe against job submission and simultaneous priority change

RE: [PATCH] drm/amdkfd: fix vm-pasid lookup for multiple partitions

2024-09-09 Thread Kim, Jonathan
[Public] > -Original Message- > From: Christian König > Sent: Thursday, September 5, 2024 10:24 AM > To: Kim, Jonathan ; amd-gfx@lists.freedesktop.org > Cc: Kuehling, Felix ; Deucher, Alexander > ; Joshi, Mukul > Subject: Re: [PATCH] drm/amdkfd: fix vm-pasid lookup for multiple partition

Re: [PATCH] drm/amdgpu: update suspend status for aborting from deeper suspend

2024-09-09 Thread Alex Deucher
On Mon, Sep 9, 2024 at 8:58 AM Liang, Prike wrote: > > [AMD Official Use Only - AMD Internal Distribution Only] > > > Previously, the S3 process aborted before calling the noirq suspend, and this > issue was successfully sorted by checking the suspend_complete flag. However, > there are now some

Re: [RFC 1/4] drm/sched: Add locking to drm_sched_entity_modify_sched

2024-09-09 Thread Christian König
Am 09.09.24 um 15:27 schrieb Tvrtko Ursulin: On 09/09/2024 13:46, Philipp Stanner wrote: On Mon, 2024-09-09 at 13:37 +0100, Tvrtko Ursulin wrote: [SNIP] That could also be a great opportunity for improving the lock naming: Well that comment made me laugh because I point out the same when th

Re: [RFC 1/4] drm/sched: Add locking to drm_sched_entity_modify_sched

2024-09-09 Thread Philipp Stanner
On Mon, 2024-09-09 at 14:27 +0100, Tvrtko Ursulin wrote: > > On 09/09/2024 13:46, Philipp Stanner wrote: > > On Mon, 2024-09-09 at 13:37 +0100, Tvrtko Ursulin wrote: > > > > > > On 09/09/2024 13:18, Christian König wrote: > > > > Am 09.09.24 um 14:13 schrieb Philipp Stanner: > > > > > On Mon, 202

Re: [PATCH 1/2] Documentation/gpu: Document the situation with unqualified drm-memory-

2024-09-09 Thread Tvrtko Ursulin
On 06/09/2024 19:12, Alex Deucher wrote: On Wed, Sep 4, 2024 at 4:36 AM Tvrtko Ursulin wrote: On 21/08/2024 21:47, Alex Deucher wrote: On Tue, Aug 13, 2024 at 9:57 AM Tvrtko Ursulin wrote: From: Tvrtko Ursulin Currently it is not well defined what is drm-memory- compared to other cate

Re: [PATCH 1/5] drm/amdgpu: Move a variable assignment behind a null pointer check in amdgpu_ras_interrupt_dispatch()

2024-09-09 Thread Markus Elfring
> Date: Tue, 11 Apr 2023 10:52:48 +0200 > > The address of a data structure member was determined before > a corresponding null pointer check in the implementation of > the function “amdgpu_ras_interrupt_dispatch”. > > Thus avoid the risk for undefined behaviour by moving the assignment > for the v

Re: [RFC 1/4] drm/sched: Add locking to drm_sched_entity_modify_sched

2024-09-09 Thread Tvrtko Ursulin
On 09/09/2024 13:18, Christian König wrote: Am 09.09.24 um 14:13 schrieb Philipp Stanner: On Mon, 2024-09-09 at 13:29 +0200, Christian König wrote: Am 09.09.24 um 11:44 schrieb Philipp Stanner: On Fri, 2024-09-06 at 19:06 +0100, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Without the locki

Re: [RFC 0/4] DRM scheduler fixes, or not, or incorrect kind

2024-09-09 Thread Tvrtko Ursulin
On 09/09/2024 09:47, Philipp Stanner wrote: Hi, On Fri, 2024-09-06 at 19:06 +0100, Tvrtko Ursulin wrote: From: Tvrtko Ursulin In a recent conversation with Christian there was a thought that drm_sched_entity_modify_sched() should start using the entity- rq_lock to be safe against job subm

RE: [PATCH] drm/amdgpu: disable RAS bad page feature for specific APU

2024-09-09 Thread Zhang, Hawking
[AMD Official Use Only - AMD Internal Distribution Only] Fixed typo in red -Original Message- From: amd-gfx On Behalf Of Zhang, Hawking Sent: Monday, September 9, 2024 20:22 To: Zhou1, Tao ; amd-gfx@lists.freedesktop.org Cc: Zhou1, Tao Subject: RE: [PATCH] drm/amdgpu: disable RAS bad

RE: [PATCH] drm/amdgpu: update suspend status for aborting from deeper suspend

2024-09-09 Thread Liang, Prike
[AMD Official Use Only - AMD Internal Distribution Only] Previously, the S3 process aborted before calling the noirq suspend, and this issue was successfully sorted by checking the suspend_complete flag. However, there are now some S3 suspend cases, such as pm_test platform/core mode, which abo

Re: [RFC 1/4] drm/sched: Add locking to drm_sched_entity_modify_sched

2024-09-09 Thread Philipp Stanner
On Mon, 2024-09-09 at 13:37 +0100, Tvrtko Ursulin wrote: > > On 09/09/2024 13:18, Christian König wrote: > > Am 09.09.24 um 14:13 schrieb Philipp Stanner: > > > On Mon, 2024-09-09 at 13:29 +0200, Christian König wrote: > > > > Am 09.09.24 um 11:44 schrieb Philipp Stanner: > > > > > On Fri, 2024-09

Re: [RFC 3/4] drm/sched: Always increment correct scheduler score

2024-09-09 Thread Nirmoy Das
On 9/6/2024 8:06 PM, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin > > Entities run queue can change during drm_sched_entity_push_job() so make > sure to update the score consistently. > > Signed-off-by: Tvrtko Ursulin > Fixes: d41a39dda140 ("drm/scheduler: improve job distribution with multiple

Re: [RFC 1/2] drm/amdgpu: Remove dynamic DRM scheduling priority override

2024-09-09 Thread Christian König
Adding Leo as well. Am 06.09.24 um 20:06 schrieb Tvrtko Ursulin: From: Tvrtko Ursulin According to Christian the dynamic DRM priority override was only interesting before the hardware priority (dona via drm_sched_entity_modify_sched()) existed. Furthermore, both overrides also only work somewh

RE: [PATCH] drm/amdgpu: disable RAS bad page feature for specific APU

2024-09-09 Thread Zhang, Hawking
[AMD Official Use Only - AMD Internal Distribution Only] connected_to_gpu is legacy design - I understand UMC IP version is also used so it works. Checking is_app_apu flag is good enough at this stage. It would be better to move the code change to amdgpu_ras_fs_init. In addition, it's more accu

Re: [RFC 1/4] drm/sched: Add locking to drm_sched_entity_modify_sched

2024-09-09 Thread Christian König
Am 09.09.24 um 14:13 schrieb Philipp Stanner: On Mon, 2024-09-09 at 13:29 +0200, Christian König wrote: Am 09.09.24 um 11:44 schrieb Philipp Stanner: On Fri, 2024-09-06 at 19:06 +0100, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Without the locking amdgpu currently can race amdgpu_ctx_set_ent

Re: [RFC 1/4] drm/sched: Add locking to drm_sched_entity_modify_sched

2024-09-09 Thread Philipp Stanner
On Mon, 2024-09-09 at 13:29 +0200, Christian König wrote: > Am 09.09.24 um 11:44 schrieb Philipp Stanner: > > On Fri, 2024-09-06 at 19:06 +0100, Tvrtko Ursulin wrote: > > > From: Tvrtko Ursulin > > > > > > Without the locking amdgpu currently can race > > > amdgpu_ctx_set_entity_priority() and dr

[PATCH v4 80/80] drm/omapdrm: Run DRM default client setup

2024-09-09 Thread Thomas Zimmermann
Rework fbdev probing to support fbdev_probe in struct drm_driver and remove the old fb_probe callback. Provide an initializer macro for struct drm_driver that sets the callback according to the kernel configuration. Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbde

[PATCH v4 79/80] drm/omapdrm: Remove struct drm_fb_helper from struct omap_fbdev.

2024-09-09 Thread Thomas Zimmermann
Store instances of drm_fb_helper and struct omap_fbdev separately. This will allow omapdrm to use the common fbdev client, which allocates its own instance of struct drm_fb_helper. There is at most one instance of each per DRM device, so both can be referenced directly from the omap and DRM device

[PATCH v4 68/80] drm/nouveau: Run DRM default client setup

2024-09-09 Thread Thomas Zimmermann
Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbdev_probe in struct drm_driver, so that the client setup can start the common fbdev client. The nouveau driver specifies a preferred color mode depending on the available video memory, with a default of 32. Adapt this

[PATCH v4 76/80] drm/msm: Run DRM default client setup

2024-09-09 Thread Thomas Zimmermann
Rework fbdev probing to support fbdev_probe in struct drm_driver and remove the old fb_probe callback. Provide an initializer macro for struct drm_driver that sets the callback according to the kernel configuration. Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbde

[PATCH v4 66/80] drm/hisilicon/hibmc: Run DRM default client setup

2024-09-09 Thread Thomas Zimmermann
Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbdev_probe in struct drm_driver, so that the client setup can start the common fbdev client. The hibmc driver specifies a preferred color mode of 32. As this is the default if no format has been given, leave it out enti

[PATCH v4 74/80] drm/exynos-drm: Run DRM default client setup

2024-09-09 Thread Thomas Zimmermann
Rework fbdev probing to support fbdev_probe in struct drm_driver and remove the old fb_probe callback. Provide an initializer macro for struct drm_driver that sets the callback according to the kernel configuration. Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbde

[PATCH v4 77/80] drm/radeon: Run DRM default client setup

2024-09-09 Thread Thomas Zimmermann
Rework fbdev probing to support fbdev_probe in struct drm_driver and remove the old fb_probe callback. Provide an initializer macro for struct drm_driver that sets the callback according to the kernel configuration. Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbde

[PATCH v4 73/80] drm/armada: Run DRM default client setup

2024-09-09 Thread Thomas Zimmermann
Rework fbdev probing to support fbdev_probe in struct drm_driver and remove the old fb_probe callback. Provide an initializer macro for struct drm_driver that sets the callback according to the kernel configuration. Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbde

[PATCH v4 78/80] drm/tegra: Run DRM default client setup

2024-09-09 Thread Thomas Zimmermann
Rework fbdev probing to support fbdev_probe in struct drm_driver and remove the old fb_probe callback. Provide an initializer macro for struct drm_driver that sets the callback according to the kernel configuration. Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbde

[PATCH v4 62/80] drm/vkms: Run DRM default client setup

2024-09-09 Thread Thomas Zimmermann
Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbdev_probe in struct drm_driver, so that the client setup can start the common fbdev client. Signed-off-by: Thomas Zimmermann Cc: Rodrigo Siqueira Cc: Melissa Wen Cc: "Maíra Canal" Cc: Haneen Mohammed Acked-by: Jav

[PATCH v4 44/80] drm/st7735r: Run DRM default client setup

2024-09-09 Thread Thomas Zimmermann
Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbdev_probe in struct drm_driver, so that the client setup can start the common fbdev client. Signed-off-by: Thomas Zimmermann Cc: David Lechner Acked-by: David Lechner --- drivers/gpu/drm/tiny/st7735r.c | 4 +++- 1

[PATCH v4 60/80] drm/udl: Run DRM default client setup

2024-09-09 Thread Thomas Zimmermann
Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbdev_probe in struct drm_driver, so that the client setup can start the common fbdev client. Signed-off-by: Thomas Zimmermann Cc: Dave Airlie Cc: Sean Paul Cc: Thomas Zimmermann Acked-by: Javier Martinez Canillas -

[PATCH v4 71/80] drm/vmwgfx: Run DRM default client setup

2024-09-09 Thread Thomas Zimmermann
Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbdev_probe in struct drm_driver, so that the client setup can start the common fbdev client. Signed-off-by: Thomas Zimmermann Cc: Zack Rusin Cc: Broadcom internal kernel review list Acked-by: Javier Martinez Canillas

  1   2   >