[PATCH v5 1/3] drm/buddy: Optimize free block management with RB tree

2025-09-11 Thread Arunpravin Paneer Selvam
Replace the freelist (O(n)) used for free block management with a red-black tree, providing more efficient O(log n) search, insert, and delete operations. This improves scalability and performance when managing large numbers of free blocks per order (e.g., hundreds or thousands). In the VK-CTS mem

RE: [PATCH 3/3] drm/amdgpu: Implement user queue reset functionality

2025-09-11 Thread Zhang, Jesse(Jie)
[AMD Official Use Only - AMD Internal Distribution Only] -Original Message- From: Alex Deucher Sent: Wednesday, September 10, 2025 5:07 AM To: Zhang, Jesse(Jie) Cc: amd-gfx@lists.freedesktop.org; Deucher, Alexander ; Koenig, Christian Subject: Re: [PATCH 3/3] drm/amdgpu: Implement user

[PATCH 13/16] drm/amdgpu: More compact SDMA 5.0 IB emission

2025-09-11 Thread Tvrtko Ursulin
Avoid constant register reloads while emitting IBs by using a local write pointer and only updating the size at the end of each helper. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 106 +++-- 1 file changed, 64 insertions(+), 42 deletions(-) dif

[RFC PATCH 2/4] drm/amdgpu/dma-buf: Map/Unmap MMIO_REMAP as BAR register window (dma_map_resource)

2025-09-11 Thread Srinivasan Shanmugam
MMIO_REMAP (HDP flush page) exposes a hardware MMIO register window via a PCI BAR. Handle it as fixed I/O: - map(): if MMIO_REMAP, require P2P, compute the BAR address (bus_addr + page offset), and build a 1-entry sg_table with dma_map_resource(). - unmap(): if MMIO_REMAP, call dma_unmap_resour

Re: [PATCH v10 08/14] drm/amdgpu: add userq object va track helpers

2025-09-11 Thread Alex Deucher
On Mon, Sep 8, 2025 at 4:49 AM Prike Liang wrote: > > Add the userq object virtual address get(),mapped() and put() > helpers for tracking the userq obj va address usage. This adds too much queue specific info to the user queue structure. Just set the bo_va flag when you validate the VAs in patch

Re: [PATCH 1/3] drm/amdgpu: fix userq VM validation v4

2025-09-11 Thread Khatri, Sunil
Functionally now looks good to me but adding more comments for the changes as Alex pointed would be good to accommodate. Reviewed-by: Sunil Khatri On 9/5/2025 4:56 PM, Christian König wrote: That was actually complete nonsense and not validating the BOs at all. The code just cleared all VM are

[PATCH 01/11] PCI: Move Resizable BAR code into rebar.c

2025-09-11 Thread Ilpo Järvinen
In the lack of better place to put it, Resizable BAR code has been placed inside pci.c and setup-res.c that do not use it for anything. Upcoming changes are going to add more Resizable BAR related API functions to PCI core increasing the Resizable BAR code size from the current. As pci.c is huge f

[PATCH v3 1/2] drm/amd/display: update color on atomic commit time

2025-09-11 Thread Melissa Wen
Use `atomic_commit_setup` to change the DC stream state. It's a preparation to remove from `atomic_check` changes in CRTC color components of DC stream state and prevent DC to commit TEST_ONLY changes. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/ Reviewed-by: Harry Wentland Signed-o

[PATCH v2 1/3] Revert "drm/amdkfd: return migration pages from copy function"

2025-09-11 Thread James Zhu
This reverts commit cab1cec78c8fd52e014546739875a81150f11080. migrate_vma_pages can fail if a CPU thread faults on the same page. However, the page table is locked and only one of the new pages will be inserted. The device driver will see that the MIGRATE_PFN_MIGRATE bit is cleared if it loses the

[PATCH 1/3] drm/amd/display: Add pixel_clock to amd_pp_display_configuration

2025-09-11 Thread Timur Kristóf
This commit adds the pixel_clock field to the display config struct so that power management (DPM) can use it. We currently don't have a proper bandwidth calculation on old GPUs with DCE 6-10 because dce_calcs only supports DCE 11+. So the power management (DPM) on these GPUs may need to make ad-h

