[PATCH v2] drm/amd/display: Implement bounds check for stream encoder creation in DCN301

2024-02-05 Thread Srinivasan Shanmugam
'stream_enc_regs' array is an array of dcn10_stream_enc_registers structures. The array is initialized with four elements, corresponding to the four calls to stream_enc_regs() in the array initializer. This means that valid indices for this array are 0, 1, 2, and 3. The error message

[PATCH] drm/amd/display: Increase frame-larger-than for all display_mode_vba files

2024-02-05 Thread Nathan Chancellor
0.o := $(dml_ccflags) $(frame_warn_flag) CFLAGS_$(AMDDALPATH)/dc/dml/dcn30/display_rq_dlg_calc_30.o := $(dml_ccflags) --- base-commit: 6813cdca4ab94a238f8eb0cef3d3f3fcbdfb0ee0 change-id: 20240205-amdgpu-raise-flt-for-dml-vba-files-ee5b5a9c5e43 Best regards, -- Nathan Chancellor

[PATCH] drm/amd/display: Disable PSR-SU on Parade 08-01 TCON too

2024-02-05 Thread Mario Limonciello
Stuart Hayhurst has found that both at bootup and fullscreen VA-API video is leading to black screens for around 1 second and kernel WARNING [1] traces when calling dmub_psr_enable() with Parade 08-01 TCON. These symptoms all go away with PSR-SU disabled for this TCON, so disable it for now while

RE: drm/amdkfd: Relocate TBA/TMA to opposite side of VM hole (v2)

2024-02-05 Thread Deucher, Alexander
[Public] > -Original Message- > From: amd-gfx On Behalf Of > Shengyu Qu > Sent: Saturday, February 3, 2024 8:05 AM > To: Kuehling, Felix ; amd-gfx@lists.freedesktop.org > Cc: wiagn...@outlook.com; Cornwall, Jay ; > Koenig, Christian ; Paneer Selvam, Arunpravin > > Subject: Re:

[PATCH v3] drm/amdgpu: change vm->task_info handling

2024-02-05 Thread Shashank Sharma
This patch changes the handling and lifecycle of vm->task_info object. The major changes are: - vm->task_info is a dynamically allocated ptr now, and its uasge is reference counted. - introducing two new helper funcs for task_info lifecycle management - amdgpu_vm_get_task_info: reference

RE: [PATCH] drm/amd/display: Implement bounds check for stream encoder creation in DCN301

2024-02-05 Thread Li, Roman
[Public] Inline. > -Original Message- > From: SHANMUGAM, SRINIVASAN > Sent: Sunday, February 4, 2024 9:35 PM > To: Siqueira, Rodrigo ; Pillai, Aurabindo > > Cc: amd-gfx@lists.freedesktop.org; SHANMUGAM, SRINIVASAN > ; Li, Roman > Subject: [PATCH] drm/amd/display: Implement bounds

Re: [PATCH] drm/amd/display: only call sysfs_remove_group() for eDP connectors

2024-02-05 Thread Harry Wentland
On 2024-02-05 10:18, Hamza Mahfooz wrote: > Since we only register the amdgpu sysfs group for eDP connectors, we > should only remove it from them. Otherwise, we run into a harmless > WARN() on device detach for all of the device's non-eDP connectors. > > Fixes: f97e4303da16 ("drm/amd/display:

[PATCH] drm/amd/display: only call sysfs_remove_group() for eDP connectors

2024-02-05 Thread Hamza Mahfooz
Since we only register the amdgpu sysfs group for eDP connectors, we should only remove it from them. Otherwise, we run into a harmless WARN() on device detach for all of the device's non-eDP connectors. Fixes: f97e4303da16 ("drm/amd/display: add panel_power_savings sysfs entry to eDP

[lvc-project] [PATCH] drm/amd/pm: check return value of amdgpu_irq_add_id()

2024-02-05 Thread Igor Artemiev
amdgpu_irq_ad_id() may fail and the irq handlers will not be registered. This patch adds error code check. Found by Linux Verification Center (linuxtesting.org). Signed-off-by: Igor Artemiev --- .../gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c| 14 +++--- 1 file changed, 11

Re: [lvc-project] [PATCH] drm/amd/pm: check return value of amdgpu_irq_add_id()

2024-02-05 Thread Alexey Khoroshilov
On 05.02.2024 15:25, Igor Artemiev wrote: > amdgpu_irq_ad_id() may fail and the irq handlers will not be registered. > This patch adds error code check. But what is about deallocation of already allocated memory? -- Alexey

Re: [PATCH] PCI: Add vf reset notification for pf

2024-02-05 Thread Zhi Wang
On Sun, 4 Feb 2024 14:12:57 +0800 Emily Deng wrote: > When a vf has been reset, the pf wants to get notification to remove > the vf out of schedule. > > Solution: > Add the callback function in pci_driver sriov_vf_reset_notification. > When vf reset happens, then call this callback function. >

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

