Re: [PATCH] drm/amd/display: add panel_power_savings sysfs entry to eDP connectors

2024-01-26 Thread Mario Limonciello
On 1/26/2024 16:22, Hamza Mahfooz wrote: We want programs besides the compositor to be able to enable or disable panel power saving features. However, since they are currently only configurable through DRM properties, that isn't possible. So, to remedy that issue introduce a new

[PATCH] drm/amd/display: add panel_power_savings sysfs entry to eDP connectors

2024-01-26 Thread Hamza Mahfooz
We want programs besides the compositor to be able to enable or disable panel power saving features. However, since they are currently only configurable through DRM properties, that isn't possible. So, to remedy that issue introduce a new "panel_power_savings" sysfs attribute. Cc: Mario

Re: Have WX 3200 Radeon graphics card -- cannot get X11 session to work

2024-01-26 Thread William Bulley
According to "Deucher, Alexander" on Fri, 01/26/24 at 16:28: > > [AMD Official Use Only - General] > > > Unfortunately, the mouse pointer is frozen at the exact center of the > > 3440 x 1440 monitor, and it will not move. I don't know how to fix this. > > Any > > help or ideas or

RE: [PATCH] drm/amdkfd: Use correct drm device for cgroup permission check

2024-01-26 Thread Kasiviswanathan, Harish
[AMD Official Use Only - General] Reviewed-by: Harish Kasiviswanathan -Original Message- From: amd-gfx On Behalf Of Mukul Joshi Sent: Friday, January 26, 2024 3:40 PM To: amd-gfx@lists.freedesktop.org Cc: Joshi, Mukul ; Kuehling, Felix Subject: [PATCH] drm/amdkfd: Use correct drm

RE: Have WX 3200 Radeon graphics card -- cannot get X11 session to work

2024-01-26 Thread Deucher, Alexander
[AMD Official Use Only - General] > -Original Message- > From: William Bulley > Sent: Friday, January 26, 2024 4:19 PM > To: Deucher, Alexander > Cc: amd-gfx@lists.freedesktop.org > Subject: Re: Have WX 3200 Radeon graphics card -- cannot get X11 session to > work > > According to

Re: Have WX 3200 Radeon graphics card -- cannot get X11 session to work

2024-01-26 Thread William Bulley
According to "Deucher, Alexander" on Fri, 01/26/24 at 15:50: > > [Public] > > Kernel driver looks like its loaded properly. > > I don't really have much experience with freebsd, but it doesn't seem to be > able to open the kernel driver. Perhaps X starts before the kernel driver > has

RE: Have WX 3200 Radeon graphics card -- cannot get X11 session to work

2024-01-26 Thread Deucher, Alexander
[Public] > -Original Message- > From: amd-gfx On Behalf Of > William Bulley > Sent: Friday, January 26, 2024 1:45 PM > To: amd-gfx@lists.freedesktop.org > Subject: Have WX 3200 Radeon graphics card -- cannot get X11 session to > work > > I am running FreeBSD 14.0-STABLE from January 4th.

[PATCH] drm/amdkfd: Use correct drm device for cgroup permission check

2024-01-26 Thread Mukul Joshi
On GFX 9.4.3, for a given KFD node, fetch the correct drm device from XCP manager when checking for cgroup permissions. Signed-off-by: Mukul Joshi --- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git

[PATCH] drm/amdgpu: Support >=4GB GTT memory mapping

2024-01-26 Thread Philip Yang
This is to work around a bug in function drm_prime_pages_to_sg if length of nr_pages >= 4GB, by doing the same check for max_segment and then calling sg_alloc_table_from_pages_segment directly instead. This issue shows up on APU because VRAM is allocated as GTT memory. It also fixes >=4GB GTT

Re: [RFC PATCH 2/2] drm/amd/display: switch amdgpu_dm_connector to use struct drm_edid

2024-01-26 Thread Alex Hung
On 2024-01-26 09:28, Melissa Wen wrote: Replace raw edid handling (struct edid) with the opaque EDID type (struct drm_edid) on amdgpu_dm_connector for consistency. It may also prevent mismatch of approaches in different parts of the driver code. Working in progress. There are a couple of cast

Re: [PATCH v2] drm/amdkfd: reserve the BO before validating it