[PATCH v2 6/9] drm/amdgpu: track the userq bo va for its obj management

2025-09-11 Thread Prike Liang
Track the userq obj for its life time, and reference and dereference the buffer flag at its creating and destroying period. Suggested-by: Alex Deucher Signed-off-by: Prike Liang --- drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 18 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h | 2

Re: evergreen_packet3_check:... radeon 0000:1d:00.0: vbo resource seems too big for the bo

2025-09-11 Thread Michel Dänzer
On 10.09.25 10:02, Christian König wrote: > On 09.09.25 18:21, Alex Deucher wrote: >> On Tue, Sep 9, 2025 at 12:17 PM Borislav Petkov wrote: >>> >>> On Tue, Sep 09, 2025 at 10:43:47AM +0200, Michel Dänzer wrote: Then the developer needs to tell the user how to enable the debugging outpu

[PATCH 06/11] drm/i915/gt: Use pci_rebar_size_supported()

2025-09-11 Thread Ilpo Järvinen
PCI core provides pci_rebar_size_supported() that helps in checking if a BAR Size is supported for the BAR or not. Use it in i915_resize_lmem_bar() to simplify code. Signed-off-by: Ilpo Järvinen --- drivers/gpu/drm/i915/gt/intel_region_lmem.c | 10 +++--- 1 file changed, 3 insertions(+), 7 d

[PATCH v2 4/9] drm/amdgpu/userq: extend userq state

2025-09-11 Thread Prike Liang
Extend the userq state for identifying the userq invalid cases. Signed-off-by: Prike Liang --- drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c b/drivers/gp

[PATCH v2 3/9] drm/amdgpu/userq: extend queue flags for user queue query status

2025-09-11 Thread Prike Liang
Add the userq flag to identify the invalid userq cases. Signed-off-by: Prike Liang --- include/uapi/drm/amdgpu_drm.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h index ff183d239b21..69ebe7784885 100644 --- a/include/uapi/drm/

[PATCH v2 7/9] drm/amdgpu: keeping waiting userq fence infinitely

2025-09-11 Thread Prike Liang
Keeping waiting the userq fence infinitely untill hang detection, and then suspend the hang queue and set the fence error. Signed-off-by: Prike Liang --- drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/

[PATCH v2 8/9] drm/amdgpu: validate the queue va for resuming the queue

2025-09-11 Thread Prike Liang
It requires validating the userq VA whether is mapped before trying to resume the queue. Signed-off-by: Prike Liang Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 24 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h | 1 + 2 files changed, 25 inse

[PATCH v2 5/9] drm/amdgpu: add userq object va track helpers

2025-09-11 Thread Prike Liang
Add the userq object virtual address get(),mapped() and put() helpers for tracking the userq obj va address usage. Signed-off-by: Prike Liang --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 73 -- drivers/gpu/drm/amd/amdgpu/

[PATCH v2 1/9] drm/amdgpu: add UAPI for user queue query status

2025-09-11 Thread Prike Liang
From: Alex Deucher Add an API to query queue status such as whether the queue is hung or whether vram is lost. Reviewed-by: Christian König Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher Reviewed-by: Prike Liang --- include/uapi/drm/amdgpu_drm.h | 14 ++ 1 file changed, 1

[PATCH v2 9/9] drm/amdgpu: validate userq va for GEM unmap

2025-09-11 Thread Prike Liang
When an user unmaps a userq VA, the driver must ensure the queue has no in-flight jobs. If there is pending work, the kernel should wait for the attached eviction (bookkeeping) fence to signal before deleting the mapping. Suggested-by: Christian König Signed-off-by: Prike Liang --- drivers/gpu/

[PATCH v2 2/9] drm/amdgpu/userq: implement support for query status

2025-09-11 Thread Prike Liang
Query the status of the user queue, currently whether the queue is hung and whether or not VRAM is lost. v2: Misc cleanups Reviewed-by: Sunil Khatri Signed-off-by: Alex Deucher Reviewed-by: Prike Liang --- drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 35 ++- drivers/gpu/drm

[PATCH v2 0/2] drm/amd/display: optimize reserved time candidates handling

