[PATCH] drm/amdgpu: Fix 'fw_name' buffer size to prevent truncations in amdgpu_mes_init_microcode

2024-03-20 Thread Srinivasan Shanmugam
The snprintf function is used to write a formatted string into fw_name. The format of the string is "amdgpu/%s_mes%s.bin", where %s is replaced by the string in ucode_prefix and the second %s is replaced by either "_2" or "1" depending on the condition pipe == AMDGPU_MES_SCHED_PIPE. The length of

[PATCH v2] drm/amdgpu: Fix format character cut-off issues in amdgpu_vcn_early_init()

2024-03-20 Thread Srinivasan Shanmugam
Reducing the size of ucode_prefix to 25 in the amdgpu_vcn_early_init function. This would ensure that the total number of characters being written into fw_name does not exceed its size of 40. Fixes the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c: In function

[PATCH v2] drm/amdgpu: refactor code to split devcoredump code

2024-03-20 Thread Sunil Khatri
Refractor devcoredump code into new files since its functionality is expanded further and better to slit and devcoredump to have its own file. v2: Fix the build failure caught by arm compiler of implicit function declaration with #ifdef Cc: Ivan Lipski Signed-off-by: Sunil Khatri ---

[PATCH 1/2] drm/amdgpu: add socket id parameter for psp query address cmd

2024-03-20 Thread Tao Zhou
And set the socket id. Signed-off-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/ta_ras_if.h | 1 + drivers/gpu/drm/amd/amdgpu/umc_v12_0.c | 14 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/ta_ras_if.h

[PATCH 2/2] drm/amdgpu: simplify convert_error_address interface for UMC v12

2024-03-20 Thread Tao Zhou
Replace separate parameters with struct ta_ras_query_address_input. Signed-off-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/umc_v12_0.c | 57 ++ 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/umc_v12_0.c

RE: [PATCH] drm/amdkfd: fix TLB flush after unmap for GFX9.4.2

2024-03-20 Thread Kasiviswanathan, Harish
[AMD Official Use Only - General] Reviewed-by: Harish Kasiviswanathan -Original Message- From: amd-gfx On Behalf Of Eric Huang Sent: Wednesday, March 20, 2024 4:25 PM To: amd-gfx@lists.freedesktop.org Cc: Huang, JinHuiEric Subject: [PATCH] drm/amdkfd: fix TLB flush after unmap for

RE: [PATCH v2 1/9] drm/amd/pm: Add support for DPM policies

2024-03-20 Thread Wang, Yang(Kevin)
[AMD Official Use Only - General] -Original Message- From: amd-gfx On Behalf Of Lijo Lazar Sent: Thursday, March 14, 2024 7:56 PM To: amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Deucher, Alexander ; Liu, Shuzhou (Bill) Subject: [PATCH v2 1/9] drm/amd/pm: Add support for DPM

RE: [PATCH] drm/amdkfd: Check cgroup when returning DMABuf info

2024-03-20 Thread Joshi, Mukul
[AMD Official Use Only - General] > -Original Message- > From: amd-gfx On Behalf Of Wu, > David > Sent: Wednesday, March 20, 2024 8:02 PM > To: amd-gfx@lists.freedesktop.org > Subject: Re: [PATCH] drm/amdkfd: Check cgroup when returning DMABuf info > > Caution: This message originated

Re: [PATCH] drm/amdkfd: Check cgroup when returning DMABuf info

2024-03-20 Thread Wu, David
On 3/20/2024 4:21 PM, Felix Kuehling wrote: On 2024-03-18 16:12, Felix Kuehling wrote: On 2024-03-15 14:17, Mukul Joshi wrote: Check cgroup permissions when returning DMA-buf info and based on cgroup check return the id of the GPU that has access to the BO. Signed-off-by: Mukul Joshi ---

[PATCH] drm/amdkfd: Cleanup workqueue during module unload

2024-03-20 Thread Mukul Joshi
Destroy the high priority workqueue that handles interrupts during KFD node cleanup. Signed-off-by: Mukul Joshi --- drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c

[PATCH] drm/amdkfd: fix TLB flush after unmap for GFX9.4.2

2024-03-20 Thread Eric Huang
TLB flush after unmap accidentially was removed on gfx9.4.2. It is to add it back. Signed-off-by: Eric Huang --- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h

