]> Git Repo - linux.git/log
linux.git
11 months agodrm/amdgpu: Fix discovery initialization failure during pci rescan
Ma Jun [Tue, 2 Apr 2024 09:21:01 +0000 (17:21 +0800)]
drm/amdgpu: Fix discovery initialization failure during pci rescan

Waiting for system ready to fix the discovery initialization
failure issue. This failure usually occurs when dGPU is removed
and then rescanned via command line.
It's caused by following two errors:
[1] vram size is 0
[2] wrong binary signature

Signed-off-by: Ma Jun <[email protected]>
Acked-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amdgpu: fix visible VRAM handling during faults
Christian König [Thu, 4 Apr 2024 14:25:40 +0000 (16:25 +0200)]
drm/amdgpu: fix visible VRAM handling during faults

When we removed the hacky start code check we actually didn't took into
account that *all* VRAM pages needs to be CPU accessible.

Clean up the code and unify the handling into a single helper which
checks if the whole resource is CPU accessible.

The only place where a partial check would make sense is during
eviction, but that is neglitible.

Signed-off-by: Christian König <[email protected]>
Fixes: aed01a68047b ("drm/amdgpu: Remove TTM resource->start visible VRAM condition v2")
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
CC: [email protected]
11 months agodrm/amdgpu: validate the parameters of bo mapping operations more clearly
xinhui pan [Thu, 11 Apr 2024 03:11:38 +0000 (11:11 +0800)]
drm/amdgpu: validate the parameters of bo mapping operations more clearly

Verify the parameters of
amdgpu_vm_bo_(map/replace_map/clearing_mappings) in one common place.

Fixes: dc54d3d1744d ("drm/amdgpu: implement AMDGPU_VA_OP_CLEAR v2")
Cc: [email protected]
Reported-by: Vlad Stolyarov <[email protected]>
Suggested-by: Christian König <[email protected]>
Signed-off-by: xinhui pan <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amdgpu: add new aca smu callback func parse_error_code()
Yang Wang [Fri, 12 Apr 2024 01:53:15 +0000 (09:53 +0800)]
drm/amdgpu: add new aca smu callback func parse_error_code()

add new aca smu callback parse_error_code{} to avoid specific asic check
in amdgpu_aca.c file

Signed-off-by: Yang Wang <[email protected]>
Reviewed-by: Tao Zhou <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: 3.2.281
Aric Cyr [Mon, 8 Apr 2024 00:47:29 +0000 (20:47 -0400)]
drm/amd/display: 3.2.281

This version brings along following fixes:

* Expand dmub_cmd operations.
* Update DVI configuration.
* Modify power sequence.
* Enable Z10 flag for IPS.
* Multiple code cleanups.

Acked-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Aric Cyr <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Add missing replay field
Rodrigo Siqueira [Wed, 3 Apr 2024 21:11:10 +0000 (15:11 -0600)]
drm/amd/display: Add missing replay field

Reviewed-by: Leo Li <[email protected]>
Signed-off-by: Rodrigo Siqueira <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Add missing callback for init_watermarks in DCN 301
Rodrigo Siqueira [Wed, 3 Apr 2024 21:04:54 +0000 (15:04 -0600)]
drm/amd/display: Add missing callback for init_watermarks in DCN 301

Reviewed-by: Leo Li <[email protected]>
Signed-off-by: Rodrigo Siqueira <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Update DCN201 link encoder registers
Rodrigo Siqueira [Wed, 3 Apr 2024 20:41:10 +0000 (14:41 -0600)]
drm/amd/display: Update DCN201 link encoder registers

Add some missing registers expansion in the dcn201_link_encoder file.

Reviewed-by: Leo Li <[email protected]>
Signed-off-by: Rodrigo Siqueira <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Move REG sequence from program ogam to idle before connect
Rodrigo Siqueira [Wed, 3 Apr 2024 20:35:07 +0000 (14:35 -0600)]
drm/amd/display: Move REG sequence from program ogam to idle before connect

Fill ring buffer before offload.

Reviewed-by: Leo Li <[email protected]>
Signed-off-by: Rodrigo Siqueira <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Rework dcn10_stream_encoder header
Rodrigo Siqueira [Wed, 3 Apr 2024 20:25:22 +0000 (14:25 -0600)]
drm/amd/display: Rework dcn10_stream_encoder header

This commit remove some unused code and also rename one of the define.

Reviewed-by: Leo Li <[email protected]>
Signed-off-by: Rodrigo Siqueira <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Update FMT settings for 4:2:0
Eric Bernstein [Fri, 17 Aug 2018 15:21:30 +0000 (11:21 -0400)]
drm/amd/display: Update FMT settings for 4:2:0

[Why] Update FMT_CONTROL settings based on HW spec
[How] Update FMT settings for 4:2:0

Reviewed-by: Leo Li <[email protected]>
Signed-off-by: Eric Bernstein <[email protected]>
Reviewed-by: Rodrigo Siqueira <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amdgpu: increase mes submission timeout
Jonathan Kim [Thu, 11 Apr 2024 18:57:52 +0000 (14:57 -0400)]
drm/amdgpu: increase mes submission timeout

MES internally has a timeout allowance of 2 seconds.
Increase driver timeout to 3 seconds to be safe.

Signed-off-by: Jonathan Kim <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Remove unnecessary code
Rodrigo Siqueira [Wed, 3 Apr 2024 17:14:26 +0000 (11:14 -0600)]
drm/amd/display: Remove unnecessary code

This commit groups many parts of the code that are redundant or not used
and drops all of them.

Reviewed-by: Leo Li <[email protected]>
Signed-off-by: Rodrigo Siqueira <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Update some comments to improve the code readability
Rodrigo Siqueira [Wed, 3 Apr 2024 17:51:20 +0000 (11:51 -0600)]
drm/amd/display: Update some comments to improve the code readability

This commit updates some comments to be more precise and adds another
small comment to some other parts to improve the code readability.

