Re: [PATCH v2 4/5] drm/amd/display: Add support for custom brightness curve

2025-02-28 Thread Alex Hung
Reviewed-by: Alex Hung On 2/28/25 11:51, Mario Limonciello wrote: Some systems specify in the firmware a brightness curve that better reflects the characteristics of the panel used. This is done in the form of data points and matching luminance percentage. When converting a userspace requested

[PATCH] drm/amdgpu/userq: move the header to amdgpu directory

2025-02-28 Thread Alex Deucher
To align with other headers. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/{include => amdgpu}/amdgpu_userqueue.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename drivers/gpu/drm/amd/{include => amdgpu}/amdgpu_userqueue.h (100%) diff --git a/drivers/gpu/drm/amd/include/amdgpu_

[PATCH 1/5] drm/amdgpu: return an error in the userq IOCTL when DRM_AMDGPU_NAVI3X_USERQ=n

2025-02-28 Thread Alex Deucher
I'd swear this was already fixed, but I guess the patch never landed. Add it now. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c b/drivers/gpu/drm/am

[PATCH 3/5] drm/amdgpu/gfx11: fix config guard

2025-02-28 Thread Alex Deucher
s/CONFIG_DRM_AMD_USERQ_GFX/CONFIG_DRM_AMDGPU_NAVI3X_USERQ/ Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c index 7970c848583

[PATCH 5/5] drm/amdgpu/userq: remove BROKEN from config

2025-02-28 Thread Alex Deucher
This can be enabled now. We have the firmware checks in place. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/Kconfig b/drivers/gpu/drm/amd/amdgpu/Kconfig index a614320114796..23c014da0f324 100644

[pull] amdgpu, amdkfd drm-next-6.15

2025-02-28 Thread Alex Deucher
Hi Dave, Simona, Updates for 6.15. The following changes since commit 3521276ad14fe47ce1c4382749f3c95762629375: drm/amdgpu: update the handle ptr in get_clockgating_state (2025-02-19 15:19:05 -0500) are available in the Git repository at: https://gitlab.freedesktop.org/agd5f/linux.git ta

Re: [PATCH v2 2/5] drm/amd: Pass luminance data to amdgpu_dm_backlight_caps

2025-02-28 Thread Alex Hung
Reviewed-by: Alex Hung On 2/28/25 11:51, Mario Limonciello wrote: The ATIF method on some systems will provide a backlight curve. Pass this curve into amdgpu_dm add it to the structures. Signed-off-by: Mario Limonciello --- v2: * Keep ACPI and DM structures separate * Add static asserts t

[PATCH] drm/amdgpu: add rebar parameter

2025-02-28 Thread Alex Deucher
Add a new parameter to disable BAR resizing. Note that this only disables the driver from attempting to resize the BAR, The BIOS may have resized the BAR at boot. Some teams have found this useful in debugging P2P DMA issues on systems where the available MMIO space did not allow for all of the G

Re: [PATCH v2 3/5] drm/amd/display: Avoid operating on copies of backlight caps

2025-02-28 Thread Alex Hung
Reviewed-by: Alex Hung On 2/28/25 11:51, Mario Limonciello wrote: Making a copy of the backlight caps structure between uses is unnecessary. Refer to pointers to the same structure when using it. Signed-off-by: Mario Limonciello --- v2: * Add fix for !CONFIG_ACPI --- .../gpu/drm/amd/displ

[PATCH v2 0/2] drm/amdgpu: fix style and comments in DCE6

2025-02-28 Thread Alexandre Demers
While going throught DCE6 code, I took on myself to add some comments and to fix style in a few places. Alexandre Demers (2): drm/amdgpu: add some comments in DCE6 dmr/amdgpu: fix style in DCE6 drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 32 ++- 1 file changed, 21 inserti

[PATCH v2 1/2] drm/amdgpu: add or move defines for DCE6 in sid.h

2025-02-28 Thread Alexandre Demers
For coherence with DCE8 et DCE10, add or move some values under sid.h. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 63 ++- drivers/gpu/drm/amd/amdgpu/si_enums.h | 7 --- drivers/gpu/drm/amd/amdgpu/sid.h | 29 +--- 3 files chan