2024-01-26 Thread Felix Kuehling
On 2024-01-25 20:59, Yu, Lang wrote: [AMD Official Use Only - General] -Original Message- From: Kuehling, Felix Sent: Thursday, January 25, 2024 5:41 AM To: Yu, Lang ; amd-gfx@lists.freedesktop.org Cc: Francis, David Subject: Re: [PATCH v2] drm/amdkfd: reserve the BO before

[PATCH 2/2] drm/amd: Fetch the EDID from _DDC if available for eDP

2024-01-26 Thread Mario Limonciello
Some manufacturers have intentionally put an EDID that differs from the EDID on the internal panel on laptops. Attempt to fetch this EDID if it exists and prefer it over the EDID that is provided by the panel. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu.h |

[PATCH 1/2] ACPI: video: Handle fetching EDID that is longer than 256 bytes

2024-01-26 Thread Mario Limonciello
The ACPI specification allows for an EDID to be up to 512 bytes but the _DDC EDID fetching code will only try up to 256 bytes. Modify the code to instead start at 512 bytes and work it's way down instead. Link:

[PATCH 0/2] Fetch EDID from ACPI _DDC method if available

2024-01-26 Thread Mario Limonciello
Some laptops ship an EDID in the BIOS encoded in the _DDC method that differs than the EDID directly on the laptop panel for $REASONS. This is the EDID that is used by the AMD Windows driver, and so sometimes different results are found in different operating systems. This series changes it so

Have WX 3200 Radeon graphics card -- cannot get X11 session to work

2024-01-26 Thread William Bulley
I am running FreeBSD 14.0-STABLE from January 4th. I have read the handbook and followed the instructions there. I have these drivers: unix# ls -al /usr/local/lib/xorg/modules/drivers total 476 drwxr-xr-x 2 root wheel 8 Jan 21 14:18 . drwxr-xr-x 5 root wheel 13 Jan 21 14:18 ..

Re: [RFC PATCH 0/2] drm/amd/display: switch amdgpu_dm_connector to

2024-01-26 Thread Mario Limonciello
On 1/26/2024 10:28, Melissa Wen wrote: Hi, I'm debugging a null-pointer dereference when running igt@kms_connector_force_edid and the way I found to solve the bug is to stop using raw edid handler in amdgpu_connector_funcs_force and create_eml_sink in favor of managing resouces via sruct

[RFC PATCH 2/2] drm/amd/display: switch amdgpu_dm_connector to use struct drm_edid

2024-01-26 Thread Melissa Wen
Replace raw edid handling (struct edid) with the opaque EDID type (struct drm_edid) on amdgpu_dm_connector for consistency. It may also prevent mismatch of approaches in different parts of the driver code. Working in progress. There are a couple of cast warnings and it was only tested with IGT.

[RFC PATCH 0/2] drm/amd/display: switch amdgpu_dm_connector to

2024-01-26 Thread Melissa Wen
Hi, I'm debugging a null-pointer dereference when running igt@kms_connector_force_edid and the way I found to solve the bug is to stop using raw edid handler in amdgpu_connector_funcs_force and create_eml_sink in favor of managing resouces via sruct drm_edid helpers (Patch 1). The proper solution

[RFC PATCH 1/2] drm/amd/display: fix null-pointer dereference on edid reading

2024-01-26 Thread Melissa Wen
Use drm_edid helpers to fix a null-pointer derefence that happens when running igt@kms_force_connector_basic in a system with DCN2.1 and HDMI connector detected as below: [ +0.178146] BUG: kernel NULL pointer dereference, address: 04c0 [ +0.10] #PF: supervisor read access in

Re: [PATCH] drm/amdgpu: Limit the maximum fragment to granularity size

2024-01-26 Thread Philip Yang
On 2024-01-26 10:35, Christian König wrote: Am 26.01.24 um 16:17 schrieb Philip Yang: On 2024-01-26 09:59, Christian König wrote: Am 26.01.24 um 15:38 schrieb Philip Yang: svm range support

[PATCH 1/2] drm/amdgpu: fix using the reserved VMID with gang submit

2024-01-26 Thread Christian König
We need to ensure that even when using a reserved VMID that the gang members can still run in parallel. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 21 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c

