[PATCH 2/9] drm/amdgpu: remove amdgpu_pin_restricted()

2024-06-10 Thread Christian König
We haven't used the functionality to pin BOs in a certain range at all while the driver existed. Just nuke it. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 56 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 2 - 2 files changed, 5 insertio

[PATCH 6/9] drm/amdgpu: stop updating the SEQ64 VA during open

2024-06-10 Thread Christian König
Stop updating the SEQ64 VA when the KMS device is opened. Instead update it on first use in the CS. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c| 8 drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.c | 7 --- 2 files changed, 8 insertions(+), 7 deletions(-)

[PATCH 3/9] drm/amdgpu: nuke the VM PD/PT shadow handling

2024-06-10 Thread Christian König
This was only used as workaround for recovering the page tables after VRAM was lost and is no longer necessary after the function amdgpu_vm_bo_reset_state_machine() started to do the same. Compute never used shadows either, so the only proplematic case left is SVM and that is most likely not recov

[PATCH 8/9] drm/amdgpu: drop the runtim PM in amdgpu_driver_open_kms

2024-06-10 Thread Christian König
Fingers crossed that this works now. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 22 -- 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c index 28a

[PATCH 9/9] drm/amdgpu: try to avoid runtime PM in amdgpu_driver_close_kms

2024-06-10 Thread Christian König
That's a bit more trickier since we really need hw access for UVD and VCE and eventually when the VM was in use. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/am

[PATCH 1/9] drm/amdgpu: explicitely set the AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS flag

2024-06-10 Thread Christian König
Instead of having that in the amdgpu_bo_pin() function applied for all pinned BOs. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c

[PATCH 4/9] drm/amdgpu: remove the CPU placement fallback

2024-06-10 Thread Christian König
This limitation originated in the days where TTM couldn't handle BOs without any placement. Today a BO without backing store is perfectly valid. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/gpu/d

[PATCH 7/9] drm/amdgpu: cleanup seq64 VA map/unmap once more

2024-06-10 Thread Christian König
Provide a hint how many BOs we are going to use and prevent unmap from waiting interruptible. Also avoid using fpriv in unmap and work give VM and VA as parameter instead. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_seq

[PATCH 5/9] drm/amdgpu: delay VM root PD allocation to first use

2024-06-10 Thread Christian König
Try to not allocate the backing store for the root PD before it is used for the first time. This avoids talking to the GPU while initializing the VM. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c| 29 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c |

Re: [PATCH 1/9] drm/amdgpu: explicitely set the AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS flag

2024-06-10 Thread Christian König
Just FYI: This is a completed untested set of WIP patches. But it might get you a step closer of avoiding grabbing the runtime PM references. Regards, Christian. Am 10.06.24 um 11:26 schrieb Christian König: Instead of having that in the amdgpu_bo_pin() function applied for all pinned BOs.

[PATCH] drm/amd/display: Guard ACPI calls with CONFIG_ACPI

2024-06-10 Thread sunpeng.li
From: Leo Li To fix CONFIG_ACPI disabled build error. Fixes: ec6f30c776ad ("drm/amd/display: Set default brightness according to ACPI") Signed-off-by: Leo Li --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/dis

Re: [PATCH] drm/amd/display: Guard ACPI calls with CONFIG_ACPI

2024-06-10 Thread Mario Limonciello
On 6/10/2024 09:55, sunpeng...@amd.com wrote: From: Leo Li To fix CONFIG_ACPI disabled build error. Fixes: ec6f30c776ad ("drm/amd/display: Set default brightness according to ACPI") Signed-off-by: Leo Li --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 ++ 1 file changed, 6 i

Re: [PATCH] drm/amd/display: Guard ACPI calls with CONFIG_ACPI

2024-06-10 Thread Leo Li
On 2024-06-10 11:32, Mario Limonciello wrote: On 6/10/2024 09:55, sunpeng...@amd.com wrote: From: Leo Li To fix CONFIG_ACPI disabled build error. Fixes: ec6f30c776ad ("drm/amd/display: Set default brightness according to ACPI") Signed-off-by: Leo Li ---   drivers/gpu/drm/amd/display/amdg

[PATCH v2] drm/amd/display: Guard ACPI calls with CONFIG_ACPI