[PATCH v2 0/2] Uniformize defines between DCE6, DCE8 and DCE10

2025-02-28 Thread Alexandre Demers
Keep a uniform way of where and how variables are defined between DCE6, DCE8 and DCE10. It is easier to understand the code, their similarities and their modifications. Alexandre Demers (2): drm/amdgpu: add or move defines for DCE6 in sid.h drm/amdgpu: add defines for pin_offsets in DCE8 dri

[PATCH v2 2/2] drm/amdgpu: add defines for pin_offsets in DCE8

2025-02-28 Thread Alexandre Demers
Define pin_offsets values in the same way it is done in DCE8 Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/cikd.h | 9 + drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 14 +++--- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/am

[PATCH v2 1/2] drm/amdgpu: add some comments in DCE6

2025-02-28 Thread Alexandre Demers
Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c index eb7de9122d99..78402e7444db 100644 --- a/drivers/gp

[PATCH v2 2/2] dmr/amdgpu: fix style in DCE6

2025-02-28 Thread Alexandre Demers
A few returns not where they should be. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c index 78402e7444db..

[PATCH] drm/amd/pm: always allow ih interrupt from fw

2025-02-28 Thread Kenneth Feng
always allow ih interrupt from fw on smu v14 based on the interface requirement Signed-off-by: Kenneth Feng --- drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c b/driver

Re: [V7 07/45] drm/colorop: Add 1D Curve subtype

2025-02-28 Thread Louis Chauvet
Le 28/02/2025 à 02:07, Alex Hung a écrit : On 2/25/25 03:13, Louis Chauvet wrote: Le 20/12/2024 à 05:33, Alex Hung a écrit : From: Harry Wentland Add a new drm_colorop with DRM_COLOROP_1D_CURVE with two subtypes: DRM_COLOROP_1D_CURVE_SRGB_EOTF and DRM_COLOROP_1D_CURVE_SRGB_INV_EOTF. S

Re: [PATCH 3/3] drm/amdgpu/sdma_v4_4_2: update VM flush implementation for SDMA

2025-02-28 Thread Lazar, Lijo
On 2/27/2025 9:26 PM, Christian König wrote: > Am 27.02.25 um 12:47 schrieb jesse.zh...@amd.com: >> This commit updates the VM flush implementation for the SDMA engine. >> >> - Added a new function `sdma_v4_4_2_get_invalidate_req` to construct the >> VM_INVALIDATE_ENG0_REQ >> register value f

[PATCH 1/2] drm: Create an app info option for wedge events

2025-02-28 Thread André Almeida
When a device get wedged, it might be caused by a guilty application. For userspace, knowing which app was the cause can be useful for some situations, like for implementing a policy, logs or for giving a chance for the compositor to let the user know what app caused the problem. This is an optiona

[PATCH 0/2] drm: Create an app info option for wedge events

2025-02-28 Thread André Almeida
This patchset implements a request made by Xaver Hugl about wedge events: "I'd really like to have the PID of the client that triggered the GPU reset, so that we can kill it if multiple resets are triggered in a row (or switch to software rendering if it's KWin itself) and show a user-friendly not

[PATCH 2/2] drm/amdgpu: Make use of drm_wedge_app_info

2025-02-28 Thread André Almeida
To notify userspace about which app (if any) made the device get in a wedge state, make use of drm_wedge_app_info parameter, filling it with the app PID and name. Signed-off-by: André Almeida --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 19 +-- drivers/gpu/drm/amd/amdgpu/amdg

Re: [PATCH 00/63] Fix CONFIG_DRM_USE_DYNAMIC_DEBUG=y

2025-02-28 Thread Louis Chauvet
Le 20/02/2025 à 10:45, Simona Vetter a écrit : On Thu, Feb 20, 2025 at 09:31:41AM +0100, Greg KH wrote: On Fri, Jan 24, 2025 at 11:45:14PM -0700, Jim Cromie wrote: This series fixes dynamic-debug's support for DRM debug-categories. Classmaps-v1 evaded full review, and got committed in 2 chun

[PATCH v2 0/5] Add custom brightness curve support

