Re: [PATCH] drm/amdgpu: bail on INFO IOCTL if the GPU is in reset

2024-02-14 Thread Christian König
Well using this is in sysfs is a bug to begin with. This would prevent starting new applications and crashing applications which don't expect to get an -EPERM in return here. If we need to make operations mutual exclusive with resets then we need to take the appropriate locks and *not* work

Re: Reporting a use-after-free in amdgpu

2024-02-14 Thread Christian König
That looks like an incorrect error handling to me. The invalid address is rejected and because of this we free up the data structures, but probably in the wrong order or something like that. Going to take a look. Thanks, Christian. Am 15.02.24 um 03:34 schrieb 정준교: Hello, We would like to

[linux-next:master] BUILD REGRESSION 2c3b09aac00d7835023bbc4473ee06696be64fa8

2024-02-14 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 2c3b09aac00d7835023bbc4473ee06696be64fa8 Add linux-next specific files for 20240214 Error/Warning: (recently discovered and may have been fixed) iptable_nat.c:(.ref.text+0x1a): undefined

Re: [PATCH v6 3/5] drm: Add support to get EDID from ACPI

2024-02-14 Thread Ville Syrjälä
On Wed, Feb 14, 2024 at 03:57:54PM -0600, Mario Limonciello wrote: > Some manufacturers have intentionally put an EDID that differs from > the EDID on the internal panel on laptops. Drivers that prefer to > fetch this EDID can set a bit on the drm_connector to indicate that > the DRM EDID helpers

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

2024-02-14 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. If a user prefers to use the EDID from the panel, offer a module parameter that would

[PATCH v6 2/5] drm: Stop using `select BACKLIGHT_CLASS_DEVICE`

2024-02-14 Thread Mario Limonciello
Many drivers ab(use) `select BACKLIGHT_CLASS_DEVICE` to avoid dependency problems. This however makes it impossible for DRM core to be able to add a dependency on ACPI_VIDEO. Switch users of `select BACKLIGHT_CLASS_DEVICE` to `depends on BACKLIGHT_CLASS_DEVICE`. Signed-off-by: Mario Limonciello

[PATCH v6 5/5] drm/nouveau: Use drm_edid_read_acpi() helper

2024-02-14 Thread Mario Limonciello
Rather than inventing a wrapper to acpi_video_get_edid() use the one provided by drm. This fixes two problems: 1. A memory leak that the memory provided by the ACPI call was never freed. 2. Validation of the BIOS provided blob. Convert the usage in nouveau_connector_detect_lvds() to use struct

[PATCH v6 3/5] drm: Add support to get EDID from ACPI

2024-02-14 Thread Mario Limonciello
Some manufacturers have intentionally put an EDID that differs from the EDID on the internal panel on laptops. Drivers that prefer to fetch this EDID can set a bit on the drm_connector to indicate that the DRM EDID helpers should try to fetch it and it is preferred if it's present.

[PATCH v6 1/5] drm: Stop using `select ACPI_VIDEO` in all drivers

2024-02-14 Thread Mario Limonciello
Many DRM drivers (ab)use `select ACPI_VIDEO` and to avoid problems will then select all the dependencies for ACPI_VIDEO. This creates a soft dependency, but makes it very hard to use ACPI_VIDEO in DRM core. Switch everything else over to use `depends on ACPI_VIDEO` instead. Signed-off-by: Mario

[PATCH v6 0/5] Add support for getting EDID over ACPI to DRM

2024-02-14 Thread Mario Limonciello
This series adds the ability to fetch the EDID through ACPI for laptop panels. Drivers need to opt into the behavior. In this series it's enabled by default for all eDP or LVDS panels with AMDGPU and certain panels for Nouveau. Mario Limonciello (5): drm: Stop using `select ACPI_VIDEO` in all

[PATCH 2/2] drm/amdgpu: add SDMA 6.1.1 discovery support

