[PATCH v2] drm/amd/pm: Allow setting max UCLK on SMU v13.0.6

2024-02-08 Thread Lijo Lazar
Allow reducing max UCLK in MANUAL performance level. New UCLK value should be less than the max DPM level UCLK level value. Ex: echo manual > "/sys/bus/pci/devices/.../power_dpm_force_performance_level" echo m 1 900 > "/sys/bus/pci/devices/.../pp_od_clk_voltage” echo c >

Re: [PATCH] drm/amd/pm: Allow setting max UCLK on SMU v13.0.6

2024-02-08 Thread Lazar, Lijo
Sending another one, please ignore. Thanks, Lijo On 2/9/2024 12:04 PM, Lijo Lazar wrote: > Allow reducing max UCLK in MANUAL performance level. New UCLK value > should be less than the max DPM level UCLK level value. > > Ex: > echo manual >

[PATCH] drm/amd/pm: Allow setting max UCLK on SMU v13.0.6

2024-02-08 Thread Lijo Lazar
Allow reducing max UCLK in MANUAL performance level. New UCLK value should be less than the max DPM level UCLK level value. Ex: echo manual > "/sys/bus/pci/devices/.../power_dpm_force_performance_level" echo m 1 900 > "/sys/bus/pci/devices/.../pp_od_clk_voltage” echo c >

RE: [PATCH] drm/amdgpu/psp: update define to better align with its meaning

2024-02-08 Thread Zhang, Hawking
[AMD Official Use Only - General] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: amd-gfx On Behalf Of Alex Deucher Sent: Friday, February 9, 2024 05:15 To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: [PATCH] drm/amdgpu/psp: update define to

Re: [PATCH] drm/amdgpu: make damage clips support configurable

2024-02-08 Thread Mario Limonciello
On 2/8/2024 16:11, Hamza Mahfooz wrote: We have observed that there are quite a number of PSR-SU panels on the market that are unable to keep up with what user space throws at them, resulting in hangs and random black screens. So, make damage clips support configurable and disable it by default

[PATCH] drm/amdgpu: make damage clips support configurable

2024-02-08 Thread Hamza Mahfooz
We have observed that there are quite a number of PSR-SU panels on the market that are unable to keep up with what user space throws at them, resulting in hangs and random black screens. So, make damage clips support configurable and disable it by default for PSR-SU displays. Cc: Mario

[PATCH] drm/amdgpu/psp: update define to better align with its meaning

2024-02-08 Thread Alex Deucher
MEM_TRAINING_ENCROACHED_SIZE is for BIST training data. It's not memory type specific. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 2 +- drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 2 +- 3 files changed, 3

[PATCH v4 3/3] drm/amdgpu: Make it possible to async flip overlay planes

2024-02-08 Thread André Almeida
amdgpu can handle async flips on overlay planes, so mark it as true during the plane initialization. Signed-off-by: André Almeida --- v4: new patch drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH v4 2/3] drm: Allow drivers to choose plane types to async flip

2024-02-08 Thread André Almeida
Different planes may have different capabilities of doing async flips, so create a field to let drivers allow async flip per plane type. Signed-off-by: André Almeida --- v4: new patch drivers/gpu/drm/drm_atomic_uapi.c | 4 ++-- drivers/gpu/drm/drm_plane.c | 3 +++ include/drm/drm_plane.h

[PATCH v4 0/3] drm/atomic: Allow drivers to write their own plane check for async

2024-02-08 Thread André Almeida
Hi, AMD hardware can do async flips with overlay planes, so this patchset does a small redesign to allow drivers to choose per plane type if they can or cannot do async flips. It also allows async commits with IN_FENCE_ID in any driver. Changes from v3: - Major patchset redesign v3:

[PATCH v4 1/3] drm/atomic: Allow userspace to use explicit sync with atomic async flips

2024-02-08 Thread André Almeida
Allow userspace to use explicit synchronization with atomic async flips. That means that the flip will wait for some hardware fence, and then will flip as soon as possible (async) in regard of the vblank. Signed-off-by: André Almeida --- v4: no changes drivers/gpu/drm/drm_atomic_uapi.c | 4

Re: [Patch v2] drm/amdkfd: update SIMD distribution algo for GFXIP 9.4.2 onwards

2024-02-08 Thread Felix Kuehling
On 2024-02-08 15:01, Bhardwaj, Rajneesh wrote: On 2/8/2024 2:41 PM, Felix Kuehling wrote: On 2024-02-07 23:14, Rajneesh Bhardwaj wrote: In certain cooperative group dispatch scenarios the default SPI resource allocation may cause reduced per-CU workgroup occupancy. Set