2025-02-28 Thread Mario Limonciello
Some OEMs support custom brightness curves where the ATIF method includes a collection of data points where the input signal is mapped out to percentage of luminance. This series shuffles around some code to add in the ability to do that mapping in amdgpu_dm when brightness is set. Mario Limonciel

[PATCH v2 3/5] drm/amd/display: Avoid operating on copies of backlight caps

2025-02-28 Thread Mario Limonciello
Making a copy of the backlight caps structure between uses is unnecessary. Refer to pointers to the same structure when using it. Signed-off-by: Mario Limonciello --- v2: * Add fix for !CONFIG_ACPI --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 52 --- 1 file changed, 22 in

[PATCH v2 2/5] drm/amd: Pass luminance data to amdgpu_dm_backlight_caps

2025-02-28 Thread Mario Limonciello
The ATIF method on some systems will provide a backlight curve. Pass this curve into amdgpu_dm add it to the structures. Signed-off-by: Mario Limonciello --- v2: * Keep ACPI and DM structures separate * Add static asserts to ensure structures remain in sync --- drivers/gpu/drm/amd/amdgpu/amdgp

Re: [PATCH v2 4/4] drm/amdgpu: Update SRIOV video codec caps

2025-02-28 Thread Alex Deucher
1-3 are: Acked-by: Alex Deucher for this patch, you might want to check with the SR-IOV team. I think there are some limitations in VFs that require different settings? If not, you can add my AB to this one as well. Alex On Fri, Feb 28, 2025 at 9:59 AM David Rosca wrote: > > There have been m

[PATCH] drm/amdkfd: Fix NULL Pointer Dereference in KFD queue

2025-02-28 Thread Andrew Martin
Through KFD IOCTL Fuzzing we encountered a NULL pointer derefrence when calling kfd_queue_acquire_buffers. Signed-off-by: Andrew Martin --- drivers/gpu/drm/amd/amdkfd/kfd_queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_queue.c b

Re: [PATCH 1/4] drm/amdgpu: Fix MPEG2, MPEG4 and VC1 video caps max size

2025-02-28 Thread David Rosca
On 28. 02. 25 15:21, Alex Deucher wrote: On Fri, Feb 28, 2025 at 8:34 AM David Rosca wrote: 1920x1088 is the maximum supported resolution. Signed-off-by: David Rosca --- drivers/gpu/drm/amd/amdgpu/nv.c | 18 - drivers/gpu/drm/amd/amdgpu/vi.c | 36 ---

Re: [PATCH] drm/amdkfd: Fix NULL Pointer Dereference in KFD queue