Reviewed-by: Leo Li <[email protected]>
Signed-off-by: Rodrigo Siqueira <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Replace int with unsigned int
Rodrigo Siqueira [Wed, 3 Apr 2024 16:26:17 +0000 (10:26 -0600)]
drm/amd/display: Replace int with unsigned int

Reviewed-by: Leo Li <[email protected]>
Signed-off-by: Rodrigo Siqueira <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Group scl_data together in resource_build_scaling_params
Rodrigo Siqueira [Tue, 2 Apr 2024 23:39:42 +0000 (17:39 -0600)]
drm/amd/display: Group scl_data together in resource_build_scaling_params

Move the scl_data.format to be close to other similar parts.

Reviewed-by: Leo Li <[email protected]>
Signed-off-by: Rodrigo Siqueira <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Fix PSR command version passed
Mikita Lipski [Tue, 2 Apr 2024 23:22:42 +0000 (17:22 -0600)]
drm/amd/display: Fix PSR command version passed

[why]
Driver was passing a wrong command version which to DMCUB which caused
the DMCUB to treat it as 0, so it wouldn't support dual eDP and would
override the panel index to 0 instead of choosing between 0/1.

[how]
Use DMUB_CMD_PSR_CONTROL_VERSION_1 instead of PSR_VERSION_1.

Reviewed-by: Leo Li <[email protected]>
Signed-off-by: Mikita Lipski <[email protected]>
Reviewed-by: Rodrigo Siqueira <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Improve the log precision
Ethan Bitnun [Mon, 12 Feb 2024 23:02:33 +0000 (18:02 -0500)]
drm/amd/display: Improve the log precision

The previous assumption that there will be an optimize_bandwidth call
following every prepare_bandwidth call was incorrect and caused small
inaccuracies in logging, as some info was only updated in later prepare
calls.

Reviewed-by: Leo Li <[email protected]>
Signed-off-by: Ethan Bitnun <[email protected]>
Reviewed-by: Rodrigo Siqueira <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Adjust headers
Rodrigo Siqueira [Tue, 2 Apr 2024 22:40:25 +0000 (16:40 -0600)]
drm/amd/display: Adjust headers

Update headers by removing two unecessary headers and include a new one.

Reviewed-by: Leo Li <[email protected]>
Signed-off-by: Rodrigo Siqueira <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Use dce_version instead of chip_id
Rodrigo Siqueira [Tue, 2 Apr 2024 21:58:31 +0000 (15:58 -0600)]
drm/amd/display: Use dce_version instead of chip_id

The chip ID DEVICE_ID_NV_13FE is not meaningful and represents a legacy
way of dealing with chip ID. This commit uses dc_version instead of
chip_id and also DCN_VERSION_2_01 instead of DEVICE_ID_NV_13FE.

Signed-off-by: Rodrigo Siqueira <[email protected]>
Reviewed-by: Leo Li <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agoRevert "drm/amd/display: fix USB-C flag update after enc10 feature init"
Alex Deucher [Fri, 29 Mar 2024 22:03:03 +0000 (18:03 -0400)]
Revert "drm/amd/display: fix USB-C flag update after enc10 feature init"

This reverts commit b5abd7f983e14054593dc91d6df2aa5f8cc67652.

This change breaks DSC on 4k monitors at 144Hz over USB-C.

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3254
Reviewed-by: Harry Wentland <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Cc: Muhammad Ahmed <[email protected]>
Cc: Tom Chung <[email protected]>
Cc: Charlene Liu <[email protected]>
Cc: Hamza Mahfooz <[email protected]>
Cc: Harry Wentland <[email protected]>
11 months agodrm/amd/display: Expand dmub_cmd operations
Anthony Koo [Sat, 6 Apr 2024 03:43:02 +0000 (23:43 -0400)]
drm/amd/display: Expand dmub_cmd operations

Update dmub_cmd to manipulate SDP control in replay FSM, add command
for panel_cntl, expand link rate enum, and increase the reserve byte.

Acked-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Anthony Koo <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amdgpu: add missing vbios version from devcoredump
Sunil Khatri [Fri, 12 Apr 2024 10:22:42 +0000 (15:52 +0530)]
drm/amdgpu: add missing vbios version from devcoredump

Add vbios version in the devcoredump along with formatting
the information with proper alignment.

Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Sunil Khatri <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amdgpu/gfx11: properly handle regGRBM_GFX_CNTL in soft reset
Alex Deucher [Thu, 28 Mar 2024 17:19:58 +0000 (13:19 -0400)]
drm/amdgpu/gfx11: properly handle regGRBM_GFX_CNTL in soft reset

Need to take the srbm_mutex and while we are here, use the
helper function soc21_grbm_select();

Reviewed-by: Lijo Lazar <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Rework power sequence and resource allocation logic
Sung Joon Kim [Thu, 4 Apr 2024 17:00:02 +0000 (13:00 -0400)]
drm/amd/display: Rework power sequence and resource allocation logic

Rework part of the modifications made to the power sequence and resource
allocation logic.

Reviewed-by: Xi (Alex) Liu <[email protected]>
Acked-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Sung Joon Kim <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Enable Z10 flag for IPS FSM
Sung Joon Kim [Thu, 4 Apr 2024 19:03:58 +0000 (15:03 -0400)]
drm/amd/display: Enable Z10 flag for IPS FSM

[why]
IPS FSM requires Z10 flag to be enabled to do save and restore the
registers properly.

[how]
Enable Z10 and use the correct function to determine Z10 capability

Reviewed-by: Nicholas Kazlauskas <[email protected]>
Acked-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Sung Joon Kim <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Fix incorrect pointer assignment
Chaitanya Dhere [Thu, 4 Apr 2024 18:34:04 +0000 (14:34 -0400)]
drm/amd/display: Fix incorrect pointer assignment

[Why]
Pointer initialization and assignment for dml2_options is not done
correctly. While this works for some compilers, others give an error.