2025-09-11 Thread Kuan-Wei Chiu
Optimize the handling of reserved time candidates by replacing the custom bubble sort with the kernel's standard sort() and rewriting duplicate removal with a linear-time fast/slow pointer method. The changes improve sorting from O(N^2) to O(N log N) and duplicate removal from O(N^2) to O(N), reduc

RE: [PATCH 2/7] drm: writeback: Modify writeback init helpers

2025-09-11 Thread Kandpal, Suraj
> > Now with drm_writeback_connector moved to drm_connector it makes more > > sense use drm_connector as an argument rather than drm_connector. > > than drm_writeback_connector Sure will fix this. > > > The writeback connector can easily be derived from drm_connector. > > > > Signed-off-by: Sur

[PATCH 02/11] PCI: Cleanup pci_rebar_bytes_to_size() and move into rebar.c

2025-09-11 Thread Ilpo Järvinen
Move pci_rebar_bytes_to_size() from include/linux/pci.h into rebar.c as it does not look very trivial and is not expected to be performance critical. Convert literals to use a newly added PCI_REBAR_MIN_SIZE define. Also add kernel doc for the function as the function is exported. Signed-off-by:

Re: [PATCH v2 1/3] Revert "drm/amdkfd: return migration pages from copy function"

2025-09-11 Thread Philip Yang
On 2025-09-08 12:15, James Zhu wrote: This reverts commit cab1cec78c8fd52e014546739875a81150f11080. migrate_vma_pages can fail if a CPU thread faults on the same page. However, the page table is locked and only one of the new pages will be inserted. The device driver will see that the MIGRATE_

Re: [PATCH v5 10/14] drm/amd/display: add a mid-layer file to handle EDID in DC

2025-09-11 Thread Harry Wentland
On 2025-06-18 11:19, Melissa Wen wrote: > From: Rodrigo Siqueira > > Since DC is a shared code, this commit introduces a new file to work as > a mid-layer in DC for the edid manipulation. > > Signed-off-by: Rodrigo Siqueira > Co-developed-by: Melissa Wen > Signed-off-by: Melissa Wen > > -

Re: [PATCH v7 02/12] scsi: Add PM_EVENT_POWEROFF into suspend callbacks

2025-09-11 Thread Martin K. Petersen
Mario, > When the ACPI core uses hibernation callbacks for shutdown drivers > will receive PM_EVENT_POWEROFF and should handle it the same as > PM_EVENT_HIBERNATE would have been used. No objections from me wrt. the SCSI changes. Reviewed-by: Martin K. Petersen -- Martin K. Petersen

Re: [PATCH 2/3] drm/amdgpu: Set SDMA v3 copy_max_bytes to 0x3fff00

2025-09-11 Thread Alex Deucher
On Thu, Sep 11, 2025 at 10:46 AM Alex Deucher wrote: > > On Wed, Sep 10, 2025 at 2:38 PM Timur Kristóf wrote: > > > > On Wed, 2025-09-10 at 11:10 -0400, Marek Olšák wrote: > > > I added the comment into Mesa that 0x3fff00 is the limit. I did > > > research on that bug separately from PAL, but I d

[PATCH v7 00/12] Improvements to S5 power consumption

2025-09-11 Thread Mario Limonciello (AMD)
A variety of issues both in function and in power consumption have been raised as a result of devices not being put into a low power state when the system is powered off. There have been some localized changes[1] to PCI core to help these issues, but they have had various downsides. This series i

Re: [PATCH v7 06/12] PCI/PM: Split out code from pci_pm_suspend_noirq() into helper

2025-09-11 Thread Rafael J. Wysocki
On Tue, Sep 9, 2025 at 9:16 PM Mario Limonciello (AMD) wrote: > > In order to unify suspend and hibernate codepaths without code duplication > the common code should be in common helpers. Move it from > pci_pm_suspend_noirq() into a helper. No intended functional changes. You should say why you

[PATCH 05/16] drm/amdgpu: More compact UVD 7 IB emission

2025-09-11 Thread Tvrtko Ursulin
Avoid constant register reloads while emitting IBs by using a local write pointer and only updating the size at the end of each helper. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 66 +++ 1 file changed, 36 insertions(+), 30 deletions(-) dif

Re: [PATCH] drm/amd/pm: make smu_set_temp_funcs() smu specific for smu v13.0.6