2025-02-28 Thread Philip Yang
On 2025-02-28 11:39, Andrew Martin wrote: Through KFD IOCTL Fuzzing we encountered a NULL pointer derefrence when calling kfd_queue_acquire_buffers. Please remove the extra leading space character in subject and comment, and add tag Fixes: 629568d25fea ("drm/amdkfd: Validate queu

RE: [PATCH] drm/amdkfd: Fix NULL Pointer Dereference in KFD queue

2025-02-28 Thread Martin, Andrew
[AMD Official Use Only - AMD Internal Distribution Only] @Yang, Philip Thanks! > -Original Message- > From: Yang, Philip > Sent: Friday, February 28, 2025 1:16 PM > To: Martin, Andrew ; amd- > g...@lists.freedesktop.org > Cc: Yang, Philip > Subject: Re: [PATCH] drm/amdkfd: Fix NULL Poi

Re: [PATCH 3/5] drm/amd/display: Avoid operating on copies of backlight caps

2025-02-28 Thread Alex Hung
On 2/21/25 10:10, Mario Limonciello wrote: Making a copy of the backlight caps structure between uses is unnecessary. Refer to pointers to the same structure when using it. Signed-off-by: Mario Limonciello --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 50 --- 1 file

Re: [PATCH 1/4] drm/amdgpu: Fix MPEG2, MPEG4 and VC1 video caps max size

2025-02-28 Thread Alex Deucher
On Fri, Feb 28, 2025 at 8:34 AM David Rosca wrote: > > 1920x1088 is the maximum supported resolution. > > Signed-off-by: David Rosca > --- > drivers/gpu/drm/amd/amdgpu/nv.c | 18 - > drivers/gpu/drm/amd/amdgpu/vi.c | 36 - I think soc15.c needs sim

[PATCH v2 3/4] drm/amdgpu: Remove JPEG from vega and carrizo video caps

2025-02-28 Thread David Rosca
JPEG is only supported for VCN1+. Signed-off-by: David Rosca --- drivers/gpu/drm/amd/amdgpu/soc15.c | 1 - drivers/gpu/drm/amd/amdgpu/vi.c| 7 --- 2 files changed, 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c index d6db75258e66..65

[PATCH v2 4/4] drm/amdgpu: Update SRIOV video codec caps

2025-02-28 Thread David Rosca
There have been multiple fixes to the video caps that are missing for SRIOV. Update the SRIOV caps with correct values. Signed-off-by: David Rosca --- drivers/gpu/drm/amd/amdgpu/nv.c| 16 drivers/gpu/drm/amd/amdgpu/soc21.c | 10 ++ 2 files changed, 10 insertions(+),

[PATCH v2 1/4] drm/amdgpu: Fix MPEG2, MPEG4 and VC1 video caps max size

2025-02-28 Thread David Rosca
1920x1088 is the maximum supported resolution. Signed-off-by: David Rosca --- drivers/gpu/drm/amd/amdgpu/nv.c| 18 +++ drivers/gpu/drm/amd/amdgpu/soc15.c | 18 +++ drivers/gpu/drm/amd/amdgpu/vi.c| 36 +++--- 3 files changed, 36 insertions(+

[PATCH v2 2/4] drm/amdgpu: Fix JPEG video caps max size for navi1x and raven

2025-02-28 Thread David Rosca
8192x8192 is the maximum supported resolution. Signed-off-by: David Rosca --- drivers/gpu/drm/amd/amdgpu/nv.c| 2 +- drivers/gpu/drm/amd/amdgpu/soc15.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c ind

Re: [V7 05/45] drm/colorop: Introduce new drm_colorop mode object

2025-02-28 Thread Harry Wentland
On 2025-02-25 05:05, Louis Chauvet wrote: Le 20/12/2024 à 05:33, Alex Hung a écrit : From: Harry Wentland @@ -249,6 +255,20 @@ void drm_atomic_state_default_clear(struct drm_atomic_state *state)   state->planes[i].new_state = NULL;   } +    for (i = 0; i < config->num_coloro

[PATCH v2 1/5] drm/amd: Copy entire structure in amdgpu_acpi_get_backlight_caps()

2025-02-28 Thread Mario Limonciello
As new members are introduced to the structure copying the entire structure will help avoid missing them. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.

[PATCH 3/3] drm/amdgpu/sdma_v4_4_2: update VM flush implementation for SDMA

2025-02-28 Thread jesse.zh...@amd.com
From: "jesse.zh...@amd.com" This commit updates the VM flush implementation for the SDMA engine. - Added a new function `sdma_v4_4_2_get_invalidate_req` to construct the VM_INVALIDATE_ENG0_REQ register value for the specified VMID and flush type. This function ensures that all relevant pag

RE: [PATCH 2/2] drm/amdgpu: Add support for CPERs on virtualization

2025-02-28 Thread Zhou1, Tao
[AMD Official Use Only - AMD Internal Distribution Only] > -Original Message- > From: amd-gfx On Behalf Of Tony Yi > Sent: Thursday, February 27, 2025 11:12 PM > To: Yi, Tony ; Skvortsov, Victor ; > amd-gfx@lists.freedesktop.org; Zhang, Hawking ; Luo, > Zhigang > Cc: Yi, Tony > Subject:

[PATCH V6 2/3] drm/amdgpu: Optimize VM invalidation engine allocation and synchronize GPU TLB flush

2025-02-28 Thread jesse.zh...@amd.com
From: "jesse.zh...@amd.com" - Modify the VM invalidation engine allocation logic to handle SDMA page rings. SDMA page rings now share the VM invalidation engine with SDMA gfx rings instead of allocating a separate engine. This change ensures efficient resource management and avoids the is

[PATCH v6 1/3] drm/amd/amdgpu: Increase max rings to enable SDMA page ring

2025-02-28 Thread jesse.zh...@amd.com
From: "jesse.zh...@amd.com" Increase the maximum number of rings supported by the AMDGPU driver from 133 to 149. This change is necessary to enable support for the SDMA page ring. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 3/4] drm/amdgpu: Remove JPEG from vega and carrizo video caps

2025-02-28 Thread David Rosca
JPEG is only supported for VCN1+. Signed-off-by: David Rosca --- drivers/gpu/drm/amd/amdgpu/soc15.c | 1 - drivers/gpu/drm/amd/amdgpu/vi.c| 7 --- 2 files changed, 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c index f01176da8b3e..d5

[PATCH 4/4] drm/amdgpu: Update SRIOV video codec caps

2025-02-28 Thread David Rosca
There have been multiple fixes to the video caps that are missing for SRIOV. Update the SRIOV caps with correct values. Signed-off-by: David Rosca --- drivers/gpu/drm/amd/amdgpu/nv.c| 16 drivers/gpu/drm/amd/amdgpu/soc21.c | 10 ++ 2 files changed, 10 insertions(+),

[PATCH 2/4] drm/amdgpu: Fix JPEG video caps max size for navi1x and raven

2025-02-28 Thread David Rosca
8192x8192 is the maximum supported resolution. Signed-off-by: David Rosca --- drivers/gpu/drm/amd/amdgpu/nv.c| 2 +- drivers/gpu/drm/amd/amdgpu/soc15.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c ind

[PATCH 1/4] drm/amdgpu: Fix MPEG2, MPEG4 and VC1 video caps max size

2025-02-28 Thread David Rosca
1920x1088 is the maximum supported resolution. Signed-off-by: David Rosca --- drivers/gpu/drm/amd/amdgpu/nv.c | 18 - drivers/gpu/drm/amd/amdgpu/vi.c | 36 - 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgp

Re: [PATCH 2/2] drm/amdgpu: Add support for CPERs on virtualization

2025-02-28 Thread Yi, Tony
[AMD Official Use Only - AMD Internal Distribution Only] Hi Hawking, We still use the BM CPER ring (through amdgpu_cper_ring_write) but as SRIOV requires an extra step to query the CPERs, we created a new function amdgpu_debugfs_virt_ring_read within amdgpu_debugfs_virt_ring_fops that does exa

Re: [PATCH 2/6] drm/amdgpu: add dce_v6_0_soft_reset() to DCE6

2025-02-28 Thread Alex Deucher
On Thu, Feb 27, 2025 at 2:11 PM Alexandre Demers wrote: > > On Thu, Feb 27, 2025 at 2:05 PM Alex Deucher wrote: > > > > On Thu, Feb 27, 2025 at 2:01 PM Alex Deucher wrote: > > > > > > On Thu, Feb 27, 2025 at 1:52 PM Alexandre Demers > > > wrote: > > > > > > > > On Thu, Feb 27, 2025 at 9:23 AM A

[PATCH v2 2/2] drm/amdgpu: complete dce_v6_0_set_crtc_vline_interrupt_state() in DCE6

2025-02-28 Thread Alexandre Demers
dce_v6_0_set_crtc_vline_interrupt_state() was empty without any info to inform the user. Based on DCE8 and DCE10 code. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 44 +++ 1 file changed, 44 insertions(+) diff --git a/drivers/gpu/drm/amd/a

[PATCH 2/5] drm/amdgpu/Kconfig: fix wording of DRM_AMDGPU_NAVI3X_USERQ

2025-02-28 Thread Alex Deucher
The feature is not navi3x specific at this point. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/Kconfig b/drivers/gpu/drm/amd/amdgpu/Kconfig index 6703bd832e2e8..a614320114796

[PATCH v2 1/2] drm/amdgpu: add dce_v6_0_soft_reset() to DCE6

2025-02-28 Thread Alexandre Demers
DCE6 was missing soft reset, but it was easily identifiable under radeon. This should be it, pretty much as it is done under DCE8 and DCE10. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 53 ++- 1 file changed, 51 insertions(+), 2 deletions(-