[How]
Modify dc_state_create code to correctly initialize the dml2_opt pointer
and pass it to dml2_create. Also update the code with correct derefrence
operations.

Reviewed-by: Aurabindo Pillai <[email protected]>
Acked-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Chaitanya Dhere <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Pass sequential ONO bit to DMCUB boot options
Nicholas Kazlauskas [Wed, 3 Apr 2024 14:41:29 +0000 (10:41 -0400)]
drm/amd/display: Pass sequential ONO bit to DMCUB boot options

[Why]
IPS ono sequence ordering differs based on the ASIC.

[How]
Detect the ASIC ID revision and set the boot option accordingly. Feed
it through the DCN35 DMUB functions.

Reviewed-by: Sung joon Kim <[email protected]>
Acked-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Nicholas Kazlauskas <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: add support for chroma offset
Samson Tam [Mon, 1 Apr 2024 17:51:58 +0000 (13:51 -0400)]
drm/amd/display: add support for chroma offset

[Why]
Adding support for chroma subsampling offset (cositing) in scaler
calculations to adjust reference point where we determine post-scaling
chroma value in YUV420 surfaces.

[How]
Add support for cositing options: NONE, LEFT and TOPLEFT Add debug
option force_cositing and set default to TOPLEFT to maintain same
behaviour as without offset support.

Reviewed-by: Jun Lei <[email protected]>
Acked-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Samson Tam <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: limit the code change to ips enabled asic
Charlene Liu [Tue, 2 Apr 2024 20:03:08 +0000 (16:03 -0400)]
drm/amd/display: limit the code change to ips enabled asic

Limit the code change for ips enable to reduce the impact for now. Also
exit_ips first before dc_power_down to avoid 0x9f.

Reviewed-by: Chris Park <[email protected]>
Acked-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Charlene Liu <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Modify resource allocation logic
Sung Joon Kim [Mon, 1 Apr 2024 20:45:10 +0000 (16:45 -0400)]
drm/amd/display: Modify resource allocation logic

To reduce the complexity of pipe resource allocation for different
use-cases, now we search for any free pipe sequentially rather than from
bottom up.

Reviewed-by: Wenjing Liu <[email protected]>
Acked-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Sung Joon Kim <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Add a function for checking tmds mode
Chris Park [Tue, 2 Apr 2024 06:06:00 +0000 (02:06 -0400)]
drm/amd/display: Add a function for checking tmds mode

[Why]
DVI is TMDS signal like HDMI but without audio.  Current signal check
does not correctly reflect DVI clock programming.

[How]
Define a new signal check for TMDS that includes DVI to HDMI TMDS
programming.

Reviewed-by: Dillon Varone <[email protected]>
Acked-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Chris Park <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Modify power sequence
Sung Joon Kim [Wed, 27 Mar 2024 22:04:09 +0000 (18:04 -0400)]
drm/amd/display: Modify power sequence

Need to update the power sequence to help prevent potential issues
like multi-display or multi-plane.

Reviewed-by: Duncan Ma <[email protected]>
Acked-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Sung Joon Kim <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: 3.2.280
Aric Cyr [Sun, 31 Mar 2024 22:48:38 +0000 (18:48 -0400)]
drm/amd/display: 3.2.280

This version brings along the following:
- DCN10 fixes
- DCN316 fixes
- DML2 fixes
- DWB fixes
- Expanded FAMS support
- Misc code style fixes
- ODM fixes
- VSC SDP fixes

Acked-by: Hamza Mahfooz <[email protected]>
Signed-off-by: Aric Cyr <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Reorganize dwb header
Rodrigo Siqueira [Wed, 27 Mar 2024 15:41:41 +0000 (09:41 -0600)]
drm/amd/display: Reorganize dwb header

This commit makes some small adjustments in the dwb header.

Acked-by: Hamza Mahfooz <[email protected]>
Signed-off-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amdkfd: Fix memory leak in create_process failure
Felix Kuehling [Wed, 10 Apr 2024 19:52:10 +0000 (15:52 -0400)]
drm/amdkfd: Fix memory leak in create_process failure

Fix memory leak due to a leaked mmget reference on an error handling
code path that is triggered when attempting to create KFD processes
while a GPU reset is in progress.

Fixes: 0ab2d7532b05 ("drm/amdkfd: prepare per-process debug enable and disable")
CC: Xiaogang Chen <[email protected]>
Signed-off-by: Felix Kuehling <[email protected]>
Tested-by: Harish Kasiviswanthan <[email protected]>
Reviewed-by: Mukul Joshi <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Change DPCD address range
Rodrigo Siqueira [Tue, 26 Mar 2024 20:46:54 +0000 (14:46 -0600)]
drm/amd/display: Change DPCD address range

Change DP_PHY_REPEATER_EXTENDED_WAIT_TIMEOUT with
DP_PHY_REPEATER_128B132B_RATES.

Acked-by: Hamza Mahfooz <[email protected]>
Signed-off-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Add fallback configuration for set DRR in DCN10
Rodrigo Siqueira [Tue, 26 Mar 2024 17:55:19 +0000 (11:55 -0600)]
drm/amd/display: Add fallback configuration for set DRR in DCN10

Set OTG/OPTC parameters to 0 if something goes wrong on DCN10.

Acked-by: Hamza Mahfooz <[email protected]>
Signed-off-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Add fallback configuration when set DRR
Rodrigo Siqueira [Tue, 26 Mar 2024 17:49:50 +0000 (11:49 -0600)]
drm/amd/display: Add fallback configuration when set DRR

Set OTG/OPTC parameter to 0 if failed to set DRR.

Acked-by: Hamza Mahfooz <[email protected]>
Signed-off-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Update DCN10 resource
Rodrigo Siqueira [Tue, 26 Mar 2024 17:48:40 +0000 (11:48 -0600)]
drm/amd/display: Update DCN10 resource

Update DCN10 to use legacy fast update and ensure that the MPCC count is
the same as the pipe_count.