2025-09-11 Thread Lazar, Lijo
[Public] The purpose is to keep thermal related interfaces separate going forward. It's not about this one alone. Thanks, Lijo From: amd-gfx on behalf of Yang Wang Sent: Tuesday, September 9, 2025 7:51:10 AM To: amd-gfx@lists.freedesktop.org Cc: Kamal, Asad

[PATCH] drm/amdgpu/gfx11: Add Cleaner Shader Support for GFX11.0.1/11.0.4 GPUs

2025-09-11 Thread Srinivasan Shanmugam
Enable the cleaner shader for additional GFX11.5.2/11.5.3 series GPUs to ensure data isolation among GPU tasks. The cleaner shader is tasked with clearing the Local Data Store (LDS), Vector General Purpose Registers (VGPRs), and Scalar General Purpose Registers (SGPRs), which helps avoid data leaka

[PATCH 03/16] drm/amdgpu: More compact VCN IB emission

2025-09-11 Thread Tvrtko Ursulin
Avoid constant register reloads while emitting IBs by using a local write pointer and only updating the size at the end of each helper. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 101 +--- 1 file changed, 55 insertions(+), 46 deletions(-) dif

Re: [PATCH] drm/amd/display: Fix DVI-D/HDMI adapters

2025-09-11 Thread Alex Deucher
@alexh...@amd.com@Wentland, Harry Were you planning to pick this up for this week's promotion or should I grab it? Thanks, Alex On Wed, Sep 3, 2025 at 11:27 AM Timur Kristóf wrote: > > On Tue, 2025-08-26 at 10:06 -0400, Alex Deucher wrote: > > On Mon, Aug 25, 2025 at 5:33 PM Timur Kristóf > >

Re: [PATCH] drm/amd/display/dml2: Guard dml21_map_dc_state_into_dml_display_cfg with DC_FP_START

2025-09-11 Thread Alex Hung
On 8/25/25 02:52, Xi Ruoyao wrote: dml21_map_dc_state_into_dml_display_cfg calls (the call is usually inlined by the compiler) populate_dml21_surface_config_from_plane_state and populate_dml21_plane_config_from_plane_state which may use FPU. In a x86-64 build: $ objdump --disassemble=dm

RE: [PATCH 5/9] drm/amdgpu: add userq object va track helpers

2025-09-11 Thread Liang, Prike
[Public] Regards, Prike > -Original Message- > From: amd-gfx On Behalf Of Alex > Deucher > Sent: Friday, September 12, 2025 3:02 AM > To: Liang, Prike > Cc: amd-gfx@lists.freedesktop.org; Deucher, Alexander > ; Koenig, Christian > Subject: Re: [PATCH 5/9] drm/amdgpu: add userq ob

RE: [PATCH 1/9] drm/amdgpu: add UAPI for user queue query status

2025-09-11 Thread Liang, Prike
[Public] Regards, Prike > -Original Message- > From: Alex Deucher > Sent: Friday, September 12, 2025 2:55 AM > To: Liang, Prike > Cc: amd-gfx@lists.freedesktop.org; Deucher, Alexander > ; Koenig, Christian ; > Khatri, Sunil > Subject: Re: [PATCH 1/9] drm/amdgpu: add UAPI for user

Re: [PATCH v2] drm/amd/display: Only restore backlight after amdgpu_dm_init or dm_resume

2025-09-11 Thread Mario Limonciello
On 9/11/25 12:48 PM, Matthew Schwartz wrote: On clients that utilize AMD_PRIVATE_COLOR properties for HDR support, brightness sliders can include a hardware controlled portion and a gamma-based portion. This is the case on the Steam Deck OLED when using gamescope with Steam as a client. When a u

[PATCH 01/16] drm/amdgpu: Use memset32 for IB padding

2025-09-11 Thread Tvrtko Ursulin
Use memset32 instead of open coding it, just because it is that bit nicer. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/

[PATCH 11/16] drm/amdgpu: More compact SDMA 4.0 IB emission

2025-09-11 Thread Tvrtko Ursulin
Avoid constant register reloads while emitting IBs by using a local write pointer and only updating the size at the end of each helper. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 109 +++-- 1 file changed, 65 insertions(+), 44 deletions(-) dif