Re: [PATCH] drm/amdkfd: Check cgroup when returning DMABuf info

2024-03-20 Thread Felix Kuehling
On 2024-03-18 16:12, Felix Kuehling wrote: On 2024-03-15 14:17, Mukul Joshi wrote: Check cgroup permissions when returning DMA-buf info and based on cgroup check return the id of the GPU that has access to the BO. Signed-off-by: Mukul Joshi ---   drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 4

Re: [PATCH] Revert "drm/amd/display: Fix sending VSC (+ colorimetry) packets for DP/eDP displays without PSR"

2024-03-20 Thread Rodrigo Siqueira Jordao
On 3/12/24 9:24 AM, Harry Wentland wrote: This causes flicker on a bunch of eDP panels. The info_packet code also caused regressions on other OSes that we haven't' seen on Linux yet, but that is likely due to the fact that we haven't had a chance to test those environments on Linux. We'll

[PATCH] drm/amdgpu: refactor code to split devcoredump code

2024-03-20 Thread Sunil Khatri
Refractor devcoredump code into new files since its functionality is expanded further and better to slit and devcoredump to have its own file. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- .../gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 218

Re: [PATCH] drm/amdkfd: Check cgroup when returning DMABuf info

2024-03-20 Thread Felix Kuehling
On 2024-03-20 15:09, Joshi, Mukul wrote: [AMD Official Use Only - General] -Original Message- From: Kuehling, Felix Sent: Monday, March 18, 2024 4:13 PM To: Joshi, Mukul ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdkfd: Check cgroup when returning DMABuf info On

RE: [PATCH] drm/amdkfd: Check cgroup when returning DMABuf info

2024-03-20 Thread Joshi, Mukul
[AMD Official Use Only - General] > -Original Message- > From: Kuehling, Felix > Sent: Monday, March 18, 2024 4:13 PM > To: Joshi, Mukul ; amd-gfx@lists.freedesktop.org > Subject: Re: [PATCH] drm/amdkfd: Check cgroup when returning DMABuf info > > > On 2024-03-15 14:17, Mukul Joshi

[PATCH v2] drm/amdgpu: Fix use after free in trace_amdgpu_bo_move

2024-03-20 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Pipelined object migration will free up the old bo->resource, meaning the tracepoint added in 94aeb4117343 ("drm/amdgpu: fix ftrace event amdgpu_bo_move always move on same heap") will trigger an use after free when it dereferences the cached old_mem. Fix it by caching the

Re: [PATCH] drm/amdgpu: Fix format character cut-off issues in amdgpu_vcn_early_init()

2024-03-20 Thread Lazar, Lijo
On 3/20/2024 8:28 PM, SRINIVASAN SHANMUGAM wrote: > > On 3/20/2024 3:12 PM, Lazar, Lijo wrote: >> >> On 3/20/2024 2:15 PM, Srinivasan Shanmugam wrote: >>> The issue was present in the lines where 'fw_name' was being formatted. >>> This fix ensures that the output is not truncated >>> >>> Fixes

[linux-next:master] BUILD REGRESSION 72fb52fb0ac44b6a1edd9bc390e44bce3acccd26

2024-03-20 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 72fb52fb0ac44b6a1edd9bc390e44bce3acccd26 Add linux-next specific files for 20240320 Error/Warning ids grouped by kconfigs: gcc_recent_errors |-- alpha-allyesconfig | |-- drivers-gpu-drm-amd

Re: [PATCH] drm/amdgpu: Fix format character cut-off issues in amdgpu_vcn_early_init()

2024-03-20 Thread SRINIVASAN SHANMUGAM
On 3/20/2024 3:12 PM, Lazar, Lijo wrote: On 3/20/2024 2:15 PM, Srinivasan Shanmugam wrote: The issue was present in the lines where 'fw_name' was being formatted. This fix ensures that the output is not truncated Fixes the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c: In

Re: [PATCH] drm/amdgpu: Fix the runtime pm mode error

2024-03-20 Thread Lazar, Lijo
On 3/20/2024 6:54 PM, Alex Deucher wrote: > On Wed, Mar 20, 2024 at 6:17 AM Ma Jun wrote: >> >> Because of the logic error, Arcturus and vega20 currently >> use the AMDGPU_RUNPM_NONE for runtime pm even though they >> support BACO. So, the code is optimized to fix this error. >> >>