Acked-by: Hamza Mahfooz <[email protected]>
Signed-off-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Disable P010 Support of DCN 1.0
Rodrigo Siqueira [Tue, 26 Mar 2024 17:23:40 +0000 (11:23 -0600)]
drm/amd/display: Disable P010 Support of DCN 1.0

[WHY]
DCN 1.0 is not ready for the P010 support.

[HOW]
1. Set the P010 plan_cap of DCN 1.0 to be false.
2. Let the DM do the plan cap initialization of DCN 1.0.

Reviewed-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Figo Wang <[email protected]>
Signed-off-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Update resource capabilities and debug struct for DCN201
Rodrigo Siqueira [Tue, 26 Mar 2024 17:11:54 +0000 (11:11 -0600)]
drm/amd/display: Update resource capabilities and debug struct for DCN201

Some of the resource capabilities for DCN201 and the debug default
option are outdated. This commit just set some of the missing
configurations for DCN201.

Acked-by: Hamza Mahfooz <[email protected]>
Signed-off-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Drop legacy code
Rodrigo Siqueira [Tue, 26 Mar 2024 16:42:05 +0000 (10:42 -0600)]
drm/amd/display: Drop legacy code

This commit removes code that are not used by display anymore.

Acked-by: Hamza Mahfooz <[email protected]>
Signed-off-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Adjust some includes used by display
Rodrigo Siqueira [Tue, 26 Mar 2024 15:03:50 +0000 (09:03 -0600)]
drm/amd/display: Adjust some includes used by display

Some of the includes used in the DC can be removed and others need to be
update. This commit adjusts some of those headers in the display code.

Acked-by: Hamza Mahfooz <[email protected]>
Signed-off-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Add comments to improve the code readability
Rodrigo Siqueira [Tue, 26 Mar 2024 14:38:55 +0000 (08:38 -0600)]
drm/amd/display: Add comments to improve the code readability

This commit just introduce some basic comments that helps to understand
the overall behavior of some structs.

Acked-by: Hamza Mahfooz <[email protected]>
Signed-off-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amdgpu: remove invalid resource->start check v2
Christian König [Fri, 15 Mar 2024 12:07:53 +0000 (13:07 +0100)]
drm/amdgpu: remove invalid resource->start check v2

The majority of those where removed in the commit 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 invalid mapping errors.

v2: also remove the unused variable

Signed-off-by: Christian König <[email protected]>
Fixes: aed01a68047b ("drm/amdgpu: Remove TTM resource->start visible VRAM condition v2")
CC: [email protected]
Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amdgpu/sdma6: set sdma hang watchdog
Jack Xiao [Tue, 9 Apr 2024 09:31:01 +0000 (17:31 +0800)]
drm/amdgpu/sdma6: set sdma hang watchdog

Set SDMAx_WATCHDOG_CNTL.QUEUE_HANG_COUNT registers
to improve SDMA reliability.

Signed-off-by: Jack Xiao <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/amdgpu: Update PF2VF Header
Luqmaan Irshad [Tue, 2 Apr 2024 21:33:46 +0000 (17:33 -0400)]
drm/amd/amdgpu: Update PF2VF Header

Adding a new field for GPU Capacity to align the header with the host.

Signed-off-by: Luqmaan Irshad <[email protected]>
Acked-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amdgpu: differentiate external rev id for gfx 11.5.0
Yifan Zhang [Sun, 7 Apr 2024 14:01:35 +0000 (22:01 +0800)]
drm/amdgpu: differentiate external rev id for gfx 11.5.0

This patch to differentiate external rev id for gfx 11.5.0.

Signed-off-by: Yifan Zhang <[email protected]>
Reviewed-by: Tim Huang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: delete the redundant initialization in dcn3_51_soc
Xiang Yang [Sun, 7 Apr 2024 09:01:31 +0000 (17:01 +0800)]
drm/amd/display: delete the redundant initialization in dcn3_51_soc

the dram_clock_change_latency_us in dcn3_51_soc is initialized twice, so
delete one of them.

Acked-by: Alex Deucher <[email protected]>
Signed-off-by: Xiang Yang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agoDocumentation/gpu: correct path of reference
Simon Horman [Sat, 6 Apr 2024 15:43:02 +0000 (16:43 +0100)]
Documentation/gpu: correct path of reference

The path to GPU documentation is Documentation/gpu
rather than Documentation/GPU

This appears to have been introduced by commit ba162ae749a5
("Documentation/gpu: Introduce a simple contribution list for display code")

Flagged by make htmldocs.

Signed-off-by: Simon Horman <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/radeon/radeon_display: Decrease the size of allocated memory
Erick Archer [Sat, 30 Mar 2024 16:34:47 +0000 (17:34 +0100)]
drm/radeon/radeon_display: Decrease the size of allocated memory

This is an effort to get rid of all multiplications from allocation
functions in order to prevent integer overflows [1] [2].

In this case, the memory allocated to store RADEONFB_CONN_LIMIT pointers
to "drm_connector" structures can be avoided. This is because this
memory area is never accessed.

Also, in the kzalloc function, it is preferred to use sizeof(*pointer)
instead of sizeof(type) due to the type of the variable can change and
one needs not change the former (unlike the latter).

At the same time take advantage to remove the "#if 0" block, the code
where the removed memory area was accessed, and the RADEONFB_CONN_LIMIT
constant due to now is never used.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments
Link: https://github.com/KSPP/linux/issues/160
Acked-by: Christian König <[email protected]>
Signed-off-by: Erick Archer <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Add V_TOTAL_REGS to dcn10
Rodrigo Siqueira [Tue, 26 Mar 2024 14:38:37 +0000 (08:38 -0600)]
drm/amd/display: Add V_TOTAL_REGS to dcn10

DCN10 OPTC is used by other DCNs, and in some cases it might be useful
to have V_TOTAL_REGS available. This commit add V_TOTAL_REGS as part of
the TG field.

