Re: [PATCH] Revert "drm/amdgpu: init iommu after amdkfd device init"

2024-06-11 Thread Armin Wolf
Am 04.06.24 um 20:28 schrieb Deucher, Alexander: [AMD Official Use Only - AMD Internal Distribution Only] -Original Message- From: Kuehling, Felix Sent: Tuesday, June 4, 2024 2:25 PM To: Armin Wolf ; Deucher, Alexander ; Koenig, Christian ; Pan, Xinhui ; gre...@linuxfoundation.org; sa

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

2024-06-11 Thread Thomas Weißschuh
On 2024-06-10 14:58:02+, Mario Limonciello wrote: > +Kieran > > On 6/10/2024 14:26, Thomas Weißschuh wrote: > > The value of "min_input_signal" returned from ATIF on a Framework AMD 13 > > is "12". This leads to a fairly bright minimum display backlight. > > > > Introduce a quirk to override

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

2024-06-11 Thread Thomas Weißschuh
The value of "min_input_signal" returned from ATIF on a Framework AMD 13 is "12". This leads to a fairly bright minimum display backlight. Introduce a quirk to override "min_input_signal" to "0" which leads to a much lower minimum brightness, which is still readable even in daylight. Tested on a

[PATCH] drm/amdgpu/vcn: port mmsch ctx table size fix from jpeg v4

2024-06-11 Thread Jane Jian
add jpeg table size to ctx table size rather than override it Signed-off-by: Jane Jian --- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c index 04d89

Fix for reserved VMID handling together with gang submit

2024-06-11 Thread Christian König
Hey Alex, I've worked on this back in January but never found time to finish it. Vitaly already tested the patches on the CI system with some test cases back then. Thanks, Christian.

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

2024-06-11 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 ++- drivers/gpu/dr

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

2024-06-11 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

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

2024-06-11 Thread Deucher, Alexander
[AMD Official Use Only - AMD Internal Distribution Only] Series is: Reviewed-by: Alex Deucher From: Christian König Sent: Tuesday, June 11, 2024 7:43 AM To: Deucher, Alexander Cc: amd-gfx@lists.freedesktop.org Subject: [PATCH 2/2] drm/amdgpu: reject gang submit

Re: [PATCH 5/6] drm/amdgpu: always enable move threshold for BOs

2024-06-11 Thread Tvrtko Ursulin
Hi Christian, On 04/06/2024 17:05, Christian König wrote: This should prevent buffer moves when the threshold is reached during CS. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 36 -- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 22 ++

[PATCH 03/36] drm/amd/display: Add dcn401 DIG fifo enable/disable

2024-06-11 Thread Hamza Mahfooz
From: Relja Vojvodic [Why] Found while hotplugging MST daisy chain displays. Changing dispclk during this sequence caused SMU hang due to DIG fifo not being disabled correctly (caused by missing functions). [How] Adding disable/enable DIG fifo functions for dcn401 Reviewed-by: Wenjing Liu Acke

[PATCH 00/36] DC Patches June 11, 2024

2024-06-11 Thread Hamza Mahfooz
Cc: Daniel Wheeler Alex Hung (15): drm/amd/display: Explicitly extend unsigned 16 bit to 64 bit drm/amd/display: Add null checker before passing variables drm/amd/display: Check BIOS images before it is used drm/amd/display: Skip wbscl_set_scaler_filter if filter is null drm/amd/display

[PATCH 08/36] drm/amd/display: On clock init, maintain DISPCLK freq

2024-06-11 Thread Hamza Mahfooz
From: Chris Park [Why] On init if a display is connected, we need to maintain the DISPCLK frequency Even though DPG_EN=1, the display still requires the correct timing or it could cause audio corruption (if DISPCLK freq is reduced). [How] Read the current DISPCLK freq and request the same value

[PATCH 01/36] drm/amd/display: DCN401 full power down in HW init if any link enabled