2024-02-14 Thread Alex Deucher
From: Yifan Zhang This patch to add SDMA 6.1.1 support. Signed-off-by: Yifan Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c

[PATCH 1/2] drm/amdgpu: add sdma 6.1.1 firmware

2024-02-14 Thread Alex Deucher
From: Yifan Zhang This patch to add sdma 6.1.1 firmware declaration. Signed-off-by: Yifan Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c

[PATCH 1/2] drm/amdgpu: add PSP 14.0.1 support

2024-02-14 Thread Alex Deucher
From: Yifan Zhang This patch to add PSP 14.0.1 support. Signed-off-by: Yifan Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 1 + drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 3 +++ 2 files changed, 4 insertions(+) diff --git

[PATCH 2/2] drm/amdgpu: add psp 14.0.1 discovery support

2024-02-14 Thread Alex Deucher
From: Yifan Zhang This patch to add psp 14.0.1 support. Signed-off-by: Yifan Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c

[PATCH] drm/amdgpu: add smuio 14.0.1 support

2024-02-14 Thread Alex Deucher
From: Yifan Zhang This patch to add smuio 14.0.1 support. Signed-off-by: Yifan Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c

[PATCH 2/2] drm/amdgpu: add nbio 7.11.1 discovery support

2024-02-14 Thread Alex Deucher
From: Yifan Zhang This patch to add nbio 7.11.1 support. Signed-off-by: Yifan Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c

[PATCH 1/2] drm/amdgpu/nbio: Add NBIO 7.11.1 Support

2024-02-14 Thread Alex Deucher
From: Yifan Zhang Fix up doorbell setup and clockgating. v2: squash in fixes (Alex) Signed-off-by: Yifan Zhang Signed-off-by: Lang Yu Signed-off-by: Veerabadhran Gopalakrishnan Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c | 9 +++--

Re: [PATCH 15/17] drm/amd/display: Drop unnecessary header

2024-02-14 Thread Hamza Mahfooz
On 2/14/24 13:38, Rodrigo Siqueira wrote: A long time ago, the slab header was added to multiple files in DC. We also included it in the os_types.h, which is included in many of those DC files. At this point, there is no need to insert the slab.h header in multiple files, so this commit drops

Re: [PATCH 05/17] drm/amd/display: Remove redundant FPU guard

2024-02-14 Thread Hamza Mahfooz
On 2/14/24 13:38, Rodrigo Siqueira wrote: The function dcn32_build_wm_range_table call DC_FP_START/END. Drop the unnecessary FPU guard. Signed-off-by: Rodrigo Siqueira Reviewed-by: Hamza Mahfooz --- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 2 -- 1 file changed, 2

Re: [PATCH 03/17] drm/amd/display: Remove unused file

2024-02-14 Thread Hamza Mahfooz
On 2/14/24 13:38, Rodrigo Siqueira wrote: The file rv1_clk_mgr_clk.c is not used and for this reason useless. Drop the unnecessary file. Signed-off-by: Rodrigo Siqueira Reviewed-by: Hamza Mahfooz --- .../dc/clk_mgr/dcn10/rv1_clk_mgr_clk.c| 79 --- 1 file

Re: [PATCH 02/17] drm/amd/display: Initialize variable with default value

2024-02-14 Thread Hamza Mahfooz
On 2/14/24 13:38, Rodrigo Siqueira wrote: Set a default value for target_div. Signed-off-by: Rodrigo Siqueira Reviewed-by: Hamza Mahfooz --- drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH 01/17] drm/amd/display: Remove break after return

2024-02-14 Thread Hamza Mahfooz
On 2/14/24 13:38, Rodrigo Siqueira wrote: Remove break after return since it will never be reached. Signed-off-by: Rodrigo Siqueira Reviewed-by: Hamza Mahfooz --- drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 1 - 1 file changed, 1 deletion(-) diff --git

Re: [PATCH 04/17] drm/amd/display: Add SMU timeout check and retry