Acked-by: Hamza Mahfooz <[email protected]>
Signed-off-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: [FW Promotion] Release 0.0.212.0
Anthony Koo [Sat, 30 Mar 2024 20:51:03 +0000 (16:51 -0400)]
drm/amd/display: [FW Promotion] Release 0.0.212.0

 - Add boot option to change the ONO powerup flow, impacting
   the order of power domains to power up or down first

Acked-by: Hamza Mahfooz <[email protected]>
Signed-off-by: Anthony Koo <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agoRevert "drm/amd/display: Enabling urgent latency adjustment for DCN35"
Qili Lu [Fri, 29 Mar 2024 00:19:56 +0000 (20:19 -0400)]
Revert "drm/amd/display: Enabling urgent latency adjustment for DCN35"

This reverts commit b72a7e0fd0f8d235f885f84642e5c71f4e058c4b.

It causes a dead loop in dml_prefetch_check.

Reviewed-by: Nicholas Kazlauskas <[email protected]>
Acked-by: Hamza Mahfooz <[email protected]>
Signed-off-by: Qili Lu <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Rebuild test pattern params for DP_TEST_PATTERN_VIDEO_MODE
George Shen [Wed, 27 Mar 2024 22:05:51 +0000 (18:05 -0400)]
drm/amd/display: Rebuild test pattern params for DP_TEST_PATTERN_VIDEO_MODE

[Why]
For video mode test pattern (i.e. test pattern disable), the call to
rebuild test pattern params for the pipe is skipped. This causes
dynamic disablement of test pattern to not work, as the
test_pattern_params of the pipe will not be updated and retain the
values of the previously enabled test pattern.

[How]
Rebuild test pattern params even when test pattern is video mode,
allowing the pipe to have updated test_pattern_params values.

Reviewed-by: Nevenko Stupar <[email protected]>
Reviewed-by: Chaitanya Dhere <[email protected]>
Acked-by: Hamza Mahfooz <[email protected]>
Signed-off-by: George Shen <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Adjust dprefclk by down spread percentage.
Zhongwei [Wed, 27 Mar 2024 05:49:40 +0000 (13:49 +0800)]
drm/amd/display: Adjust dprefclk by down spread percentage.

[Why]
OLED panels show no display for large vtotal timings.

[How]
Check if ss is enabled and read from lut for spread spectrum percentage.
Adjust dprefclk as required. DP_DTO adjustment is for edp only.

Cc: [email protected]
Reviewed-by: Nicholas Kazlauskas <[email protected]>
Acked-by: Hamza Mahfooz <[email protected]>
Signed-off-by: Zhongwei <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Set VSC SDP Colorimetry same way for MST and SST
Harry Wentland [Thu, 21 Mar 2024 15:13:38 +0000 (11:13 -0400)]
drm/amd/display: Set VSC SDP Colorimetry same way for MST and SST

The previous check for the is_vsc_sdp_colorimetry_supported flag
for MST sink signals did nothing. Simplify the code and use the
same check for MST and SST.

Cc: [email protected]
Reviewed-by: Agustin Gutierrez <[email protected]>
Acked-by: Hamza Mahfooz <[email protected]>
Signed-off-by: Harry Wentland <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Program VSC SDP colorimetry for all DP sinks >= 1.4
Harry Wentland [Tue, 12 Mar 2024 15:55:52 +0000 (11:55 -0400)]
drm/amd/display: Program VSC SDP colorimetry for all DP sinks >= 1.4

In order for display colorimetry to work correctly on DP displays
we need to send the VSC SDP packet. We should only do so for
panels with DPCD revision greater or equal to 1.4 as older
receivers might have problems with it.

Cc: [email protected]
Cc: Joshua Ashton <[email protected]>
Cc: Xaver Hugl <[email protected]>
Cc: Melissa Wen <[email protected]>
Cc: Agustin Gutierrez <[email protected]>
Reviewed-by: Agustin Gutierrez <[email protected]>
Acked-by: Hamza Mahfooz <[email protected]>
Signed-off-by: Harry Wentland <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: add dwb support to dml2
Charlene Liu [Tue, 19 Mar 2024 23:41:34 +0000 (19:41 -0400)]
drm/amd/display: add dwb support to dml2

[why]
dwb was not POR previosly.
now need to enable dwb in dml2.

Limitation:
HW DML assumes only one DWB
one set of watermark for all 4 watermark sets
one stream has one DWB only.
WB scaling dml input has one set of scaling tap.
(no chroma so far)

needs to follow up

Reviewed-by: Chris Park <[email protected]>
Acked-by: Hamza Mahfooz <[email protected]>
Signed-off-by: Charlene Liu <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: refactor vpg.h
Parandhaman K [Fri, 22 Mar 2024 12:07:43 +0000 (17:37 +0530)]
drm/amd/display: refactor vpg.h

why and how:
as part of cleanup, need to refactor vpg. It was improperly referenced
as a dcn specfic part of link. the dcn agnostic code needed was ripped out
and put into vpg.h, now in dc/inc/hw.

Reviewed-by: Alvin Lee <[email protected]>
Acked-by: Hamza Mahfooz <[email protected]>
Signed-off-by: Parandhaman K <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: expand the non standard link rate for testing
Allen Pan [Tue, 26 Mar 2024 14:41:17 +0000 (10:41 -0400)]
drm/amd/display: expand the non standard link rate for testing

[Why]
6.75 Gbps link rate training for DP_TEST_LINK_RATE_RATE_8

Reviewed-by: Charlene Liu <[email protected]>
Acked-by: Hamza Mahfooz <[email protected]>
Signed-off-by: Allen Pan <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: fix disable otg wa logic in DCN316
Fudongwang [Tue, 26 Mar 2024 08:03:16 +0000 (16:03 +0800)]
drm/amd/display: fix disable otg wa logic in DCN316

[Why]
Wrong logic cause screen corruption.

[How]
Port logic from DCN35/314.