[PATCH 3/4] drm/amdgpu/jpeg5: Enable doorbell

2024-02-08 Thread Alex Deucher
From: Sonny Jiang Add doorbell for JPEG5 Signed-off-by: Sonny Jiang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c

[PATCH 4/4] drm/amdgpu: Add jpeg_v5_0_0 ip block support

2024-02-08 Thread Alex Deucher
From: Sonny Jiang Enable support for jpeg_v5_0_0 ip block. Signed-off-by: Sonny Jiang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c

[PATCH 1/4] drm/amdgpu: Add JPEG5 support

2024-02-08 Thread Alex Deucher
From: Sonny Jiang Add support for JPEG5 Signed-off-by: Sonny Jiang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c | 2 + drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 16 +-

[PATCH 2/4] drm/amdgpu/jpeg5: add power gating support

2024-02-08 Thread Alex Deucher
From: Sonny Jiang Add PG support for JPEG5 Signed-off-by: Sonny Jiang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c

[PATCH 0/4] JPEG 5.0 Support

2024-02-08 Thread Alex Deucher
This patch set adds support for JPEG 5.0.x. Sonny Jiang (4): drm/amdgpu: Add JPEG5 support drm/amdgpu/jpeg5: add power gating support drm/amdgpu/jpeg5: Enable doorbell drm/amdgpu: Add jpeg_v5_0_0 ip block support drivers/gpu/drm/amd/amdgpu/Makefile | 3 +-

Re: [Patch v2] drm/amdkfd: update SIMD distribution algo for GFXIP 9.4.2 onwards

2024-02-08 Thread Bhardwaj, Rajneesh
On 2/8/2024 2:41 PM, Felix Kuehling wrote: On 2024-02-07 23:14, Rajneesh Bhardwaj wrote: In certain cooperative group dispatch scenarios the default SPI resource allocation may cause reduced per-CU workgroup occupancy. Set COMPUTE_RESOURCE_LIMITS.FORCE_SIMD_DIST=1 to mitigate soft hang

[PATCH 3/4] drm/amdgpu: add VCN_5_0_0 IP block support

2024-02-08 Thread Alex Deucher
From: Sonny Jiang Add VCN_5_0_0 IP init, ring functions, DPG support. v2: squash in warning fixes (Alex) v3: squash in block and ring init, boot, doorbell enablement, DPG support (Alex) Signed-off-by: Sonny Jiang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher ---

[PATCH 0/4] VCN 5.0 Support

2024-02-08 Thread Alex Deucher
This patch set adds support for VCN (Video Codec Next) 5.0.x. VCN is the multimedia codec IP in AMD SoCs. Patch 1 adds new registers and is too large for the mailing list so it has been omitted. Hawking Zhang (1): drm/amdgpu: Add vcn v5_0_0 ip headers (v5) Sonny Jiang (3): drm/amdgpu: add

[PATCH 4/4] amdgpu/drm: Add vcn_v5_0_0_ip_block support

2024-02-08 Thread Alex Deucher
From: Sonny Jiang Enable support for vcn_v5_0_0_ip_block Signed-off-by: Sonny Jiang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c

[PATCH 2/4] drm/amdgpu: add VCN_5_0_0 firmware support

2024-02-08 Thread Alex Deucher
From: Sonny Jiang Add VCN5_0_0 firmware support Signed-off-by: Sonny Jiang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c

Re: [Patch v2] drm/amdkfd: update SIMD distribution algo for GFXIP 9.4.2 onwards

2024-02-08 Thread Felix Kuehling
On 2024-02-07 23:14, Rajneesh Bhardwaj wrote: In certain cooperative group dispatch scenarios the default SPI resource allocation may cause reduced per-CU workgroup occupancy. Set COMPUTE_RESOURCE_LIMITS.FORCE_SIMD_DIST=1 to mitigate soft hang scenarions. Suggested-by: Joseph Greathouse

Re: [PATCH v4 1/3] drm: Add drm_get_acpi_edid() helper

2024-02-08 Thread Mario Limonciello
On 2/8/2024 08:31, Jani Nikula wrote: On Thu, 08 Feb 2024, Maxime Ripard wrote: On Thu, Feb 08, 2024 at 11:57:11AM +0200, Jani Nikula wrote: On Wed, 07 Feb 2024, Mario Limonciello wrote: Some manufacturers have intentionally put an EDID that differs from the EDID on the internal panel on