Re: [PATCH] drm/amdgpu: Remove pci address checks from acpi_vfct_bios

2024-03-20 Thread Christian König
Am 19.03.24 um 16:04 schrieb Kurt Kartaltepe: On Tue, Mar 19, 2024 at 2:54 AM Christian König wrote: Well what problems do you run into? The ACPI and BIOS assignments usually work much better than whatever the Linux PCI subsystem comes up with. Perhaps its easier to show the lspci output

Re: [PATCH] drm/amdgpu: Fix the runtime pm mode error

2024-03-20 Thread Alex Deucher
On Wed, Mar 20, 2024 at 6:17 AM Ma Jun wrote: > > Because of the logic error, Arcturus and vega20 currently > use the AMDGPU_RUNPM_NONE for runtime pm even though they > support BACO. So, the code is optimized to fix this error. > > Signed-off-by: Ma Jun > --- >

[PATCH] drm/amdgpu: remove invalid resource->start check

2024-03-20 Thread Christian König
The majority of those where removed in the patch aed01a68047b drm/amdgpu: Remove TTM resource->start visible VRAM condition v2 But this one was missed because it's working on the resource and not the BO. Since we also no longer use a fake start address for visible BOs this will now trigger

Re: [PATCH] drm/amdgpu: Remove pci address checks from acpi_vfct_bios

2024-03-20 Thread Kurt Kartaltepe
On Tue, Mar 19, 2024 at 2:54 AM Christian König wrote: > > > Well what problems do you run into? The ACPI and BIOS assignments > usually work much better than whatever the Linux PCI subsystem comes up > with. Perhaps its easier to show the lspci output for the BIOS assignment and we can agree

[PATCH] drm/amdgpu: Fix the runtime pm mode error

2024-03-20 Thread Ma Jun
Because of the logic error, Arcturus and vega20 currently use the AMDGPU_RUNPM_NONE for runtime pm even though they support BACO. So, the code is optimized to fix this error. Signed-off-by: Ma Jun --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 56 - 1 file changed, 27

Re: [PATCH] drm/amdgpu: Fix format character cut-off issues in amdgpu_vcn_early_init()

2024-03-20 Thread Lazar, Lijo
On 3/20/2024 2:15 PM, Srinivasan Shanmugam wrote: > The issue was present in the lines where 'fw_name' was being formatted. > This fix ensures that the output is not truncated > > Fixes the below with gcc W=1: > drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c: In function ‘amdgpu_vcn_early_init’: >

Re: [PATCH] drm/amdgpu: Fix format character cut-off issues in amdgpu_vcn_early_init()

2024-03-20 Thread Christian König
Am 20.03.24 um 09:45 schrieb Srinivasan Shanmugam: The issue was present in the lines where 'fw_name' was being formatted. This fix ensures that the output is not truncated Fixes the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c: In function ‘amdgpu_vcn_early_init’:

[PATCH] drm/amdgpu: Fix format character cut-off issues in amdgpu_vcn_early_init()

2024-03-20 Thread Srinivasan Shanmugam
The issue was present in the lines where 'fw_name' was being formatted. This fix ensures that the output is not truncated Fixes the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c: In function ‘amdgpu_vcn_early_init’: drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:102:66: warning: ‘snprintf’

[PATCH 22/22] drm/amd/display: 3.2.278

2024-03-20 Thread Tom Chung
From: Aric Cyr This version brings along following fixes: - Fix some bound and NULL check - Fix nonseamless transition from ODM + MPO to ODM + subvp - Allow Z8 when stutter threshold is not met - Remove plane and stream pointers from dc scratch - Remove read/write to external register - Increase

[PATCH 21/22] drm/amd/display: Skip pipe if the pipe idx not set properly

2024-03-20 Thread Tom Chung
From: Muhammad Ahmed [why] Driver crashes when pipe idx not set properly [how] Add code to skip the pipe that idx not set properly Reviewed-by: Charlene Liu Acked-by: Tom Chung Signed-off-by: Muhammad Ahmed --- drivers/gpu/drm/amd/display/dc/dml2/dml2_utils.c | 5 + 1 file changed, 5

[PATCH 19/22] drm/amd/display: Modify DHCUB waterwark structures and functions