2024-02-14 Thread Hamza Mahfooz
On 2/14/24 13:38, Rodrigo Siqueira wrote: Instead of only asserting in the case of the SMU wait time is not what we expect, add the SMU timeout check and try again. Signed-off-by: Rodrigo Siqueira Acked-by: Hamza Mahfooz --- .../display/dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.c | 11

[PATCH 16/17] drm/amd/display: Fix nanosec stat overflow

2024-02-14 Thread Rodrigo Siqueira
From: Aric Cyr [Why] Nanosec stats can overflow on long running systems potentially causing statistic logging issues. [How] Use 64bit types for nanosec stats to ensure no overflow. Reviewed-by: Rodrigo Siqueira Signed-off-by: Aric Cyr --- drivers/gpu/drm/amd/display/modules/inc/mod_stats.h

[PATCH 15/17] drm/amd/display: Drop unnecessary header

2024-02-14 Thread Rodrigo Siqueira
A long time ago, the slab header was added to multiple files in DC. We also included it in the os_types.h, which is included in many of those DC files. At this point, there is no need to insert the slab.h header in multiple files, so this commit drops those includes. Signed-off-by: Rodrigo

[PATCH 17/17] drm/amd/display: 3.2.273

2024-02-14 Thread Rodrigo Siqueira
From: Aric Cyr This version brings along the following: - Re-enable windowed MPO support for DCN32/321 - Improvements in the subvp feature - Code clean up - USB4 fixes Acked-by: Rodrigo Siqueira Signed-off-by: Aric Cyr --- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1

[PATCH 14/17] drm/amd/display: reenable windowed mpo odm support on dcn32 and dcn321

2024-02-14 Thread Rodrigo Siqueira
From: Wenjing Liu [why] The feature was disabled due to regression found during testing. Now that all the pending issues are addressed, we are reenabling the power saving feature again. The feature optimizes dispclk level when user is using MPO capable broswers or watching MPO capable videos in

[PATCH 12/17] drm/amd/display: Only log during optimize_bandwidth call

2024-02-14 Thread Rodrigo Siqueira
From: Ethan Bitnun Prevent logs during a prepare_bandwidth call to ensure log accuracy. Reviewed-by: Alvin Lee Acked-by: Rodrigo Siqueira Signed-off-by: Ethan Bitnun --- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 11/17] drm/amd/display: fix input states translation error for dcn35 & dcn351

2024-02-14 Thread Rodrigo Siqueira
From: Swapnil Patel [Why] Currently there is an error while translating input clock sates into output clock states. The highest fclk setting from output sates is being dropped because of this error. [How] For dcn35 and dcn351, make output_states equal to input states. Reviewed-by: Charlene Liu

[PATCH 13/17] drm/amd/display: Remove pixle rate limit for subvp

2024-02-14 Thread Rodrigo Siqueira
From: Alvin Lee Subvp bugs related to 8K60 have been fixed, so remove the limit that blocks 8K60 timings from enabling SubVP. Reviewed-by: Nevenko Stupar Reviewed-by: Chaitanya Dhere Acked-by: Rodrigo Siqueira Signed-off-by: Alvin Lee ---

[PATCH 10/17] drm/amd/display: Generalize new minimal transition path

2024-02-14 Thread Rodrigo Siqueira
From: Alvin Lee Previously the new minimal transition path was only used for windowed MPO + ODM for plane scaling updates. However, we want to generalize the transition for all cases whenever a non-seamless transition is detected (such as for MPO -> SubVP + MPC). To make this change we add

[PATCH 08/17] drm/amd/display: Fix S4 hang polling on HW power up done for VBIOS DMCUB

2024-02-14 Thread Rodrigo Siqueira
From: Nicholas Kazlauskas [Why] VBIOS DMCUB firmware doesn't set the dal_fw bit and we end up hanging waiting for HW power up done because of it. [How] Simplify the path and allow mailbox_rdy to be a functional check when we detect VBIOS firmware. Reviewed-by: Charlene Liu Acked-by: Rodrigo