2024-06-11 Thread Hamza Mahfooz
From: Joshua Aberback [Why] During HW init, certain operations the driver performs are invalid on enabled hardware in an unknown state (for example, setting all clock values to minimum when the GPU is actively driving a display). There is already code present to call HWSS->power_down during init

[PATCH 06/36] drm/amd/display: Remove redundant condition in VBA 314 func

2024-06-11 Thread Hamza Mahfooz
From: Ivan Lipski [WHY] Coverity analysis this conditional code as DEADCODE. The conditional statement is never true since 'MacroTileSizeBytes' is either 256 or 65536. Thus, the code inside is the conditional statement is never reached. [HOW] Removed the conditional statement. Reviewed-by: Aura

[PATCH 02/36] drm/amd/display: Enable DCN401 idle optimizations by default

2024-06-11 Thread Hamza Mahfooz
From: Dillon Varone [WHY&HOW] Re-enable idle optimizations by default. Reviewed-by: Alvin Lee Acked-by: Hamza Mahfooz Signed-off-by: Dillon Varone --- drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/displ

[PATCH 09/36] drm/amd/display: Refactor DCN3X into component folder

2024-06-11 Thread Hamza Mahfooz
From: Mounika Adhuri [why] Move DCN3X files to unique component folder. [how] Create respective component folder in dc, move the DCN3X files into corresponding new folders and made appropriate changes for compilation in Makefiles. Reviewed-by: Martin Leung Acked-by: Hamza Mahfooz Signed-off-b

[PATCH 04/36] Revert "drm/amd/display: workaround for oled eDP not lighting up on DCN401"

2024-06-11 Thread Hamza Mahfooz
From: Joshua Aberback This reverts commit e296c84e7d0561ed626591e1cf9b71a7ba0133f4. A proper fix for this issue has been implemented in DMUB FW. So, no need to keep the workaround. Reviewed-by: Wenjing Liu Acked-by: Hamza Mahfooz Signed-off-by: Joshua Aberback --- drivers/gpu/drm/amd/displa

[PATCH 13/36] drm/amd/display: Explicitly extend unsigned 16 bit to 64 bit

2024-06-11 Thread Hamza Mahfooz
From: Alex Hung Coverity reports sign extention defects as below: Suspicious implicit sign extension: mode->htotal with type u16 ... to int (32 bits, signed), then sign-extended to type unsigned long (64 bits, unsigned). If mode->htotal * mode->vtotal is greater than 0x7FFF, the upper bits o

[PATCH 10/36] drm/amd/display: Attempt to avoid empty TUs when endpoint is DPIA

2024-06-11 Thread Hamza Mahfooz
From: Michael Strauss [WHY] Empty SST TUs are illegal to transmit over a USB4 DP tunnel. Current policy is to configure stream encoder to pack 2 pixels per pclk even when ODM combine is not in use, allowing seamless dynamic ODM reconfiguration. However, in extreme edge cases where average pixel c

[PATCH 14/36] drm/amd/display: Add null checker before passing variables

2024-06-11 Thread Hamza Mahfooz
From: Alex Hung Checks null pointer before passing variables to functions. This fixes 3 NULL_RETURNS issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Hamza Mahfooz Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++--- 1 file changed,

[PATCH 07/36] drm/amd/display: fix minor coding errors where dml21 phase 5 uses wrong variables