[PATCH 2/2] drm/amdgpu: reject gang submit on reserved VMIDs

2024-01-26 Thread Christian König
A gang submit won't work if the VMID is reserved and we can't flush out VM changes from multiple engines at the same time. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 15 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 15 ++-

Two patches to improve gang submit with reserved VMIDs

2024-01-26 Thread Christian König
Hi guys, those two patches clean up gang submit. The first one should prevent crashes when gang submit is used together with a reserved VMID. The second rejects gang submits with a reserved VMID when this won't work because of HW limitations. Only smoke tested since I need more HW for this

[PATCH v4 6/8] drm/amd/display: Introduce KUnit tests for dcn20_fpu

2024-01-26 Thread Rodrigo Siqueira
From: Magali Lemes This commit adds unit tests to the functions dcn20_cap_soc_clocks and dcn21_update_bw_bounding_box from dcn20/dcn20_fpu. Signed-off-by: Magali Lemes Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/display/tests/Makefile| 3 +-

[PATCH v4 8/8] Documentation/gpu: Add Display Core Unit Test documentation

2024-01-26 Thread Rodrigo Siqueira
From: Maíra Canal Explain how to run the KUnit tests present in the AMDGPU's Display Core and clarify which architectures and tools can be used to run the tests. Moreover, explains how to add new tests to the existing tests. Signed-off-by: Maíra Canal ---

[PATCH v4 5/8] drm/amd/display: Introduce KUnit to dcn20/display_mode_vba_20 library

2024-01-26 Thread Rodrigo Siqueira
From: Maíra Canal The display_mode_vba_20 deals with hundreds of display parameters for the DCN20 and sometimes does it in odd ways. The addition of unit tests intends to assure the quality of the code delivered by HW engineers and, also make it possible to refactor the code decreasing concerns

[PATCH v4 7/8] drm/amd/display: Introduce KUnit tests to dc_dmub_srv library

2024-01-26 Thread Rodrigo Siqueira
From: Maíra Canal Add a unit test to the SubVP feature in order to avoid possible regressions and ensure code robustness. In particular, this new test validates the expected parameters when using 4k144 and 4k240 displays. Signed-off-by: Maíra Canal Signed-off-by: Rodrigo Siqueira Reported-by:

[PATCH v4 4/8] drm/amd/display: Introduce KUnit tests to the display_mode_vba library

2024-01-26 Thread Rodrigo Siqueira
From: Maíra Canal The display_mode_vba library deals with hundreds of display parameters and sometimes does it in odd ways. The addition of unit tests intends to assure the quality of the code delivered by HW engineers and, also make it possible to refactor the code decreasing concerns about

[PATCH v4 3/8] drm/amd/display: Introduce KUnit tests to display_rq_dlg_calc_20

2024-01-26 Thread Rodrigo Siqueira
From: Isabella Basso This adds tests to the bit encoding format verification functions on the file. They're meant to be simpler so as to provide a proof of concept on testing DML code. Signed-off-by: Isabella Basso Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/display/Kconfig

[PATCH v4 2/8] drm/amd/display: Introduce KUnit tests to the bw_fixed library

2024-01-26 Thread Rodrigo Siqueira
From: Maíra Canal KUnit unifies the test structure and provides helper tools that simplify the development of tests. Basic use case allows running tests as regular processes, which makes easier to run unit tests on a development machine and to integrate the tests in a CI system. This commit

[PATCH v4 1/8] drm/amd/display: Introduce KUnit tests for fixed31_32 library

2024-01-26 Thread Rodrigo Siqueira
From: Tales Aparecida The fixed31_32 library performs a lot of the mathematical operations involving fixed-point arithmetic and the conversion of integers to fixed-point representation. This unit tests intend to assure the proper functioning of the basic mathematical operations of fixed-point

[PATCH v4 0/8] drm/amd/display: Introduce KUnit to Display Mode Library

2024-01-26 Thread Rodrigo Siqueira
In 2022, we got a great patchset from a GSoC project introducing unit tests to the amdgpu display. Since version 3, this effort was put on hold, and now I'm attempting to revive it. I'll add part of the original cover letter at the bottom of this cover letter, but you can read all the original

Re: [PATCH 1/1] drm/amdgpu: move the drm client creation behind drm device registration