[PATCH 07/17] drm/amd/display: Only allow dig mapping to pwrseq in new asic

2024-02-14 Thread Rodrigo Siqueira
From: Lewis Huang [Why] The old asic only have 1 pwrseq hw. We don't need to map the diginst to pwrseq inst in old asic. [How] 1. Only mapping dig to pwrseq for new asic. 2. Move mapping function into dcn specific panel control component Cc: Stable # v6.6+ Cc: Mario Limonciello Link:

[PATCH 06/17] drm/amd/display: adjust few initialization order in dm

2024-02-14 Thread Rodrigo Siqueira
From: Wayne Lin [Why] Observe error message "Can't retrieve aconnector in hpd_rx_irq_offload_work" when boot up with a mst tbt4 dock connected. After analyzing, there are few parts needed to be adjusted: 1. hpd_rx_offload_wq[].aconnector is not initialzed before the dmub outbox hpd_irq handler

[PATCH 09/17] drm/amd/display: Check DP Alt mode DPCS state via DMUB

2024-02-14 Thread Rodrigo Siqueira
From: George Shen [Why] Currently, driver state for DCN3.2 is not strictly matching HW state for the USBC port. To reduce inconsistencies while debugging, the driver should match HW configuration. [How] Update link encoder flag to indicate USBC port. Call into DMUB to check when DP Alt mode is

[PATCH 05/17] drm/amd/display: Remove redundant FPU guard

2024-02-14 Thread Rodrigo Siqueira
The function dcn32_build_wm_range_table call DC_FP_START/END. Drop the unnecessary FPU guard. Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH 02/17] drm/amd/display: Initialize variable with default value

2024-02-14 Thread Rodrigo Siqueira
Set a default value for target_div. Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c

[PATCH 03/17] drm/amd/display: Remove unused file

2024-02-14 Thread Rodrigo Siqueira
The file rv1_clk_mgr_clk.c is not used and for this reason useless. Drop the unnecessary file. Signed-off-by: Rodrigo Siqueira --- .../dc/clk_mgr/dcn10/rv1_clk_mgr_clk.c| 79 --- 1 file changed, 79 deletions(-) delete mode 100644

[PATCH 00/17] DC Patches February 14, 2024

2024-02-14 Thread Rodrigo Siqueira
This DC patchset brings improvements in multiple areas. In summary, we highlight: - Re-enable windowed MPO support for DCN32/321. - Improvements in the subvp feature. - Code clean-up. - USB4 fixes. Cc: Daniel Wheeler Thanks Siqueira Alvin Lee (2): drm/amd/display: Generalize new minimal

[PATCH 01/17] drm/amd/display: Remove break after return

2024-02-14 Thread Rodrigo Siqueira
Remove break after return since it will never be reached. Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c

[PATCH 04/17] drm/amd/display: Add SMU timeout check and retry

2024-02-14 Thread Rodrigo Siqueira
Instead of only asserting in the case of the SMU wait time is not what we expect, add the SMU timeout check and try again. Signed-off-by: Rodrigo Siqueira --- .../display/dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.c | 11 --- .../drm/amd/display/dc/clk_mgr/dcn301/dcn301_smu.c| 6

Re: [PATCH v2 1/6] tracing, dma-buf: add a trace_dma_fence_sync_to event