2024-03-20 Thread Tom Chung
From: Dillon Varone [WHY] Converting the watermark set structure to a union and modifying some interfaces to accommodate future usage. Reviewed-by: Chaitanya Dhere Acked-by: Tom Chung Signed-off-by: Dillon Varone --- .../gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.c | 8

[PATCH 20/22] drm/amd/display: [FW Promotion] Release 0.0.210.0

2024-03-20 Thread Tom Chung
From: Anthony Koo - Add Display PHY FSM command interface for automated testing Acked-by: Tom Chung Signed-off-by: Anthony Koo --- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 39 ++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git

[PATCH 18/22] drm/amd/display: Remove plane and stream pointers from dc scratch

2024-03-20 Thread Tom Chung
From: Alvin Lee [Why] Remove several plane and stream pointers from dc for code refactoring. Reviewed-by: Wenjing Liu Acked-by: Tom Chung Signed-off-by: Alvin Lee --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 18 ++--- .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 42 +-

[PATCH 17/22] drm/amd/display: Increase number of hpo dp link encoders

2024-03-20 Thread Tom Chung
From: Sridevi Arvindekar [Why] Number of hpo dp2 link encoders is increased. Instances are changed. [How] Increased size in resource pool, init for each instance Reviewed-by: Alvin Lee Acked-by: Tom Chung Signed-off-by: Sridevi Arvindekar ---

[PATCH 16/22] drm/amd/display: Increase clock table size

2024-03-20 Thread Tom Chung
From: Sung Joon Kim [why] To prevent out of bounds error, we need to increase the clock table size. Reviewed-by: Xi Liu Acked-by: Tom Chung Signed-off-by: Sung Joon Kim --- .../amd/display/dc/dml2/dml2_translation_helper.c | 14 +- 1 file changed, 5 insertions(+), 9

[PATCH 15/22] drm/amd/display: Allow Z8 when stutter threshold is not met for dcn35

2024-03-20 Thread Tom Chung
From: Bhawanpreet Lakha [Why] Some panels don't meet the stutter threshold (4k etc), this leads to power regressions. Allow z8 for panels that don't meet the threshold but support PSR/replay Reviewed-by: Nicholas Kazlauskas Acked-by: Tom Chung Signed-off-by: Bhawanpreet Lakha ---

[PATCH 14/22] drm/amd/display: Allow Z8 when stutter threshold is not met

2024-03-20 Thread Tom Chung
From: Bhawanpreet Lakha [Why] Some panels don't meet the stutter threshold (4k etc), this leads to power regressions. Allow z8 for panels that don't meet the threshold but support PSR/replay Reviewed-by: Nicholas Kazlauskas Acked-by: Tom Chung Signed-off-by: Bhawanpreet Lakha ---

[PATCH 13/22] drm/amd/display: Add new IPS config mode

2024-03-20 Thread Tom Chung
From: Nicholas Kazlauskas [Why] We don't have a way to specify IPS2 for display off but RCG only for static screen and local video playback. [How] Add a new setting that allows RCG only when displays are active but IPS2 when all displays are off. Reviewed-by: Ovidiu Bunea Acked-by: Tom Chung

[PATCH 12/22] drm/amd/display: Fix bounds check for dcn35 DcfClocks