Re: [PATCH v4 2/3] drm/amd: Stop evicting resources on APUs in suspend

2024-02-08 Thread Alex Deucher
On Thu, Feb 8, 2024 at 1:48 AM Mario Limonciello wrote: > > commit 5095d5418193 ("drm/amd: Evict resources during PM ops prepare() > callback") intentionally moved the eviction of resources to earlier in > the suspend process, but this introduced a subtle change that it occurs > before

[pull] amdgpu drm-fixes-6.8

2024-02-08 Thread Alex Deucher
Hi Dave, Sima, Fixes for 6.8. The following changes since commit d0399da9fb5f8e3d897b9776bffee2d3bfe20210: drm/sched: Re-queue run job worker when drm_sched_entity_pop_job() returns NULL (2024-02-06 12:47:43 +1000) are available in the Git repository at:

Re: [PATCH v5 1/3] drm/buddy: Implement tracking clear page feature

2024-02-08 Thread Arunpravin Paneer Selvam
On 1/31/2024 11:52 PM, Matthew Auld wrote: On 30/01/2024 19:48, Arunpravin Paneer Selvam wrote: - Add tracking clear page feature. - Driver should enable the DRM_BUDDY_CLEARED flag if it    successfully clears the blocks in the free path. On the otherhand,    DRM buddy marks each block as

Re: [PATCH v4 3/3] drm/amd: Drop unneeded functions to check if s3/s0ix active

2024-02-08 Thread Christian König
Am 08.02.24 um 16:04 schrieb Mario Limonciello: On 2/8/2024 00:54, Christian König wrote: Am 08.02.24 um 06:52 schrieb Mario Limonciello: amdgpu_acpi_is_s0ix_active() and amdgpu_acpi_is_s0ix_active() aren't needed to be checked multiple times in a suspend cycle. Checking and setting up

[PATCH v6 3/3] drm/buddy: Add defragmentation support

2024-02-08 Thread Arunpravin Paneer Selvam
Add a function to support defragmentation. v1: Defragment the memory beginning from min_order till the required memory space is available. Signed-off-by: Arunpravin Paneer Selvam Suggested-by: Matthew Auld --- drivers/gpu/drm/drm_buddy.c | 67 +++--

[PATCH v6 2/3] drm/amdgpu: Enable clear page functionality

2024-02-08 Thread Arunpravin Paneer Selvam
Add clear page support in vram memory region. v1:(Christian) - Dont handle clear page as TTM flag since when moving the BO back in from GTT again we don't need that. - Make a specialized version of amdgpu_fill_buffer() which only clears the VRAM areas which are not already cleared -

[PATCH v6 1/3] drm/buddy: Implement tracking clear page feature

2024-02-08 Thread Arunpravin Paneer Selvam
- Add tracking clear page feature. - Driver should enable the DRM_BUDDY_CLEARED flag if it successfully clears the blocks in the free path. On the otherhand, DRM buddy marks each block as cleared. - Track the available cleared pages size - If driver requests cleared memory we prefer cleared

Re: [PATCH v3 1/2] drm/buddy: Implement tracking clear page feature

2024-02-08 Thread Arunpravin Paneer Selvam
On 1/31/2024 11:59 PM, Matthew Auld wrote: On 30/01/2024 20:30, Arunpravin Paneer Selvam wrote: Hi Matthew, On 12/21/2023 12:51 AM, Matthew Auld wrote: Hi, On 14/12/2023 13:42, Arunpravin Paneer Selvam wrote: - Add tracking clear page feature. - Driver should enable the

Re: [PATCH v4 3/3] drm/amd: Drop unneeded functions to check if s3/s0ix active

2024-02-08 Thread Mario Limonciello
On 2/8/2024 00:54, Christian König wrote: Am 08.02.24 um 06:52 schrieb Mario Limonciello: amdgpu_acpi_is_s0ix_active() and amdgpu_acpi_is_s0ix_active() aren't needed to be checked multiple times in a suspend cycle.  Checking and setting up policy one time in the prepare() callback is

Re: [PATCH] drm/buddy: Fix alloc_range() error handling code

2024-02-08 Thread Matthew Auld
On 08/02/2024 14:17, Matthew Auld wrote: On 08/02/2024 13:47, Arunpravin Paneer Selvam wrote: Hi Matthew, On 2/8/2024 7:00 PM, Matthew Auld wrote: On 07/02/2024 17:44, Arunpravin Paneer Selvam wrote: Few users have observed display corruption when they boot the machine to KDE Plasma or