Re: [PATCH 9/9] drm/amdgpu: validate userq va for GEM unmap

2025-09-11 Thread Alex Deucher
On Wed, Sep 10, 2025 at 7:44 AM Prike Liang wrote: > > When a user unmaps a userq VA, the driver must ensure > the queue has no in-flight jobs. If there is pending work, > the kernel should wait for the attached eviction (bookkeeping) > fence to signal before deleting the mapping. > Seems reasona

Re: [PATCH 3/3] drm/amdgpu: Implement user queue reset functionality

2025-09-11 Thread Alex Deucher
On Wed, Sep 10, 2025 at 4:24 AM Jesse.Zhang wrote: > > This patch adds robust reset handling for user queues (userq) to improve > recovery from queue failures. The key components include: > > 1. Queue detection and reset logic: >- amdgpu_userq_detect_and_reset_queues() identifies failed queues

Re: [PATCH 7/9] drm/amdgpu: keeping waiting userq fence infinitely

2025-09-11 Thread Alex Deucher
On Wed, Sep 10, 2025 at 8:14 AM Prike Liang wrote: > > Keeping waiting the userq fence infinitely untill > hang detection, and then suspend the hang queue and > set the fence error. > > Signed-off-by: Prike Liang > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 11 --- > 1 file change

Re: [PATCH 5/9] drm/amdgpu: add userq object va track helpers

2025-09-11 Thread Alex Deucher
On Wed, Sep 10, 2025 at 7:54 AM Prike Liang wrote: > > Add the userq object virtual address get(),mapped() and put() > helpers for tracking the userq obj va address usage. > > Signed-off-by: Prike Liang > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 1 + > drivers/gpu/drm/amd/amdgpu/amdgp

[PATCH 00/16] More compact IB emission

2025-09-11 Thread Tvrtko Ursulin
In short, this series mostly does a lot of replacing of this pattern: ib->ptr[ib->length_dw++] = SDMA_PKT_HEADER_OP(SDMA_OP_WRITE) | SDMA_PKT_HEADER_SUB_OP(SDMA_SUBOP_WRITE_LINEAR); ib->ptr[ib->length_dw++] = lower_32_bits(pe); ib->ptr[ib->length_dw++] = upper_3

Re: [RFC v8 08/12] drm/sched: Remove idle entity from tree

2025-09-11 Thread Tvrtko Ursulin
On 11/09/2025 15:32, Philipp Stanner wrote: On Wed, 2025-09-03 at 11:18 +0100, Tvrtko Ursulin wrote: There is no need to keep entities with no jobs in the tree so lets remove it once the last job is consumed. This keeps the tree smaller which is nicer and more efficient as entities are removed

Re: [PATCH 3/5] drm/amdgpu/sdma5.2: adjust SDMA limits

2025-09-11 Thread Alex Deucher
On Thu, Sep 11, 2025 at 1:25 PM Alex Deucher wrote: > > SDMA 5.2.x has increased transfer limits. > > v2: fix harder, use shifts to make it more obvious > > Signed-off-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >

Re: [PATCH v5 11/14] drm/amd/display: create a function to fill dc_sink with edid data

2025-09-11 Thread Melissa Wen
On 10/09/2025 16:54, Harry Wentland wrote: On 2025-06-18 11:19, Melissa Wen wrote: From: Rodrigo Siqueira As part of the effort of stopping using raw edid, this commit move the copy of the edid in DC to a dedicated function that will allow the usage of drm_edid in the next steps. Signed-o

Re: [PATCH v5 10/14] drm/amd/display: add a mid-layer file to handle EDID in DC

2025-09-11 Thread Melissa Wen
On 10/09/2025 16:52, Harry Wentland wrote: On 2025-06-18 11:19, Melissa Wen wrote: From: Rodrigo Siqueira Since DC is a shared code, this commit introduces a new file to work as a mid-layer in DC for the edid manipulation. Signed-off-by: Rodrigo Siqueira Co-developed-by: Melissa Wen Sig

[PATCH v3 2/2] drm/amd/display: change dc stream color settings only in atomic commit