Cc: [email protected]
Reviewed-by: Nicholas Kazlauskas <[email protected]>
Acked-by: Hamza Mahfooz <[email protected]>
Signed-off-by: Fudongwang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Do not recursively call manual trigger programming
Dillon Varone [Thu, 21 Mar 2024 17:49:43 +0000 (13:49 -0400)]
drm/amd/display: Do not recursively call manual trigger programming

[WHY&HOW]
We should not be recursively calling the manual trigger programming function when
FAMS is not in use.

Cc: [email protected]
Reviewed-by: Alvin Lee <[email protected]>
Acked-by: Hamza Mahfooz <[email protected]>
Signed-off-by: Dillon Varone <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Add driver support for future FAMS versions
Dillon Varone [Sat, 16 Mar 2024 04:31:19 +0000 (00:31 -0400)]
drm/amd/display: Add driver support for future FAMS versions

[WHY&HOW]
Changes to support future versions of FAMS.

Reviewed-by: Alvin Lee <[email protected]>
Acked-by: Hamza Mahfooz <[email protected]>
Signed-off-by: Dillon Varone <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/pm: Allow setting soft max frequency in VF
Lijo Lazar [Tue, 2 Apr 2024 03:37:54 +0000 (09:07 +0530)]
drm/amd/pm: Allow setting soft max frequency in VF

Setting soft max frequency for MCLK is allowed in 1VF mode in SMUv13.0.6
SOCs.

Signed-off-by: Lijo Lazar <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: fix an incorrect ODM policy assigned for subvp
Wenjing Liu [Fri, 22 Mar 2024 19:29:56 +0000 (15:29 -0400)]
drm/amd/display: fix an incorrect ODM policy assigned for subvp

[why]
When Subvp pipe's index is smaller than main pipe's index, the main
pipe's ODM policy is not yet assigned. If we assign subvp pipe's ODM
policy based on main pipe, we will assign uninitialized ODM policy.

[how]
Instead of copying main pipe's policy we copy the main pipe ODM policy
logic. So it doesn't matter whether if main pipe's ODM policy is set,
phantom pipe will always have the same policy because it running the
same calcualtion to derive ODM policy.

Cc: [email protected]
Reviewed-by: Alvin Lee <[email protected]>
Acked-by: Hamza Mahfooz <[email protected]>
Signed-off-by: Wenjing Liu <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: always reset ODM mode in context when adding first plane
Wenjing Liu [Fri, 22 Mar 2024 19:02:45 +0000 (15:02 -0400)]
drm/amd/display: always reset ODM mode in context when adding first plane

[why]
In current implemenation ODM mode is only reset when the last plane is
removed from dc state. For any dc validate we will always remove all
current planes and add new planes. However when switching from no planes
to 1 plane, ODM mode is not reset because no planes get removed. This
has caused an issue where we kept ODM combine when it should have been
remove when a plane is added. The change is to reset ODM mode when
adding the first plane.

Cc: [email protected]
Reviewed-by: Alvin Lee <[email protected]>
Acked-by: Hamza Mahfooz <[email protected]>
Signed-off-by: Wenjing Liu <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amdgpu: fix incorrect number of active RBs for gfx11
Tim Huang [Wed, 3 Apr 2024 09:28:44 +0000 (17:28 +0800)]
drm/amdgpu: fix incorrect number of active RBs for gfx11

The RB bitmap should be global active RB bitmap &
active RB bitmap based on active SA.

Signed-off-by: Tim Huang <[email protected]>
Reviewed-by: Yifan Zhang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Return max resolution supported by DWB
Alex Hung [Sat, 23 Mar 2024 18:02:54 +0000 (12:02 -0600)]
drm/amd/display: Return max resolution supported by DWB

mode_config's max width x height is 4096x2160 and is higher than DWB's
max resolution 3840x2160 which is returned instead.

Cc: [email protected]
Reviewed-by: Harry Wentland <[email protected]>
Acked-by: Hamza Mahfooz <[email protected]>
Signed-off-by: Alex Hung <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Add option to configure mapping policy for edp0 on dp1
Lewis Huang [Thu, 21 Mar 2024 08:14:43 +0000 (16:14 +0800)]
drm/amd/display: Add option to configure mapping policy for edp0 on dp1

[Why]
We want flexibility to choose how pwrseq instance is mapped to eDP panel

[How]
Add configuration option to choose the pwrseq mapping policy.
When enabled, allow fixed mapping between DIG inst to pwrseq inst.

Reviewed-by: Anthony Koo <[email protected]>
Acked-by: Hamza Mahfooz <[email protected]>
Signed-off-by: Lewis Huang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agoamd/amdgpu: improve VF recover time
Zhigang Luo [Wed, 20 Mar 2024 14:40:27 +0000 (10:40 -0400)]
amd/amdgpu: improve VF recover time

1. change AMDGPU_VF2PF_UPDATE_MAX_RETRY_LIMIT from 30 to 5.
2. set fatel error detected flag.

Signed-off-by: Zhigang Luo <[email protected]>
Reviewed-by: Lijo Lazar <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agoamd/amdkfd: sync all devices to wait all processes being evicted
Zhigang Luo [Mon, 18 Mar 2024 18:13:10 +0000 (14:13 -0400)]
amd/amdkfd: sync all devices to wait all processes being evicted

If there are more than one device doing reset in parallel, the first
device will call kfd_suspend_all_processes() to evict all processes
on all devices, this call takes time to finish. other device will
start reset and recover without waiting. if the process has not been
evicted before doing recover, it will be restored, then caused page
fault.

Signed-off-by: Zhigang Luo <[email protected]>
Reviewed-by: Felix Kuehling <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/pm: Categorize RAS messages on SMUv13.0.6
Lijo Lazar [Thu, 21 Mar 2024 14:10:41 +0000 (19:40 +0530)]
drm/amd/pm: Categorize RAS messages on SMUv13.0.6

Set RAS priority handling capability for SMUv13.0.6 SOCs and categorize
RAS priority messages allowed.