2024-01-26 Thread Christian König
Am 25.01.24 um 07:18 schrieb Le Ma: This patch is to eliminate interrupt warning below: "[drm] Fence fallback timer expired on ring sdma0.0". An early vm pt clearing job is sent to SDMA ahead of interrupt enabled, introduced by patch below: - drm/amdkfd: Export DMABufs from KFD using

Re: [PATCH] drm/amdgpu: Limit the maximum fragment to granularity size

2024-01-26 Thread Christian König
Am 26.01.24 um 16:17 schrieb Philip Yang: On 2024-01-26 09:59, Christian König wrote: Am 26.01.24 um 15:38 schrieb Philip Yang: svm range support partial migration and mapping update, for size 4MB virtual address 4MB alignment and physical address continuous range, if mapping to GPU with

Re: [PATCH 3/3] amdgpu/drm: Use vram manager for virtualization page retirement

2024-01-26 Thread Christian König
Am 25.01.24 um 00:21 schrieb Zhigang Luo: From: Victor Skvortsov In runtime, use vram manager for virtualization page retirement. Signed-off-by: Victor Skvortsov Change-Id: Ia8fe6c7d4e4acae9d3a953b3ba4567e8fc6de0fa --- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 30

Re: [PATCH] drm/amdgpu: Limit the maximum fragment to granularity size

2024-01-26 Thread Philip Yang
On 2024-01-26 09:59, Christian König wrote: Am 26.01.24 um 15:38 schrieb Philip Yang: svm range support partial migration and mapping update, for size 4MB virtual address 4MB alignment and physical address continuous

Re: [PATCH] drm/amdgpu: Limit the maximum fragment to granularity size

2024-01-26 Thread Christian König
Am 26.01.24 um 15:38 schrieb Philip Yang: svm range support partial migration and mapping update, for size 4MB virtual address 4MB alignment and physical address continuous range, if mapping to GPU with fs=10, after updating mapping of the first 2MB, if the second 2MB mapping fs=10 in cache TLB,

[PATCH] drm/amdgpu: Limit the maximum fragment to granularity size

2024-01-26 Thread Philip Yang
svm range support partial migration and mapping update, for size 4MB virtual address 4MB alignment and physical address continuous range, if mapping to GPU with fs=10, after updating mapping of the first 2MB, if the second 2MB mapping fs=10 in cache TLB, this causes the first 2MB access to the

Re: BUG [RESEND][NEW BUG]: kernel NULL pointer dereference, address: 0000000000000008

2024-01-26 Thread Mirsad Todorovac
Hi Ma Jun, Greetings again. So, I just tested the recommended patch and the issue with the graphical login screen was successfully resolved. Thank you very much for your prompt reviews and recommended patches. God bless. Best regards, Mirsad Todorovac On 1/25/24 10:29, Mirsad Todorovac

Re: BUG [RESEND][NEW BUG]: kernel NULL pointer dereference, address: 0000000000000008

2024-01-26 Thread Mirsad Todorovac
Hi Ma Jun, Copy that. This appears to be the exact problem, and thank you for reviewing the bug report at such a short notice. I apologise for the wrong assertion. The patch you sent then just triggered another bug, and it is not manifested without the patch (but a NULL pointer dereference

RE: [PATCH 2/2] drm/amdgpu: reset gpu for pm abort case

2024-01-26 Thread Liang, Prike
[AMD Official Use Only - General] > > On 1/25/2024 8:52 AM, Prike Liang wrote: > > In the pm abort case the gfx power rail not turn off from FCH side and > > this will lead to the gfx reinitialized failed base on the unknown gfx > > HW status, so let's reset the gpu to a known good power state. >

RE: [PATCH 2/2] drm/amdgpu: reset gpu for pm abort case

2024-01-26 Thread Liang, Prike
[AMD Official Use Only - General] > From: Alex Deucher > Sent: Friday, January 26, 2024 6:57 AM > To: Liang, Prike > Cc: amd-gfx@lists.freedesktop.org; Deucher, Alexander > ; Sharma, Deepak > > Subject: Re: [PATCH 2/2] drm/amdgpu: reset gpu for pm abort case > > On Wed, Jan 24, 2024 at 11:11