2024-06-10 Thread sunpeng.li
From: Leo Li To fix CONFIG_ACPI disabled build error. v2: Instead of ifdef-ing inside function, define a no-op stub for amdgpu_acpi_get_backlight_caps when CONFIG_ACPI=n Fixes: ec6f30c776ad ("drm/amd/display: Set default brightness according to ACPI") Signed-off-by: Leo Li --- drivers/gpu/dr

Re: [PATCH v2] drm/amd/display: Guard ACPI calls with CONFIG_ACPI

2024-06-10 Thread Mario Limonciello
On 6/10/2024 10:58, sunpeng...@amd.com wrote: From: Leo Li To fix CONFIG_ACPI disabled build error. v2: Instead of ifdef-ing inside function, define a no-op stub for amdgpu_acpi_get_backlight_caps when CONFIG_ACPI=n Fixes: ec6f30c776ad ("drm/amd/display: Set default brightness according to A

[PATCH v3] drm/amdgpu: Fix the BO release clear memory warning

2024-06-10 Thread Arunpravin Paneer Selvam
This happens when the amdgpu_bo_release_notify running before amdgpu_ttm_set_buffer_funcs_status set the buffer funcs to enabled. check the buffer funcs enablement before calling the fill buffer memory. v2:(Christian) - Apply it only for GEM buffers and since GEM buffers are only allocated/

Re: [PATCH v3] drm/amdgpu: Fix the BO release clear memory warning

2024-06-10 Thread Christian König
Am 10.06.24 um 20:04 schrieb Arunpravin Paneer Selvam: This happens when the amdgpu_bo_release_notify running before amdgpu_ttm_set_buffer_funcs_status set the buffer funcs to enabled. check the buffer funcs enablement before calling the fill buffer memory. v2:(Christian) - Apply it only for

Re: [PATCH v3] drm/amdgpu: Fix the BO release clear memory warning

2024-06-10 Thread Paneer Selvam, Arunpravin
Hi Christian, On 6/10/2024 11:35 PM, Christian König wrote: Am 10.06.24 um 20:04 schrieb Arunpravin Paneer Selvam: This happens when the amdgpu_bo_release_notify running before amdgpu_ttm_set_buffer_funcs_status set the buffer funcs to enabled. check the buffer funcs enablement before calling

Re: [PATCH] drm/amd: force min_input_signal to 0 on Framework AMD 13/16

2024-06-10 Thread Mario Limonciello
s.min_input_signal = 0; + } } else { atif->backlight_caps.caps_valid = false; } --- base-commit: 83a7eefedc9b56fe7bfeff13b6c7356688ffa670 change-id: 20240610-amdgpu-min-backlight-quirk-8402fd8e736a Best regards,

Re: [PATCH] drm/amd: force min_input_signal to 0 on Framework AMD 13/16

2024-06-10 Thread Mario Limonciello
& quirks->ignore_min_input_signal) { + DRM_INFO("amdgpu_acpi quirk: min_input_signal=0\n"); + atif->backlight_caps.min_input_signal = 0; + } } else { atif->backlight_caps.caps_valid = false; } --- base-commit: 83a7eefedc9b56fe7bfeff13b6c7356688ffa670 change-id: 20240610-amdgpu-min-backlight-quirk-8402fd8e736a Best regards,

Re: 6.10/bisected/regression - commits bc87d666c05 and 6d4279cb99ac cause appearing green flashing bar on top of screen on Radeon 6900XT and 120Hz

2024-06-10 Thread Mikhail Gavrilov
On Fri, Jun 7, 2024 at 5:29 PM Linux regression tracking (Thorsten Leemhuis) wrote: > > [CCing the other amd drm maintainers] > > Mikhail: are those details in any way relevant? Then in the future best > leave them out (or make things easier to follow), they make the bug > report confusing and sou

[PATCH] drm/amd/swsmu: add MALL init support workaround for smu_v14_0_1

2024-06-10 Thread Li Ma
[Why] SMU firmware has not supported MALL PG. [How] Disable MALL PG and make it always on until SMU firmware is ready. Signed-off-by: Li Ma Reviewed-by: Tim Huang --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 13 drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 5 ++ .../pm/swsmu/in