Signed-off-by: Lijo Lazar <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
Reviewed-by: Asad Kamal <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/pm: Add special handling for RAS messages
Lijo Lazar [Thu, 21 Mar 2024 13:49:48 +0000 (19:19 +0530)]
drm/amd/pm: Add special handling for RAS messages

When a RAS fatal error is detected, PMFW will only process priority
messages. Other messages won't be taken up for processing and therefore
won't get any response in such a state.

Add logic to filter out non-priority messages when RAS error is
detected. Also, don't poll response response status register before
sending priority messages. Use firmware capability flag to determine
whether to filter priority messages.

Signed-off-by: Lijo Lazar <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
Reviewed-by: Asad Kamal <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/pm: Add PMFW message and capability flags
Lijo Lazar [Thu, 21 Mar 2024 13:22:39 +0000 (18:52 +0530)]
drm/amd/pm: Add PMFW message and capability flags

Add flags to categorize messages and PMFW capabilities.

Signed-off-by: Lijo Lazar <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
Reviewed-by: Asad Kamal <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amdgpu: Set fatal errror detected flag earlier
Lijo Lazar [Mon, 25 Mar 2024 07:03:02 +0000 (12:33 +0530)]
drm/amdgpu: Set fatal errror detected flag earlier

In case of fatal errors, set FED status when interrupt is received. Set
the flag on other devices in the hive before RAS recovery work.

Signed-off-by: Lijo Lazar <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
Reviewed-by: Asad Kamal <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Add missing parameter desc in dc_commit_streams
Srinivasan Shanmugam [Mon, 1 Apr 2024 13:48:27 +0000 (19:18 +0530)]
drm/amd/display: Add missing parameter desc in dc_commit_streams

This commit removes the lines that describe the 'streams'
and 'stream_count' parameters and adds a line to describe the 'params'
parameter, which was missing from the original comment block.

Fixes the below with gcc W=1:
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:2138: warning: Function parameter or member 'params' not described in 'dc_commit_streams'
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:2138: warning: Excess function parameter 'streams' description in 'dc_commit_streams'
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:2138: warning: Excess function parameter 'stream_count' description in 'dc_commit_streams'

Fixes: e779f4587f61 ("drm/amd/display: Add handling for DC power mode")
Cc: Joshua Aberback <[email protected]>
Cc: Rodrigo Siqueira <[email protected]>
Cc: Roman Li <[email protected]>
Cc: Aurabindo Pillai <[email protected]>
Cc: Tom Chung <[email protected]>
Signed-off-by: Srinivasan Shanmugam <[email protected]>
Reviewed-by: Tom Chung <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/pm: Update uclk/sclk limit report format
Asad Kamal [Tue, 2 Apr 2024 10:16:39 +0000 (18:16 +0800)]
drm/amd/pm: Update uclk/sclk limit report format

Use OD (pp_od_clk_voltage) interface to report current limits,
default or those set by user, for SCLK and UCLK on aldebaran.

Signed-off-by: Asad Kamal <[email protected]>
Reviewed-by: Lijo Lazar <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/pm: Report uclk/sclk current limits
Asad Kamal [Tue, 2 Apr 2024 10:11:27 +0000 (18:11 +0800)]
drm/amd/pm: Report uclk/sclk current limits

Use OD (pp_od_clk_voltage) interface to report current limits,
default or those set by user, for SCLK and UCLK on smu_v_13_0_6

Signed-off-by: Asad Kamal <[email protected]>
Reviewed-by: Lijo Lazar <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amdgpu: clear set_q_mode_offs when VM changed
ZhenGuo Yin [Tue, 2 Apr 2024 03:41:05 +0000 (11:41 +0800)]
drm/amdgpu: clear set_q_mode_offs when VM changed

[Why]
set_q_mode_offs don't get cleared after GPU reset, nexting SET_Q_MODE
packet to init shadow memory will be skiped, hence there has a page fault.

[How]
VM flush is needed after GPU reset, clear set_q_mode_offs when
emitting VM flush.

Fixes: 8bc75586ea01 ("drm/amdgpu: workaround to avoid SET_Q_MODE packets v2")
Reviewed-by: Christian König <[email protected]>
Signed-off-by: ZhenGuo Yin <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amdgpu: retire UMC v12 mca_addr_to_pa
Tao Zhou [Tue, 2 Apr 2024 06:58:33 +0000 (14:58 +0800)]
drm/amdgpu: retire UMC v12 mca_addr_to_pa

RAS TA will handle it, the function is useless.

Signed-off-by: Tao Zhou <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/amdgpu: support MES command SET_HW_RESOURCE1 in sriov
chongli2 [Tue, 26 Mar 2024 05:24:21 +0000 (13:24 +0800)]
drm/amd/amdgpu: support MES command SET_HW_RESOURCE1 in sriov

support MES command SET_HW_RESOURCE1 in sriov

Signed-off-by: chongli2 <[email protected]>
Reviewed-by: Jingwen Chen <[email protected]>
Acked-by: Jingwen Chen <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amdgpu: update check condition for XGMI ACA UE
Tao Zhou [Mon, 1 Apr 2024 07:46:16 +0000 (15:46 +0800)]
drm/amdgpu: update check condition for XGMI ACA UE

Check more possible ext error codes.

Signed-off-by: Tao Zhou <[email protected]>
Reviewed-by: Yang Wang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/pm: update XGMI RAS UE criteria for sum v13.0.6
Tao Zhou [Fri, 29 Mar 2024 10:23:40 +0000 (18:23 +0800)]
drm/amd/pm: update XGMI RAS UE criteria for sum v13.0.6

Add more possible ext error code.

v2: still use ext error code instead of UC bit.

Signed-off-by: Tao Zhou <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amdgpu: Fix VCN allocation in CPX partition
Lijo Lazar [Wed, 6 Mar 2024 11:35:07 +0000 (17:05 +0530)]
drm/amdgpu: Fix VCN allocation in CPX partition

