aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
Commit message (Collapse)AuthorAgeFilesLines
* drm/amdgpu/discovery: fix fw based ip discoveryAlex Deucher2025-08-061-33/+39
| | | | | | | | | | | | | | We only need the fw based discovery table for sysfs. No need to parse it. Additionally parsing some of the board specific tables may result in incorrect data on some boards. just load the binary and don't parse it on those boards. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4441 Fixes: 80a0e8282933 ("drm/amdgpu/discovery: optionally use fw based ip discovery") Reviewed-by: Mario Limonciello (AMD) <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit 62eedd150fa11aefc2d377fc746633fdb1baeb55) Cc: [email protected]
* amdgpu/amdgpu_discovery: increase timeout limit for IFWI initXaver Hugl2025-08-061-2/+2
| | | | | | | | | | | With a timeout of only 1 second, my rx 5700XT fails to initialize, so this increases the timeout to 2s. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3697 Signed-off-by: Xaver Hugl <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit 9ed3d7bdf2dcdf1a1196630fab89a124526e9cc2) Cc: [email protected]
* drm/amd: Adjust output for discovery error handlingMario Limonciello2025-06-241-15/+13
| | | | | | | | | | | | | | | | | | | | | commit 017fbb6690c2 ("drm/amdgpu/discovery: check ip_discovery fw file available") added support for reading an amdgpu IP discovery bin file for some specific products. If it's not found then it will fallback to hardcoded values. However if it's not found there is also a lot of noise about missing files and errors. Adjust the error handling to decrease most messages to DEBUG and to show users less about missing files. Reviewed-by: Lijo Lazar <[email protected]> Reported-by: Marcus Seyfarth <[email protected]> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4312 Tested-by: Marcus Seyfarth <[email protected]> Fixes: 017fbb6690c2 ("drm/amdgpu/discovery: check ip_discovery fw file available") Acked-by: Alex Deucher <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mario Limonciello <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Add more checks to discovery fetchLijo Lazar2025-06-031-3/+13
| | | | | | | | Add more checks for valid vram size and log error, if any. Signed-off-by: Lijo Lazar <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/ip_discovery: add missing ip_discovery fwFlora Cui2025-04-071-0/+2
| | | | | | Signed-off-by: Flora Cui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/discovery: optionally use fw based ip discoveryAlex Deucher2025-03-211-8/+32
| | | | | | | | | On chips without native IP discovery support, use the fw binary if available, otherwise we can continue without it. Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Flora Cui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/discovery: use specific ip_discovery.bin for legacy asicsFlora Cui2025-03-211-1/+27
| | | | | | | | vega10/vega12/vega20/raven/raven2/picasso/arcturus/aldebaran Signed-off-by: Flora Cui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/discovery: check ip_discovery fw file availableFlora Cui2025-03-211-15/+16
| | | | | | Signed-off-by: Flora Cui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Use wafl version for xgmiLijo Lazar2025-03-181-4/+9
| | | | | | | | | XGMI and WAFL share the same versions. Use WAFL version if XGMI version is not present in discovery. Signed-off-by: Lijo Lazar <[email protected]> Reviewed-by: Asad Kamal <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Remove unsupported xgmi versionsLijo Lazar2025-03-141-3/+0
| | | | | | | | | | XGMI v4.8.0 is not used in any SOCs. Remove the associated functions. Also, ensure get_xgmi_info callback pointer is not NULL before calling the function. Signed-off-by: Lijo Lazar <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amd/amdgpu: add support for IP version 11.5.2Ying Li2025-02-131-0/+3
| | | | | | | | This initializes drm/amd/amdgpu version 11.5.2 Signed-off-by: YING LI <[email protected]> Reviewed-by: Mario Limonciello <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add discovery support for DCN IP version 3.6.0Tim Huang2025-02-131-0/+1
| | | | | | | | Add discovery entry for DCN IP version 3.6.0. Signed-off-by: Tim Huang <[email protected]> Reviewed-by: Yifan Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Add support for smuio 13.0.11Mangesh Gadre2025-02-131-0/+1
| | | | | | | | | | Add new IP version support Signed-off-by: Mangesh Gadre <[email protected]> Signed-off-by: Shiwu Zhang <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Add support for nbio 7.9.1Mangesh Gadre2025-02-131-0/+1
| | | | | | | | | | Add new IP version support Signed-off-by: Mangesh Gadre <[email protected]> Signed-off-by: Shiwu Zhang <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Add support for smu 13.0.12Mangesh Gadre2025-02-131-0/+1
| | | | | | | | | | Add new IP version support Signed-off-by: Mangesh Gadre <[email protected]> Signed-off-by: Shiwu Zhang <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Use version to figure out harvest infoLijo Lazar2025-02-131-11/+16
| | | | | | | | | | IP tables with version <=2 may use harvest bit. For version 3 and above, harvest bit is not applicable, instead uses harvest table. Fix the logic accordingly. Signed-off-by: Lijo Lazar <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Pass IP instance/hwid as parametersLijo Lazar2025-02-131-14/+28
| | | | | | | | Use IP instance number and hwid as function args for validation checks. Signed-off-by: Lijo Lazar <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: read harvest info from harvest table for gfx950Le Ma2025-02-131-1/+2
| | | | | | | | Harvest table is applied for gfx950. Signed-off-by: Le Ma <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add support for PSP IP version 14.0.5Tim Huang2025-02-131-0/+1
| | | | | | | | This initializes PSP IP version 14.0.5. Signed-off-by: Tim Huang <[email protected]> Reviewed-by: Yifan Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add support for SMU IP version 14.0.5Tim Huang2025-02-131-0/+1
| | | | | | | | This initializes SMU IP version 14.0.5. Signed-off-by: Tim Huang <[email protected]> Reviewed-by: Yifan Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add support for NBIO IP version 7.11.2Tim Huang2025-02-131-0/+1
| | | | | | | | This initializes NBIO IP version 7.11.2. Signed-off-by: Tim Huang <[email protected]> Reviewed-by: Yifan Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add support for SDMA IP version 6.1.3Tim Huang2025-02-131-0/+1
| | | | | | | | This initializes SDMA IP version 6.1.3. Signed-off-by: Tim Huang <[email protected]> Reviewed-by: Yifan Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add support for GC IP version 11.5.3Tim Huang2025-02-131-0/+6
| | | | | | | | This initializes GC IP version 11.5.3. Signed-off-by: Tim Huang <[email protected]> Reviewed-by: Yifan Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Enable VCN_5_0_1 IP blockSonny Jiang2024-12-101-1/+3
| | | | | | | | Add VCN_5_0_1 IP block to kernel boot Signed-off-by: Sonny Jiang <[email protected]> Acked-by: Leo Liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: enable JPEG5_0_1 ip blockSathishkumar S2024-12-101-0/+4
| | | | | | | | enable JPEG5_0_1 ip block Signed-off-by: Sathishkumar S <[email protected]> Reviewed-by: Sonny Jiang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add psp 13_0_12 version supportLe Ma2024-12-101-0/+1
| | | | | | | | Add support for new psp 13_0_12 version Signed-off-by: Le Ma <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add initial support for sdma444Le Ma2024-12-101-0/+1
| | | | | | | | add sdma444 basic support Signed-off-by: Le Ma <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add initial support for gfx950Le Ma2024-12-101-0/+5
| | | | | | | | add gfx950 basic support Signed-off-by: Le Ma <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: move per inst variables to amdgpu_vcn_instBoyuan Zhang2024-12-101-2/+2
| | | | | | | | | | | | | Move all per instance variables from amdgpu_vcn to amdgpu_vcn_inst. Move adev->vcn.fw[i] from amdgpu_vcn to amdgpu_vcn_inst. Move adev->vcn.vcn_config[i] from amdgpu_vcn to amdgpu_vcn_inst. Move adev->vcn.vcn_codec_disable_mask[i] from amdgpu_vcn to amdgpu_vcn_inst. Signed-off-by: Boyuan Zhang <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Fix the memory allocation issue in amdgpu_discovery_get_nps_info()Li Huafei2024-11-041-3/+5
| | | | | | | | | | | | | | | | | | | | | Fix two issues with memory allocation in amdgpu_discovery_get_nps_info() for mem_ranges: - Add a check for allocation failure to avoid dereferencing a null pointer. - As suggested by Christophe, use kvcalloc() for memory allocation, which checks for multiplication overflow. Additionally, assign the output parameters nps_type and range_cnt after the kvcalloc() call to prevent modifying the output parameters in case of an error return. Fixes: b194d21b9bcc ("drm/amdgpu: Use NPS ranges from discovery table") Suggested-by: Christophe JAILLET <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Signed-off-by: Li Huafei <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/discovery: add ISP discovery entries for old APUsAlex Deucher2024-10-221-0/+2
| | | | | | | | | | | | Raven1/2 and Picasso have ISP 2.0.0, however their ISP blocks are not in the IP discovery table yet. This commit fixes this issue by adding new ISP entries for Raven and Picasso in the IP discovery table. Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Zhu Lingshan <[email protected]> Acked-by: Alex Deucher <[email protected]>
* drm/amdgpu: Add option to refresh NPS dataLijo Lazar2024-10-011-15/+53
| | | | | | | | | | In certain use cases, NPS data needs to be refreshed again from discovery table. Add API parameter to refresh NPS data from discovery table. Signed-off-by: Lijo Lazar <[email protected]> Reviewed-by: Rajneesh Bhardwaj <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: support for gc_info table v1.3Likun Gao2024-08-231-0/+11
| | | | | | | | Add gc_info table v1.3 for IP discovery. Signed-off-by: Likun Gao <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: fix eGPU hotplug regressionAlex Deucher2024-08-211-1/+1
| | | | | | | | | | | | | | | | The driver needs to wait for the on board firmware to finish its initialization before probing the card. Commit 959056982a9b ("drm/amdgpu: Fix discovery initialization failure during pci rescan") switched from using msleep() to using usleep_range() which seems to have caused init failures on some navi1x boards. Switch back to msleep(). Fixes: 959056982a9b ("drm/amdgpu: Fix discovery initialization failure during pci rescan") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3559 Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3500 Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: Ma Jun <[email protected]>
* drm/amdgpu: Fix atomics on GFX12David Belanger2024-07-231-0/+5
| | | | | | | | | If PCIe supports atomics, configure register to prevent DF from breaking atomics in separate load/store operations. Signed-off-by: David Belanger <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: remove exp hw support check for gfx12Alex Deucher2024-07-101-2/+0
| | | | | | | Enable it by default. Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add SMU IP v14.0.4 discovery supportTim Huang2024-07-021-0/+1
| | | | | | | | | This patch is to add SMU 14.0.4 support Signed-off-by: Tim Huang <[email protected]> Reviewed-by: Yifan Zhang <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add PSP IP v14.0.4 discovery supportTim Huang2024-07-021-0/+1
| | | | | | | | | This patch is to add PSP 14.0.4 support. Signed-off-by: Tim Huang <[email protected]> Reviewed-by: Yifan Zhang <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add VPE IP v6.1.3 discovery supportTim Huang2024-07-021-0/+1
| | | | | | | | | This patch is to add VPE 6.1.3 support. Signed-off-by: Tim Huang <[email protected]> Reviewed-by: Yifan Zhang <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add NBIO IP v7.11.3 discovery supportTim Huang2024-07-021-0/+1
| | | | | | | | | This patch is to add NBIO 7.11.3 support. Signed-off-by: Tim Huang <[email protected]> Reviewed-by: Yifan Zhang <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add SDMA IP v6.1.2 discovery supportTim Huang2024-07-021-0/+1
| | | | | | | | | This patch is to add SDMA 6.1.2 support. Signed-off-by: Tim Huang <[email protected]> Reviewed-by: Yifan Zhang <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add GC IP v11.5.2 to GC 11.5.0 familyTim Huang2024-07-021-0/+6
| | | | | | | | | | This patch is to add GC 11.5.2 to GC 11.5.0 family. Signed-off-by: Tim Huang <[email protected]> Reviewed-by: Yifan Zhang <[email protected]> Reviewed-by: Veerabadhran Gopalakrishnan <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amd/amdgpu: Add ISP4.1.0 and ISP4.1.1 modulesPratap Nirujogi2024-06-271-1/+3
| | | | | | | | Add independent IP centric modules for ISP4.1.0 and ISP4.1.1 hw blocks. Reviewed-by: Mario Limonciello <[email protected]> Signed-off-by: Pratap Nirujogi <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: fix Kconfig for ISP v2Alex Deucher2024-06-271-0/+6
| | | | | | | | | | Add new config option and set proper dependencies for ISP. v2: add missed guards, drop separate Kconfig Reviewed-by: Pratap Nirujogi <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: Pratap Nirujogi <[email protected]>
* drm/amd/amdgpu: Enable ISP in amdgpu_discoveryPratap Nirujogi2024-06-271-0/+22
| | | | | | | | Enable ISP for ISP V4.1.0 and V4.1.1 in amdgpu_discovery. Reviewed-by: Mario Limonciello <[email protected]> Signed-off-by: Pratap Nirujogi <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amd/amdgpu: Add ISP support to amdgpu_discoveryPratap Nirujogi2024-06-271-0/+1
| | | | | | | | | | | ISP hw block is supported in some of the AMD GPU versions, add support to discover ISP IP in amdgpu_discovery. v2: squash in documentation update (Alex) Reviewed-by: Mario Limonciello <[email protected]> Signed-off-by: Pratap Nirujogi <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* Revert "drm/amd/amdgpu: add module parameter for jpeg"Kenneth Feng2024-06-271-2/+0
| | | | | | | | | | This reverts commit d3620eeae82cccf8316e6754f8ddb52473e2e5ea. Revert this due to a final solution: commit ed3165d660d8 ("drm/amdgpu/jpeg5: reprogram doorbell setting after power up for each playback") Signed-off-by: Kenneth Feng <[email protected]> Reviewed-by: Sonny Jiang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Do not wait for MP0_C2PMSG_33 IFWI init in SRIOVVictor Lu2024-06-191-12/+14
| | | | | | | | | SRIOV does not need to wait for IFWI init, and MP0_C2PMSG_33 is blocked for VF access. Signed-off-by: Victor Lu <[email protected]> Reviewed-by: Vignesh Chander <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgu: fix Unintentional integer overflow for mall sizeJesse Zhang2024-06-051-1/+1
| | | | | | | | | Potentially overflowing expression mall_size_per_umc * adev->gmc.num_umc with type unsigned int (32 bits, unsigned) is evaluated using 32-bit arithmetic,and then used in a context that expects an expression of type u64 (64 bits, unsigned). Signed-off-by: Jesse Zhang <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: drop MES 10.1 support v3Alex Deucher2024-05-291-20/+0
| | | | | | | | | | | | It was an enablement vehicle for MES 11 and was never productized. Remove it. v2: drop additional checks in the GFX10 code. v3: drop mes_api_def.h Acked-by: Christian König <[email protected]> Reviewed-by: Harish Kasiviswanathan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>