2024-02-05 Thread Melissa Wen
On 01/26, Alex Hung wrote: > > > 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. > >

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

2024-02-05 Thread Melissa Wen
On 01/29, Jani Nikula wrote: > On Fri, 26 Jan 2024, Mario Limonciello wrote: > > 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

RE: [PATCH 00/21] DC Patches January 31, 2024

2024-02-05 Thread Wheeler, Daniel
[Public] Hi all, This week this patchset was tested on the following systems: * Lenovo ThinkBook T13s Gen4 with AMD Ryzen 5 6600U * MSI Gaming X Trio RX 6800 * Gigabyte Gaming OC RX 7900 XTX These systems were tested on the following display/connection types: *

Re: [PATCH] drm/amd/display: Clear phantom stream count and plane count

2024-02-05 Thread Deucher, Alexander
[Public] Acked-by: Alex Deucher From: amd-gfx on behalf of Mario Limonciello Sent: Friday, February 2, 2024 7:30 PM To: amd-gfx@lists.freedesktop.org Cc: Limonciello, Mario Subject: [PATCH] drm/amd/display: Clear phantom stream count and plane count When

Re: [PATCH] PCI: Add vf reset notification for pf

2024-02-05 Thread Christian König
Am 04.02.24 um 07:12 schrieb Emily Deng: When a vf has been reset, the pf wants to get notification to remove the vf out of schedule. Solution: Add the callback function in pci_driver sriov_vf_reset_notification. When vf reset happens, then call this callback function. Well that doesn't make

Re: [PATCH 1/3] driver core: bus: introduce can_remove()

2024-02-05 Thread Christian König
Am 02.02.24 um 23:25 schrieb Hamza Mahfooz: Currently, drivers have no mechanism to block requests to unbind devices. However, this can cause resource leaks and leave the device in an inconsistent state, such that rebinding the device may cause a hang or otherwise prevent the device from being

RE: [PATCH Review 1/1] drm/amdgpu: Fix shared buff copy to user

2024-02-05 Thread Zhang, Hawking
[AMD Official Use Only - General] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: amd-gfx On Behalf Of Stanley.Yang Sent: Monday, February 5, 2024 16:10 To: amd-gfx@lists.freedesktop.org Cc: Yang, Stanley Subject: [PATCH Review 1/1] drm/amdgpu: Fix shared buff

Re: drm/amdkfd: Relocate TBA/TMA to opposite side of VM hole (v2)

2024-02-05 Thread Shengyu Qu
Hi Felix, Sorry for my late reply. I was busy this week. I just did some more tests using next-20240202 branch. Testing using blender 4.0.2, when only one HIP render task is running, there's no problem. However, when two tasks run together, software always crashes, but not crashes the whole

Re: [PATCH 2/3] PCI: introduce can_remove()

2024-02-05 Thread Greg Kroah-Hartman
On Fri, Feb 02, 2024 at 05:25:55PM -0500, Hamza Mahfooz wrote: > Wire up the can_remove() callback, such that pci drivers can implement > their own version of it. > > Cc: sta...@vger.kernel.org > Signed-off-by: Hamza Mahfooz > --- Again, sorry, nope, not allowed.

Re: [PATCH 3/3] drm/amdgpu: wire up the can_remove() callback

2024-02-05 Thread Greg Kroah-Hartman
On Fri, Feb 02, 2024 at 05:25:56PM -0500, Hamza Mahfooz wrote: > Removing an amdgpu device that still has user space references allocated > to it causes undefined behaviour. So, implement amdgpu_pci_can_remove() > and disallow devices that still have files allocated to them from being > unbound. >

Re: [PATCH 1/3] driver core: bus: introduce can_remove()

2024-02-05 Thread Greg Kroah-Hartman
On Fri, Feb 02, 2024 at 05:25:54PM -0500, Hamza Mahfooz wrote: > Currently, drivers have no mechanism to block requests to unbind > devices. And that is by design. > However, this can cause resource leaks and leave the device in > an inconsistent state, such that rebinding the device may cause a

Re: [PATCH 3/3] drm/amdgpu: wire up the can_remove() callback

2024-02-05 Thread Greg Kroah-Hartman
On Fri, Feb 02, 2024 at 05:25:56PM -0500, Hamza Mahfooz wrote: > Removing an amdgpu device that still has user space references allocated > to it causes undefined behaviour. Then fix that please. There should not be anything special about your hardware that all of the tens of thousands of other

[PATCH Review 1/1] drm/amdgpu: Fix shared buff copy to user

2024-02-05 Thread Stanley . Yang
ta if invoke node buffer | ta type --| | ta id --| | cmd id --| |-- shared buf len -| |-- shared buffer --| ta if invoke node buffer is as above, copy shared buffer data to correct location Signed-off-by: Stanley.Yang ---