2024-06-11 Thread Hamza Mahfooz
From: Wenjing Liu There is a coding error which causes incorrect variables to be assigned in DML21 phase 5. Reviewed-by: Dillon Varone Acked-by: Hamza Mahfooz Signed-off-by: Wenjing Liu --- .../gpu/drm/amd/display/dc/dml2/dml21/src/dml2_top/dml_top.c | 4 ++-- 1 file changed, 2 insertions(+

[PATCH 12/36] drm/amd/display: Send message to notify the DPIA host router bandwidth

2024-06-11 Thread Hamza Mahfooz
From: Sung Joon Kim [why] Tell the system about the current host router bandwidth to be used to measure and calculate the right voltage to be used. [how] Send SMU message of each DPIA host router bandwidth. Reviewed-by: Nicholas Kazlauskas Acked-by: Hamza Mahfooz Signed-off-by: Sung Joon Kim

[PATCH 11/36] drm/amd/display: Add null check to dml21_find_dc_pipes_for_plane

2024-06-11 Thread Hamza Mahfooz
From: Dillon Varone When a phantom stream is in the process of being deconstructed, there could be pipes with no associated planes. In that case, ignore the phantom stream entirely when searching for associated pipes. Cc: sta...@vger.kernel.org Reviewed-by: Alvin Lee Acked-by: Hamza Mahfooz S

[PATCH 15/36] drm/amd/display: Check BIOS images before it is used

2024-06-11 Thread Hamza Mahfooz
From: Alex Hung BIOS images may fail to load and null checks are added before they are used. This fixes 6 NULL_RETURNS issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Hamza Mahfooz Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 14 +++

[PATCH 19/36] drm/amd/display: Fix NULL pointer dereference for DTN log in DCN401

2024-06-11 Thread Hamza Mahfooz
From: Rodrigo Siqueira When users run the command: cat /sys/kernel/debug/dri/0/amdgpu_dm_dtn_log The following NULL pointer dereference happens: [ +0.03] BUG: kernel NULL pointer dereference, address: NULL [ +0.05] #PF: supervisor instruction fetch in kernel mode [ +0.02] #PF: e

[PATCH 16/36] drm/amd/display: Skip wbscl_set_scaler_filter if filter is null

2024-06-11 Thread Hamza Mahfooz
From: Alex Hung Callers can pass null in filter (i.e. from returned from the function wbscl_get_filter_coeffs_16p) and a null check is added to ensure that is not the case. This fixes 4 NULL_RETURNS issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Hamza Mahfooz Signed-off-by

[PATCH 18/36] drm/amd/display: mirror case cleanup for cursors

2024-06-11 Thread Hamza Mahfooz
From: Sridevi Arvindekar Mirror case unsupported for cursors. So, remove code for mirror case with cursors. Reviewed-by: Nevenko Stupar Acked-by: Hamza Mahfooz Signed-off-by: Sridevi Arvindekar --- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 30 +-- 1 file changed, 1 inse

[PATCH 26/36] drm/amd/display: Improve warning log for get OPP for OTG master

2024-06-11 Thread Hamza Mahfooz
From: Rodrigo Siqueira If some part of the driver tries to call resource_get_opp_heads_for_otg_master in a non-OTG master context, DC will trigger a dmesg warning since this situation indicates that some configuration associated with ODM slices might be wrong. This commit adds an extra log to des

[PATCH 23/36] drm/amd/display: Check pipe_ctx before it is used

2024-06-11 Thread Hamza Mahfooz
From: Alex Hung resource_get_odm_slice_count and resource_get_otg_master_for_stream can return null, and their returns must be checked before used. This fixes 4 NULL_RETURNS issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Hamza Mahfooz Signed-off-by: Alex Hung --- drivers

[PATCH 28/36] drm/amd/display: Remove redundant checks for ctx->dc_bios

2024-06-11 Thread Hamza Mahfooz
From: Alex Hung The null checks for ctx->dc_bios are redundant as it was already dereferenced previously, as reported by Coverity; therefore the null checks are removed. This fixes 7 REVERSE_INULL issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Hamza Mahfooz Signed-off-by:

[PATCH 24/36] drm/amd/display: Covert integers to double before divisions

2024-06-11 Thread Hamza Mahfooz
From: Alex Hung Integer divisions result in loss of fractional and accuracy is lost when assigned or compared with double. It is necessary to perform double/integer instead or explicitly cast them to double. This fixes 54 UNINTENDED_INTEGER_DIVISION issues reported by Coverity. Reviewed-by: Har

[PATCH 17/36] drm/amd/display: Add null checker before access structs

2024-06-11 Thread Hamza Mahfooz
From: Alex Hung Checks null pointer before accessing various structs. This fixes 5 NULL_RETURNS issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Hamza Mahfooz Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_utils.c | 2 ++ .../display/dc/d

[PATCH 20/36] drm/amd/display: Remove duplicate HWSS interfaces

2024-06-11 Thread Hamza Mahfooz
From: Joshua Aberback [Why] Some interface functions are defined in both the public and private HWSS interfaces, which can lead to confusion and runtime issues, therefore the duplicates should be eliminated. [How] - power_down should only be private, because it's only used within HWSS - update

[PATCH 05/36] drm/amd/display: Remove redundant condition with DEADCODE

2024-06-11 Thread Hamza Mahfooz
From: Ivan Lipski [WHY] Coverity analysis flagged this condition as DEADCODE since the variable 'req128_c' is always false, thus the condition is never true. [HOW] Remove the condition. Reviewed-by: Aurabindo Pillai Acked-by: Hamza Mahfooz Signed-off-by: Ivan Lipski --- .../gpu/drm/amd/disp

[PATCH 21/36] drm/amd/display: Make sure to reprogram ODM when resync fifo

2024-06-11 Thread Hamza Mahfooz
From: Alvin Lee Need to reconfigure ODM when resyncing FIFO because on OTG disable we clear all ODM programming Reviewed-by: Nicholas Kazlauskas Acked-by: Hamza Mahfooz Signed-off-by: Alvin Lee --- .../amd/display/dc/hwss/dcn314/dcn314_hwseq.c | 19 ++- .../amd/display/dc/hws

[PATCH 22/36] drm/amd/display: Check dc_stream_state before it is used

2024-06-11 Thread Hamza Mahfooz
From: Alex Hung dc_state_get_stream_status dc_state_get_paired_subvp_stream and other functions can return null, and therefore null must be checked before status can be used. This fixes 21 NULL_RETURNS issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Hamza Mahfooz Signed-off

[PATCH 31/36] drm/amd/display: Remove redundant checks for opp

2024-06-11 Thread Hamza Mahfooz
From: Alex Hung The null checks for opp are redundant as they were already dereferenced previously, as reported by Coverity; therefore the null checks are removed. This fixes 2 REVERSE_INULL issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Hamza Mahfooz Signed-off-by: Alex H

[PATCH 30/36] drm/amd/display: Remove redundant null checks

2024-06-11 Thread Hamza Mahfooz
From: Alex Hung The null checks are redundant as they were already dereferenced previously, as reported by Coverity; therefore the null checks are removed. This fixes 7 REVERSE_INULL issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Hamza Mahfooz Signed-off-by: Alex Hung ---

[PATCH 32/36] drm/amd/display: Remove redundant checks for context

2024-06-11 Thread Hamza Mahfooz
From: Alex Hung The null checks for context are redundant as it was already dereferenced previously, as reported by Coverity; therefore the null checks are removed. This fixes 2 REVERSE_INULL issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Hamza Mahfooz Signed-off-by: Alex

[PATCH 36/36] drm/amd/display: 3.2.289

2024-06-11 Thread Hamza Mahfooz
From: Aric Cyr This version brings along the following: - DCN401 fixes - DPIA fixes - DML21 fixes - Misc Coverity fixes Acked-by: Hamza Mahfooz Signed-off-by: Aric Cyr --- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/

[PATCH 34/36] drm/amd/display: Remove redundant null checks

2024-06-11 Thread Hamza Mahfooz
From: Alex Hung The null checks for aconnector and aconnector->dc_link and stream redundant as they were already dereferenced previously as reported by Coverity; therefore the null checks are removed. This fixes 4 REVERSE_INULL issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by:

[PATCH 33/36] drm/amd/display: Check UnboundedRequestEnabled's value

2024-06-11 Thread Hamza Mahfooz
From: Alex Hung CalculateSwathAndDETConfiguration_params_st's UnboundedRequestEnabled is a pointer (i.e. dml_bool_t *UnboundedRequestEnabled), and thus if (p->UnboundedRequestEnabled) checks its address, not bool value. This fixes 1 REVERSE_INULL issue reported by Coverity. Reviewed-by: Harry W

[PATCH 27/36] drm/amd/display: Remove redundant checks for res_pool->dccg

2024-06-11 Thread Hamza Mahfooz
From: Alex Hung The null checks for res_pool->dccg are redundant as it was already dereferenced previously, as reported by Coverity; therefore the null checks are removed. This fixes 6 REVERSE_INULL issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Hamza Mahfooz Signed-off-by

[PATCH 25/36] drm/amd/display: Fix warning caused by an attempt to configure a non-otg master

2024-06-11 Thread Hamza Mahfooz
From: Rodrigo Siqueira When booting the system with DCN401, the driver adds the following dmesg warning: WARNING: CPU: 8 PID: 175 at drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_resource.c:1923 resource_get_opp_heads_for_otg_master+0x13/0x70 [amdgpu] Modules linked in: amdgpu(+) hid_generic

[PATCH 29/36] drm/amd/display: Remove unused value set from 'min_hratio_fact' in dml

2024-06-11 Thread Hamza Mahfooz
From: Ivan Lipski These portions of code are flagged as 'UNUSED_VALUE' by the Coverity analysis since the assigned values of these vars are never used in the code. Reviewed-by: Alex Hung Reviewed-by: Aurabindo Pillai Acked-by: Hamza Mahfooz Signed-off-by: Ivan Lipski --- .../drm/amd/display

[PATCH 35/36] drm/amd/display: [FW Promotion] Release 0.0.222.0

2024-06-11 Thread Hamza Mahfooz
From: Anthony Koo - Add new condition for PSR exit due to ESD recovery - Add new VB scaling feature for ABM by interpolating between existing VB parameters, allowing driver to have fine grain scaled VB levels between 0 - 250 Acked-by: Hamza Mahfooz Signed-off-by: Anthony Koo --- drive

Re: [RFC PATCH v4 00/42] Color Pipeline API w/ VKMS

2024-06-11 Thread Harry Wentland
On 2024-06-05 06:04, Melissa Wen wrote: > On 02/26, Harry Wentland wrote: >> This is an RFC set for a color pipeline API, along with a sample >> implementation in VKMS. All the key API bits are here. VKMS now >> supports two named transfer function colorops and two matrix >> colorops. We have IG

[PATCH] drm/amd/display: Enable idle optimizations on DCN401

2024-06-11 Thread Aurabindo Pillai
Idle optimizations were disabled due to some bugs which are now fixed in DMCUB and PM firwmare. Enable these the optimizations back. Signed-off-by: Aurabindo Pillai --- .../gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c| 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gp

[PATCH] drm/amdgpu/vcn: port mmsch ctx table size fix from jpeg v4

2024-06-11 Thread Jane Jian
add jpeg table size to ctx table size rather than override it v2: save jpeg header info otherwise it will lose debug info Signed-off-by: Jane Jian --- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/jp

[linux-next:master] BUILD REGRESSION a957267fa7e9159d3d2ee1421359ebf228570c68

2024-06-11 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: a957267fa7e9159d3d2ee1421359ebf228570c68 Add linux-next specific files for 20240611 Error/Warning reports: https://lore.kernel.org/oe-kbuild-all/202406111949.9wfztbkm-...@intel.com https

Re: [PATCH] drm/amdgpu/vcn: port mmsch ctx table size fix from jpeg v4

2024-06-11 Thread JingWen Chen
feel free to add Reviewed-by: Jingwen Chen On 2024/6/12 11:41, Jane Jian wrote: > add jpeg table size to ctx table size rather than override it > > v2: > save jpeg header info otherwise it will lose debug info > Signed-off-by: Jane Jian > --- > drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 7