2025-09-11 Thread Melissa Wen
Don't update DC stream color components during atomic check. The driver will continue validating the new CRTC color state but will not change DC stream color components. The DC stream color state will only be programmed at commit time in the `atomic_setup_commit` stage. It fixes gamma LUT loss rep

Re: [PATCH] drm/amd/amdgpu: Fix the mes version that support inv_tlbs

2025-09-11 Thread Alex Deucher
On Thu, Sep 11, 2025 at 1:14 PM Shaoyun Liu wrote: > > MES pipe0 will do VM invalidation with engine set 5 when assign VMID to a > process, > driver will submit inv_tlb package to mes pipe1. It might run into race > condition > if both pipes use the same invalidate engine set. From MES version 0

[PATCH 5/5] drm/amdgpu/sdma7.0: adjust SDMA limits

2025-09-11 Thread Alex Deucher
SDMA 7.0 has increased transfer limits. v2: fix harder, use shifts to make it more obvious Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c b/drivers/gpu/drm/amd

RE: [PATCH 02/11] PCI: Cleanup pci_rebar_bytes_to_size() and move into rebar.c

2025-09-11 Thread Ruhl, Michael J
>-Original Message- >From: dri-devel On Behalf Of Ilpo >Järvinen >Sent: Thursday, September 11, 2025 3:56 AM >To: linux-...@vger.kernel.org; Bjorn Helgaas ; >Krzysztof Wilczyński ; Christian König >; Winiarski, Michal ; >Alex Deucher ; amd-gfx@lists.freedesktop.org; >David Airlie ; dri-de.

[PATCH 1/5] drm/amdgpu/sdma4.0: adjust SDMA limits

2025-09-11 Thread Alex Deucher
SDMA 4.4.x has increased transfer limits. v2: fix harder, use shifts to make it more obvious Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/

[PATCH 3/5] drm/amdgpu/sdma5.2: adjust SDMA limits

2025-09-11 Thread Alex Deucher
SDMA 5.2.x has increased transfer limits. v2: fix harder, use shifts to make it more obvious Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c b/drivers/gpu/drm/a

Re: [PATCH 1/4] drm/amdgpu: fix userq VM validation v4

2025-09-11 Thread Alex Deucher
On Thu, Sep 11, 2025 at 8:09 AM Christian König wrote: > > That was actually complete nonsense and not validating the BOs > at all. The code just cleared all VM areas were it couldn't grab the > lock for a BO. > > Try to fix this. Only compile tested at the moment. > > v2: fix fence slot reservati

[PATCH 1/5] drm/amdgpu/sdma4.0: adjust SDMA limits

2025-09-11 Thread Alex Deucher
SDMA 4.4.x has increased transfer limits. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c index f38004e6064e

Re: [RFC v8 04/12] drm/sched: Consolidate entity run queue management

2025-09-11 Thread Tvrtko Ursulin
On 11/09/2025 15:20, Philipp Stanner wrote: On Wed, 2025-09-03 at 11:18 +0100, Tvrtko Ursulin wrote: Move the code dealing with entities entering and exiting run queues to helpers to logically separate it from jobs entering and exiting entities. Sorry if I've asked this before, but does this

Re: [RFC PATCH 4/4] drm/amdgpu/dma-buf: Treat MMIO_REMAP as fixed I/O; don't move it

2025-09-11 Thread Christian König
On 11.09.25 16:38, Srinivasan Shanmugam wrote: > The HDP flush page (AMDGPU_PL_MMIO_REMAP) is an MMIO window, not RAM. > It must not be migrated to GTT/VRAM by dma-buf paths. > > This change makes pin/unpin no-ops for MMIO_REMAP and skips CPU-access > migration, keeping the object fixed. Just use

Re: [PATCH 2/3] drm/amdgpu: Set SDMA v3 copy_max_bytes to 0x3fff00

2025-09-11 Thread Alex Deucher
On Wed, Sep 10, 2025 at 2:38 PM Timur Kristóf wrote: > > On Wed, 2025-09-10 at 11:10 -0400, Marek Olšák wrote: > > I added the comment into Mesa that 0x3fff00 is the limit. I did > > research on that bug separately from PAL, but I don't remember the > > details. > > > > There is no performance to

[PATCH 4/5] drm/amdgpu/sdma6.0: adjust SDMA limits