VCN need not be shared in CPX mode always for all GFX 9.4.3 SOC SKUs. In
certain configs, VCN instance can be exclusively allocated to a
partition even under CPX mode.

Signed-off-by: Lijo Lazar <[email protected]>
Reviewed-by: James Zhu <[email protected]>
Reviewed-by: Asad Kamal <[email protected]>
Acked-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amdgpu/pm: Check AMDGPU_RUNPM_BAMACO when setting baco state
Ma Jun [Mon, 25 Mar 2024 05:44:37 +0000 (13:44 +0800)]
drm/amdgpu/pm: Check AMDGPU_RUNPM_BAMACO when setting baco state

Check AMDGPU_RUNPM_BAMACO intead of amdgpu_runtime_pm
when setting baco state.

Signed-off-by: Ma Jun <[email protected]>
Reviewed-by: Lijo Lazar <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amdgpu: Add support for BAMACO mode checking
Ma Jun [Mon, 25 Mar 2024 03:56:41 +0000 (11:56 +0800)]
drm/amdgpu: Add support for BAMACO mode checking

Optimize the code to add support for BAMACO mode checking

Signed-off-by: Ma Jun <[email protected]>
Reviewed-by: Lijo Lazar <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/pm: centralize all pp_dpm_xxx attribute nodes update cb
Yang Wang [Mon, 1 Apr 2024 00:30:58 +0000 (08:30 +0800)]
drm/amd/pm: centralize all pp_dpm_xxx attribute nodes update cb

centralize all pp_dpm_xxx attr nodes into
pp_dpm_clk_default_attr_update() function.

Signed-off-by: Yang Wang <[email protected]>
Reviewed-by: Kenneth Feng <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amdgpu: Bypass asd if display hw is not available
Hawking Zhang [Sun, 31 Mar 2024 04:59:17 +0000 (12:59 +0800)]
drm/amdgpu: Bypass asd if display hw is not available

ASD is not needed by headless GPU.

Signed-off-by: Hawking Zhang <[email protected]>
Reviewed-by: Kenneth Feng <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amdgpu/pm: Add support for MACO flag checking
Ma Jun [Wed, 27 Mar 2024 09:26:08 +0000 (17:26 +0800)]
drm/amdgpu/pm: Add support for MACO flag checking

Add support for MACO flag checking.
MACO mode only works if BACO is supported.

Signed-off-by: Ma Jun <[email protected]>
Reviewed-by: Lijo Lazar <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amdgpu/pm: Change the member function name in pp_hwmgr_func and pptable_funcs
Ma Jun [Mon, 25 Mar 2024 02:17:52 +0000 (10:17 +0800)]
drm/amdgpu/pm: Change the member function name in pp_hwmgr_func and pptable_funcs

Use a unified and more explicit name get_bamaco_support
to replace is_baco_support and get_asic_baco_capability

Signed-off-by: Ma Jun <[email protected]>
Suggested-by: Lijo Lazar <[email protected]>
Reviewed-by: Lijo Lazar <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amdgpu: Add a new runtime mode definition
Ma Jun [Mon, 25 Mar 2024 01:37:09 +0000 (09:37 +0800)]
drm/amdgpu: Add a new runtime mode definition

Add a new runtime pm mode AMDGPU_RUNPM_BAMACO
and related macro definition

Signed-off-by: Ma Jun <[email protected]>
Reviewed-by: Lijo Lazar <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/pm: fix the high voltage issue after unload
Kenneth Feng [Thu, 28 Mar 2024 03:00:50 +0000 (11:00 +0800)]
drm/amd/pm: fix the high voltage issue after unload

fix the high voltage issue after unload on smu 13.0.10

Signed-off-by: Kenneth Feng <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Enable FGCG for DCN351
Rodrigo Siqueira [Mon, 25 Mar 2024 19:52:04 +0000 (13:52 -0600)]
drm/amd/display: Enable FGCG for DCN351

Signed-off-by: Rodrigo Siqueira <[email protected]>
Acked-by: Roman Li <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Add color logs for dcn20
Rodrigo Siqueira [Fri, 22 Mar 2024 23:44:26 +0000 (17:44 -0600)]
drm/amd/display: Add color logs for dcn20

Signed-off-by: Rodrigo Siqueira <[email protected]>
Acked-by: Roman Li <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Includes adjustments
Rodrigo Siqueira [Fri, 22 Mar 2024 23:02:54 +0000 (17:02 -0600)]
drm/amd/display: Includes adjustments

This commit clean up some of the includes used by DCN.

Signed-off-by: Rodrigo Siqueira <[email protected]>
Acked-by: Roman Li <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Add code comments clock and encode code
Rodrigo Siqueira [Fri, 22 Mar 2024 22:53:14 +0000 (16:53 -0600)]
drm/amd/display: Add code comments clock and encode code

This commit adds some comments to make easier to understand the clock
update for DCN 201, the encode function, and other minor comments.

Signed-off-by: Rodrigo Siqueira <[email protected]>
Acked-by: Roman Li <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Add WBSCL ram coefficient for writeback
Rodrigo Siqueira [Fri, 22 Mar 2024 22:49:55 +0000 (16:49 -0600)]
drm/amd/display: Add WBSCL ram coefficient for writeback

Signed-off-by: Rodrigo Siqueira <[email protected]>
Acked-by: Roman Li <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
11 months agodrm/amd/display: Fix MPCC DTN logging
Eric Bernstein [Wed, 28 Nov 2018 16:17:53 +0000 (11:17 -0500)]
drm/amd/display: Fix MPCC DTN logging

[Why]
DTN only logs 'pipe_count' instances of MPCC.
However in some cases there are different number of
MPCC than DPP (pipe_count).

[How]
Add mpcc_count parameter to resource_pool and set it
during pool construction and use it for DTN logging of
MPCC state.

Signed-off-by: Eric Bernstein <[email protected]>
Reviewed-by: Rodrigo Siqueira <[email protected]>
Acked-by: Roman Li <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
This page took 0.105301 seconds and 4 git commands to generate.