2024-03-20 Thread Tom Chung
From: Roman Li [Why] NumFclkLevelsEnabled is used for DcfClocks bounds check instead of designated NumDcfClkLevelsEnabled. That can cause array index out-of-bounds access. [How] Use designated variable for dcn35 DcfClocks bounds check. Fixes: 6b8d9862159f ("drm/amd/display: Fix

[PATCH 10/22] drm/amd/display: build scaling params when a new plane is appended

2024-03-20 Thread Tom Chung
From: Wenjing Liu [why & how] We are boundling changes in plane state and build scaling params together. This is to simplify DML code so DML doesn't need to build scaling params. We are also avoiding rebuilding scaling params for planes without scaling changes. Reviewed-by: Dillon Varone

[PATCH 11/22] drm/amd/display: Remove MPC rate control logic from DCN30 and above

2024-03-20 Thread Tom Chung
From: George Shen [Why] MPC flow rate control is not needed for DCN30 and above. Current logic that uses it can result in underflow for certain edge cases (such as DSC N422 + ODM combine + 422 left edge pixel). [How] Remove MPC flow rate control logic and programming for DCN30 and above. Cc:

[PATCH 09/22] drm/amd/display: fix nonseamless transition from ODM + MPO to ODM + subvp

2024-03-20 Thread Tom Chung
From: Wenjing Liu [why] when ODM + MPO is used for all 4 available pipes. Pipe transition will be nonseamless. Phantom OTG master pipe reuses the secondary OPP head pipe. There is no possible seamless path to transit to the new state. The correct logic would be to reuse a secondary DPP pipe

[PATCH 07/22] drm/amd/display: Added missing null checks

2024-03-20 Thread Tom Chung
From: Sohaib Nadeem [why] Add the missing null check before dereference for dc_stream_status* Fixes: 06653fc22752 ("drm/amd/display: Implement update_planes_and_stream_v3 sequence") Reviewed-by: Josip Pavic Acked-by: Tom Chung Signed-off-by: Sohaib Nadeem ---

[PATCH 08/22] drm/amd/display: fix a dereference of a NULL pointer

2024-03-20 Thread Tom Chung
From: Wenjing Liu [why] In some platform out_transfer_func may not be popualted. We need to check for null before dereferencing it. Fixes: 4b939f625e9b ("drm/amd/display: Generalize new minimal transition path") Reviewed-by: Alvin Lee Acked-by: Tom Chung Signed-off-by: Wenjing Liu ---

[PATCH 06/22] drm/amd/display: Refactor DML2 interfaces

2024-03-20 Thread Tom Chung
From: Dillon Varone [Why} Some interfaces needed changes to support future architectures. Reviewed-by: Chaitanya Dhere Acked-by: Tom Chung Signed-off-by: Dillon Varone --- .../gpu/drm/amd/display/dc/core/dc_state.c| 14 +-- .../gpu/drm/amd/display/dc/core/dc_surface.c | 2 +-

[PATCH 05/22] drm/amd/display: Expand DML2 callbacks

2024-03-20 Thread Tom Chung
From: Dillon Varone [Why] These additional callbacks to DC will be required for the DML2 wrapper. Also consolidate common callbacks for projects to a single location for maintenance. Reviewed-by: Chaitanya Dhere Acked-by: Tom Chung Signed-off-by: Dillon Varone ---

[PATCH 04/22] drm/amd/display: Remove read/write to external register

2024-03-20 Thread Tom Chung
From: Sung Joon Kim [why] We need to remove the reference to these registers to prevent any usage in the future. Reviewed-by: Nicholas Kazlauskas Acked-by: Tom Chung Signed-off-by: Sung Joon Kim --- .../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 38 ---

[PATCH 02/22] drm/amd/display: Consolidate HPO enable/disable and restrict only to state transitions.

2024-03-20 Thread Tom Chung
From: Natanel Roizenman [WHY] Previously, we'd disabled HPO whenever an HPO display was disconnected. This caused other HPO displays to blank whenever one was unplugged. [HOW] This change restricts HPO enable/disable to dce110_apply_ctx_to_hw and adds a helper function (dce110_is_hpo_enabled)

[PATCH 03/22] drm/amd/display: Send DTBCLK disable message on first commit

2024-03-20 Thread Tom Chung
From: Taimur Hassan [Why] Previous patch to allow DTBCLK disable didn't address boot case. Driver thinks DTBCLK is disabled by default, so we don't send disable message to PMFW. DTBCLK is then enabled at idle desktop on boot, burning power. [How] Set dtbclk_en to true on boot so that disable

[PATCH 01/22] drm/amd/display: Allow idle opts for no flip case on PSR panel

2024-03-20 Thread Tom Chung
From: Alvin Lee [Why & How] There is a corner case where a single PSR panel fails to enter idle optimizations if the panel is not flipping (no planes or DPMS_OFF == true). This is because the panel will not enter PSR if it's not flipping, but this will prevent the FW idle opt path from being

[PATCH 00/22] DC Patches Mar 25 2024

2024-03-20 Thread Tom Chung
This DC patchset brings improvements in multiple areas. In summary, we have: - Fix some bound and NULL check - Fix nonseamless transition from ODM + MPO to ODM + subvp - Allow Z8 when stutter threshold is not met - Remove plane and stream pointers from dc scratch - Remove read/write to external