2025-09-11 Thread Alex Deucher
SDMA 6.x has increased transfer limits. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c index db6e41967f126..fbaeecb5f52

[PATCH 2/5] drm/amdgpu/sdma4.4: adjust SDMA limits

2025-09-11 Thread Alex Deucher
SDMA 4.4.x has increased transfer limits. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c index 36b1ca73c2ed3..35b

Re: [RFC PATCH 3/4] drm/amdgpu/dma-buf: Pin MMIO_REMAP at export; unpin on release

2025-09-11 Thread Christian König
On 11.09.25 16:38, Srinivasan Shanmugam wrote: > This keeps MMIO_REMAP fixed for its whole lifetime. > Other buffers (VRAM/GTT) are unchanged. > > This change pins it when we export the dma-buf. > If the export fails, we undo the pin. > When the dma-buf is released, we unpin it. > > MMIO_REMAP (H

[RFC PATCH 0/4] drm/amdgpu: Handle MMIO_REMAP as fixed I/O via dma-buf

2025-09-11 Thread Srinivasan Shanmugam
This series makes the amdgpu dma-buf exporter handle AMDGPU_PL_MMIO_REMAP (the HDP flush page) as a BAR-mapped register window (MMIO) * Only compilation tested so far (x86_64, defconfig + amdgpu enabled). Cc: Christian König Cc: Alex Deucher Srinivasan Shanmugam (4): drm/amdgpu/dma-buf: Add

Re: [PATCH 4/4] drm/amdgpu: revert to old status lock handling v3

2025-09-11 Thread Khatri, Sunil
Acked-by: Sunil Khatri On 9/11/2025 5:39 PM, Christian König wrote: It turned out that protecting the status of each bo_va with a spinlock was just hiding problems instead of solving them. Revert the whole approach, add a separate stats_lock and lockdep assertions that the correct reservation

Re: [PATCH 3/4] drm/amdgpu: re-order and document VM code

2025-09-11 Thread Khatri, Sunil
Reviewed-by: Sunil Khatri Rest later i will try to improve the definition of each list with more details for clarity. On 9/11/2025 5:39 PM, Christian König wrote: Re-order fields in the VM structure and try to improve the documentation a bit. Signed-off-by: Christian König --- drivers/gpu

[PATCH 11/11] PCI: Convert BAR sizes bitmasks to u64

2025-09-11 Thread Ilpo Järvinen
PCIe r6.2 section 7.8.6 defines resizable BAR sizes beyond the currently supported maximum of 128TB which will require more than u32 to store the entire bitmask. Convert Resizable BAR related functions to use u64 bitmask for BAR sizes to make the typing more future-proof. The support for the larg

[PATCH 15/16] drm/amdgpu: More compact SDMA 6.0 IB emission

2025-09-11 Thread Tvrtko Ursulin
Avoid constant register reloads while emitting IBs by using a local write pointer and only updating the size at the end of each helper. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 110 +++-- 1 file changed, 66 insertions(+), 44 deletions(-) dif

[PATCH 08/16] drm/amdgpu: More compact GFX 9.4.2 IB emission

2025-09-11 Thread Tvrtko Ursulin
Avoid constant register reloads while emitting IBs by using a local write pointer and only updating the size at the end of each helper. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c | 46 + 1 file changed, 24 insertions(+), 22 deletions(-) dif

[PATCH 3/4] drm/amdgpu: re-order and document VM code

2025-09-11 Thread Christian König
Re-order fields in the VM structure and try to improve the documentation a bit. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 30 -- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h b/driv

[PATCH 4/4] drm/amdgpu: revert to old status lock handling v3

2025-09-11 Thread Christian König
It turned out that protecting the status of each bo_va with a spinlock was just hiding problems instead of solving them. Revert the whole approach, add a separate stats_lock and lockdep assertions that the correct reservation lock is held all over the place. This not only allows for better checks

[PATCH 2/4] drm/amdgpu: remove check for BO reservation add assert instead

2025-09-11 Thread Christian König
We should leave such checks to lockdep and not implement something manually. Signed-off-by: Christian König Acked-by: Sunil Khatri Reviewed-by: Prike Liang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/gpu/d

[PATCH 16/16] drm/amdgpu: More compact SDMA 7.0 IB emission

2025-09-11 Thread Tvrtko Ursulin
Avoid constant register reloads while emitting IBs by using a local write pointer and only updating the size at the end of each helper. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 119 +++-- 1 file changed, 70 insertions(+), 49 deletions(-) dif

[PATCH 09/16] drm/amdgpu: More compact SDMA 2.4 IB emission

2025-09-11 Thread Tvrtko Ursulin
Avoid constant register reloads while emitting IBs by using a local write pointer and only updating the size at the end of each helper. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 108 +++-- 1 file changed, 65 insertions(+), 43 deletions(-) dif

[PATCH 10/16] drm/amdgpu: More compact SDMA 3.0 IB emission

2025-09-11 Thread Tvrtko Ursulin
Avoid constant register reloads while emitting IBs by using a local write pointer and only updating the size at the end of each helper. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 108 +++-- 1 file changed, 65 insertions(+), 43 deletions(-) dif

[PATCH 07/16] drm/amdgpu: More compact CIK SDMA IB emission

2025-09-11 Thread Tvrtko Ursulin
Avoid constant register reloads while emitting IBs by using a local write pointer and only updating the size at the end of each helper. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 105 +++--- 1 file changed, 63 insertions(+), 42 deletions(-) dif

[PATCH 06/16] drm/amdgpu: More compact SI SDMA emission

2025-09-11 Thread Tvrtko Ursulin
Avoid constant register reloads while emitting IBs by using a local write pointer and only updating the size at the end of each helper. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/amd/amdgpu/si_dma.c | 84 + 1 file changed, 51 insertions(+), 33 deletions(-) diff

[PATCH 02/16] drm/amdgpu: More compact VCE IB emission

2025-09-11 Thread Tvrtko Ursulin
Avoid constant register reloads while emitting IBs by using a local write pointer and only updating the size at the end of each helper. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 90 + 1 file changed, 48 insertions(+), 42 deletions(-) dif

Re: [PATCH 3/3] drm/amdgpu: revert "Rename VM invalidate to status lock" v2

2025-09-11 Thread Khatri, Sunil
Also i would recomment to split the change into two a. Revert the status locks in one b. Rest of the changes in another one. Agree to what Alex has proposed as its not more the same revert anymore. Regards Sunil Khatri On 9/5/2025 10:19 PM, Alex Deucher wrote: + Philip On Fri, Sep 5, 2025 at

Re: [PATCH 04/11] PCI: Improve Resizable BAR functions kernel doc

2025-09-11 Thread Christian König
On 11.09.25 10:59, Ilpo Järvinen wrote: > On Thu, 11 Sep 2025, Christian König wrote: > >> On 11.09.25 09:55, Ilpo Järvinen wrote: >>> Fix the copy-pasted errors in the Resizable BAR handling functions >>> kernel doc and generally improve wording choices. >>> >>> Fix the formatting errors of the R

Re: [PATCH 04/11] PCI: Improve Resizable BAR functions kernel doc

2025-09-11 Thread Christian König
On 11.09.25 09:55, Ilpo Järvinen wrote: > Fix the copy-pasted errors in the Resizable BAR handling functions > kernel doc and generally improve wording choices. > > Fix the formatting errors of the Return: line. > > Signed-off-by: Ilpo Järvinen > --- > drivers/pci/rebar.c | 29 +

Re: [PATCH] drm/amd/display: Only restore backlight after amdgpu_dm_init or dm_resume

2025-09-11 Thread Matthew Schwartz
On 9/10/25 2:32 PM, Mario Limonciello wrote: > On 9/10/25 4:27 PM, Matthew Schwartz wrote: >> On clients that utilize AMD_PRIVATE_COLOR properties for HDR support, >> brightness sliders can include a hardware controlled portion and a >> gamma-based portion. This is the case on the Steam Deck OLED w

[PATCH] drm/amd/display: Only restore backlight after amdgpu_dm_init or dm_resume

2025-09-11 Thread Matthew Schwartz
On clients that utilize AMD_PRIVATE_COLOR properties for HDR support, brightness sliders can include a hardware controlled portion and a gamma-based portion. This is the case on the Steam Deck OLED when using gamescope with Steam as a client. When a user sets a brightness level while HDR is active