Re: [PATCH] drm/amd/pm: denote S to the deep sleep clock

2024-02-08 Thread Alex Deucher
On Thu, Feb 8, 2024 at 12:34 AM Kenneth Feng wrote: > > denote S to the deep sleep clock for the clock output on smu > v13.0.0/v13.0.7/v13.0.10 > Would be nice to fix up smu 11 as well at some point. Alex > Signed-off-by: Kenneth Feng > --- > .../drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c |

Re: Re: [PATCH v4 1/3] drm: Add drm_get_acpi_edid() helper

2024-02-08 Thread Jani Nikula
On Thu, 08 Feb 2024, Maxime Ripard wrote: > On Thu, Feb 08, 2024 at 11:57:11AM +0200, Jani Nikula wrote: >> On Wed, 07 Feb 2024, Mario Limonciello wrote: >> > Some manufacturers have intentionally put an EDID that differs from >> > the EDID on the internal panel on laptops. Drivers can call

Re: [PATCH] drm/buddy: Fix alloc_range() error handling code

2024-02-08 Thread Matthew Auld
On 08/02/2024 13:47, Arunpravin Paneer Selvam wrote: Hi Matthew, On 2/8/2024 7:00 PM, Matthew Auld wrote: On 07/02/2024 17:44, Arunpravin Paneer Selvam wrote: Few users have observed display corruption when they boot the machine to KDE Plasma or playing games. We have root caused the problem

[PATCH] drm/amd/display: Fix missing NULL check in dcn21_set_backlight_level()

2024-02-08 Thread Nikita Zhandarovich
On the off chance 'panel_cntl' ends up being not properly initialized, dcn21_set_backlight_level() may hit NULL pointer dereference while changing embedded panel backlight levels. Prevent this issue by using some of the existing checks for the similar purpose. At the same time clean up redundant

Re: [PATCH] drm/buddy: Fix alloc_range() error handling code

2024-02-08 Thread Mario Limonciello
On 2/8/2024 06:06, Arunpravin Paneer Selvam wrote: Hi Christian, On 2/8/2024 12:27 PM, Christian König wrote: Am 07.02.24 um 18:44 schrieb Arunpravin Paneer Selvam: Few users have observed display corruption when they boot the machine to KDE Plasma or playing games. We have root caused the

Re: [PATCH] drm/buddy: Fix alloc_range() error handling code

2024-02-08 Thread Arunpravin Paneer Selvam
Hi Matthew, On 2/8/2024 7:00 PM, Matthew Auld wrote: On 07/02/2024 17:44, Arunpravin Paneer Selvam wrote: Few users have observed display corruption when they boot the machine to KDE Plasma or playing games. We have root caused the problem that whenever alloc_range() couldn't find the required

Re: [PATCH] drm/buddy: Fix alloc_range() error handling code

2024-02-08 Thread Matthew Auld
On 07/02/2024 17:44, Arunpravin Paneer Selvam wrote: Few users have observed display corruption when they boot the machine to KDE Plasma or playing games. We have root caused the problem that whenever alloc_range() couldn't find the required memory blocks the function was returning SUCCESS in

Re: Re: [PATCH v4 1/3] drm: Add drm_get_acpi_edid() helper

2024-02-08 Thread Maxime Ripard
On Thu, Feb 08, 2024 at 11:57:11AM +0200, Jani Nikula wrote: > On Wed, 07 Feb 2024, Mario Limonciello wrote: > > Some manufacturers have intentionally put an EDID that differs from > > the EDID on the internal panel on laptops. Drivers can call this > > helper to attempt to fetch the EDID from

Re: [PATCH] drm/buddy: Fix alloc_range() error handling code

2024-02-08 Thread Arunpravin Paneer Selvam
Hi Christian, On 2/8/2024 12:27 PM, Christian König wrote: Am 07.02.24 um 18:44 schrieb Arunpravin Paneer Selvam: Few users have observed display corruption when they boot the machine to KDE Plasma or playing games. We have root caused the problem that whenever alloc_range() couldn't find the

Re: [PATCH v4 1/3] drm: Add drm_get_acpi_edid() helper

2024-02-08 Thread Jani Nikula
On Wed, 07 Feb 2024, Mario Limonciello wrote: > Some manufacturers have intentionally put an EDID that differs from > the EDID on the internal panel on laptops. Drivers can call this > helper to attempt to fetch the EDID from the BIOS's ACPI _DDC method. > > Signed-off-by: Mario Limonciello >