2024-02-14 Thread Pierre-Eric Pelloux-Prayer
Le 14/02/2024 à 16:10, Steven Rostedt a écrit : On Wed, 14 Feb 2024 13:00:16 +0100 Christian König wrote: +DEFINE_EVENT(dma_fence_from, dma_fence_sync_to, For a single event you should probably use TRACE_EVENT() instead of declaring a class. A class is only used if you have multiple events

Re: [PATCH v2 5/6] drm/amdgpu: add a amdgpu_cs_ioctl2 event

2024-02-14 Thread Pierre-Eric Pelloux-Prayer
Le 14/02/2024 à 13:09, Christian König a écrit : Am 13.02.24 um 16:50 schrieb Pierre-Eric Pelloux-Prayer: amdgpu_cs_ioctl already exists but serves a different purpose. amdgpu_cs_ioctl2 marks the beginning of the kernel processing of the ioctl which is useful for tools to map which events

Re: [PATCH v2 5/6] drm/amdgpu: add a amdgpu_cs_ioctl2 event

2024-02-14 Thread Christian König
Am 14.02.24 um 17:38 schrieb Pierre-Eric Pelloux-Prayer: Le 14/02/2024 à 13:09, Christian König a écrit : Am 13.02.24 um 16:50 schrieb Pierre-Eric Pelloux-Prayer: amdgpu_cs_ioctl already exists but serves a different purpose. amdgpu_cs_ioctl2 marks the beginning of the kernel processing of

Re: [PATCH v2 1/6] tracing, dma-buf: add a trace_dma_fence_sync_to event

2024-02-14 Thread Steven Rostedt
On Wed, 14 Feb 2024 13:00:16 +0100 Christian König wrote: > > +DEFINE_EVENT(dma_fence_from, dma_fence_sync_to, > > For a single event you should probably use TRACE_EVENT() instead of > declaring a class. A class is only used if you have multiple events with > the same parameters. FYI,

Re: [PATCH v3 9/9] drm/ci: uprev IGT and update testlist

2024-02-14 Thread Helen Koike
On 10/02/2024 15:20, Maíra Canal wrote: On 2/10/24 15:17, Maíra Canal wrote: On 1/30/24 12:03, Vignesh Raman wrote: Uprev IGT and add amd, v3d, vc4 and vgem specific tests to testlist. Have testlist.txt per driver and include a base testlist so that the driver specific tests will run only

[PATCH v2 2/2] drm/tests/drm_buddy: add alloc_contiguous test

2024-02-14 Thread Arunpravin Paneer Selvam
From: Matthew Auld Sanity check DRM_BUDDY_CONTIGUOUS_ALLOCATION. v2: Fix checkpatch warnings. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3097 Signed-off-by: Matthew Auld Cc: Arunpravin Paneer Selvam Cc: Limonciello Cc: Christian König Reviewed-by: Arunpravin Paneer Selvam

[PATCH v2 1/2] drm/buddy: Fix alloc_range() error handling code

2024-02-14 Thread 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 required memory blocks the function was returning SUCCESS in some of the corner cases. The right approach would be if

Re: [PATCH v2 3/6] amdgpu: use trace_dma_fence_sync_to in amdgpu_fence_sync

2024-02-14 Thread Christian König
Am 13.02.24 um 16:50 schrieb Pierre-Eric Pelloux-Prayer: This makes it possible to understand the dependencies between jobs. Possible usage of this trace: * stuttering issues like Mesa !9189 * incorrect synchronization: I don't have a link for this one, but having these events was very

Re: [PATCH v2 5/6] drm/amdgpu: add a amdgpu_cs_ioctl2 event

2024-02-14 Thread Christian König
Am 13.02.24 um 16:50 schrieb Pierre-Eric Pelloux-Prayer: amdgpu_cs_ioctl already exists but serves a different purpose. amdgpu_cs_ioctl2 marks the beginning of the kernel processing of the ioctl which is useful for tools to map which events belong to the same submission (without this, the first

Re: [PATCH v2 4/6] drm/amdgpu: add BO clear event

2024-02-14 Thread Christian König
Am 13.02.24 um 16:50 schrieb Pierre-Eric Pelloux-Prayer: Useful to identify why sdma jobs are submitted. Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 16 2 files changed, 18

Re: [PATCH v2 1/6] tracing, dma-buf: add a trace_dma_fence_sync_to event

2024-02-14 Thread Christian König
Am 13.02.24 um 16:50 schrieb Pierre-Eric Pelloux-Prayer: This new event can be used to trace where a given dma_fence is added as a dependency of some other work. I plan to use it in amdgpu. Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/dma-buf/dma-fence.c | 1 +