Convert more of amdgpu to drm_*() macros
cover Convert more of amdgpu to drm_*() macros
From: Mario Limonciello <[email protected]>
Several commits have gone in various parts of the driver already to convert from DRM_*() and pr_*() to drm_*() macros, but a lot of places are also still missing.
This updates a lot more of the driver. Patch 13 is the biggest one, others are small tidbits and changes to some of of specific callers to make sure that they have struct amdgpu_device* or similar available to be able to use drm_*() macros.
Mario Limonciello (14):
drm/amd: Use ACPI macros for amdgpu_acpi
drm/amd: Avoid showing an error about memory allocation in
amdgpu_acpi_enumerate_xcc()
drm/amd: Convert dev_err_once() messages to drm_err_once() drm/amd: Adjust amdgpu_vpe messages from dev_*() to drm_*() drm/amd: Adjust atombios parser messages from DRM_*() to drm_*() drm/amd: Drop prototype for amdgpu_ucode_print_imu_hdr() drm/amd: Add a 'struct amdgpu_device' argument to all header printers drm/amd: Use drm_*() macros for all amdgpu_ucode prints drm/amd: Adjust amdgpu connector messages from DRM_*() to drm_*() drm/amd: Adjust amdgpu_atombios messages from DRM_*() to drm_*() drm/amd: Add struct amdgpu_device into amdgpu_gfx_parse_disable_cu() drm/amd: Add struct amdgpu_device argument to
amdgpu_reset_create_reset_domain()
drm/amd: Convert DRM_*() and dev_*() macros to drm_*() drm/amd: Drop 'amdgpu' from pr_fmt()
drivers/gpu/drm/amd/amdgpu/aldebaran.c | 10 +- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 12 - drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 30 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 22 +- .../drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c | 2 +- .../drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10_3.c | 2 +- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 28 +- drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c | 22 +- drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 44 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 16 +- .../gpu/drm/amd/amdgpu/amdgpu_connectors.c | 22 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c | 14 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 16 +- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 8 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 14 +- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 8 +- .../gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 284 ++++++----- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 102 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 81 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 4 +- .../gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c | 10 +- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 21 +- .../gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 14 +- .../drm/amd/amdgpu/amdgpu_fw_attestation.c | 11 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 8 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 10 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 78 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 58 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_hdp.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 12 +- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 8 +- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 24 +- drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 8 +- drivers/gpu/drm/amd/amdgpu/amdgpu_mca.c | 8 +- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 56 +- drivers/gpu/drm/amd/amdgpu/amdgpu_mmhub.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 26 +- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 2 +- .../gpu/drm/amd/amdgpu/amdgpu_preempt_mgr.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 236 ++++----- drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.c | 18 +- drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c | 20 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 96 ++-- .../gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 48 +- drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c | 7 +- drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 16 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c | 34 +- drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.c | 12 +- drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 8 +- .../gpu/drm/amd/amdgpu/amdgpu_securedisplay.c | 8 +- drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.c | 6 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 58 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 480 ++++++++++-------- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 22 +- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 20 +- drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c | 12 +- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 62 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 42 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 16 +- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 36 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 22 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 12 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c | 18 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 57 ++- drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c | 8 +- drivers/gpu/drm/amd/amdgpu/atom.c | 62 ++- drivers/gpu/drm/amd/amdgpu/atombios_crtc.c | 16 +- drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 18 +- .../gpu/drm/amd/amdgpu/atombios_encoders.c | 30 +- drivers/gpu/drm/amd/amdgpu/atombios_i2c.c | 5 +- drivers/gpu/drm/amd/amdgpu/cik.c | 14 +- drivers/gpu/drm/amd/amdgpu/cik_ih.c | 4 +- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 6 +- drivers/gpu/drm/amd/amdgpu/cz_ih.c | 4 +- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 36 +- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 40 +- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 40 +- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 38 +- drivers/gpu/drm/amd/amdgpu/df_v3_6.c | 6 +- drivers/gpu/drm/amd/amdgpu/df_v4_3.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 106 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 140 ++--- drivers/gpu/drm/amd/amdgpu/gfx_v11_0_3.c | 8 +- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 96 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 32 +- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 34 +- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 56 +- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 92 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v9_4.c | 26 +- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c | 60 +-- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 56 +- drivers/gpu/drm/amd/amdgpu/gfxhub_v11_5_0.c | 14 +- drivers/gpu/drm/amd/amdgpu/gfxhub_v12_0.c | 14 +- drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c | 14 +- drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c | 14 +- drivers/gpu/drm/amd/amdgpu/gfxhub_v3_0.c | 14 +- drivers/gpu/drm/amd/amdgpu/gfxhub_v3_0_3.c | 14 +- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 16 +- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 16 +- drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 14 +- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 34 +- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 28 +- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 40 +- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 48 +- drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 4 +- drivers/gpu/drm/amd/amdgpu/ih_v6_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/ih_v6_1.c | 4 +- drivers/gpu/drm/amd/amdgpu/ih_v7_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/imu_v11_0.c | 5 +- drivers/gpu/drm/amd/amdgpu/imu_v12_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c | 14 +- drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c | 6 +- drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c | 6 +- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c | 6 +- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 10 +- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c | 2 +- drivers/gpu/drm/amd/amdgpu/lsdma_v6_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/lsdma_v7_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/mes_userqueue.c | 2 +- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 48 +- drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 52 +- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c | 6 +- drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c | 4 +- drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c | 14 +- drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c | 14 +- drivers/gpu/drm/amd/amdgpu/mmhub_v3_0.c | 14 +- drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_1.c | 14 +- drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_2.c | 14 +- drivers/gpu/drm/amd/amdgpu/mmhub_v3_3.c | 14 +- drivers/gpu/drm/amd/amdgpu/mmhub_v4_1_0.c | 14 +- drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c | 6 +- drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 8 +- drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c | 6 +- drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 4 +- drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c | 6 +- drivers/gpu/drm/amd/amdgpu/nbio_v7_9.c | 6 +- drivers/gpu/drm/amd/amdgpu/nv.c | 12 +- drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 24 +- drivers/gpu/drm/amd/amdgpu/psp_v11_0_8.c | 6 +- drivers/gpu/drm/amd/amdgpu/psp_v12_0.c | 8 +- drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 26 +- drivers/gpu/drm/amd/amdgpu/psp_v13_0_4.c | 6 +- drivers/gpu/drm/amd/amdgpu/psp_v14_0.c | 24 +- drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 10 +- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 4 +- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 24 +- drivers/gpu/drm/amd/amdgpu/sdma_v4_4.c | 4 +- drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 16 +- drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 18 +- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 20 +- drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 26 +- drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 26 +- drivers/gpu/drm/amd/amdgpu/si.c | 18 +- drivers/gpu/drm/amd/amdgpu/si_dma.c | 2 +- drivers/gpu/drm/amd/amdgpu/si_ih.c | 4 +- drivers/gpu/drm/amd/amdgpu/sienna_cichlid.c | 8 +- drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c | 22 +- drivers/gpu/drm/amd/amdgpu/smu_v13_0_10.c | 8 +- drivers/gpu/drm/amd/amdgpu/soc15.c | 16 +- drivers/gpu/drm/amd/amdgpu/soc21.c | 18 +- drivers/gpu/drm/amd/amdgpu/soc24.c | 10 +- drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 4 +- drivers/gpu/drm/amd/amdgpu/umc_v12_0.c | 10 +- drivers/gpu/drm/amd/amdgpu/umc_v6_7.c | 18 +- drivers/gpu/drm/amd/amdgpu/umc_v8_10.c | 4 +- drivers/gpu/drm/amd/amdgpu/umsch_mm_v4_0.c | 8 +- drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c | 12 +- drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 8 +- drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 10 +- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 24 +- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 20 +- drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 10 +- drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 16 +- drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 14 +- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 14 +- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 10 +- drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 10 +- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 20 +- drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 34 +- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 18 +- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c | 16 +- drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 16 +- drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c | 10 +- drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 4 +- drivers/gpu/drm/amd/amdgpu/vega20_ih.c | 4 +- drivers/gpu/drm/amd/amdgpu/vi.c | 6 +- drivers/gpu/drm/amd/amdgpu/vpe_v6_1.c | 4 +- drivers/gpu/drm/amd/amdkfd/kfd_debug.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 60 +-- .../drm/amd/amdkfd/kfd_device_queue_manager.c | 18 +- drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c | 12 +- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 10 +- drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 10 +- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 8 +- drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c | 56 +- .../gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c | 26 +- drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 86 ++-- drivers/gpu/drm/amd/pm/legacy-dpm/si_smc.c | 2 +- .../gpu/drm/amd/pm/powerplay/amd_powerplay.c | 4 +- .../drm/amd/pm/powerplay/hwmgr/common_baco.c | 2 +- .../gpu/drm/amd/pm/powerplay/inc/pp_debug.h | 2 +- .../drm/amd/pm/powerplay/smumgr/ci_smumgr.c | 2 +- .../amd/pm/powerplay/smumgr/smu10_smumgr.c | 4 +- .../drm/amd/pm/powerplay/smumgr/smu7_smumgr.c | 2 +- .../drm/amd/pm/powerplay/smumgr/smu9_smumgr.c | 2 +- .../amd/pm/powerplay/smumgr/vega20_smumgr.c | 4 +- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 106 ++-- .../gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c | 8 +- .../gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 8 +- .../amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 4 +- .../gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 18 +- .../gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 6 +- .../gpu/drm/amd/pm/swsmu/smu12/smu_v12_0.c | 2 +- .../drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 14 +- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 37 +- .../drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 70 +-- .../drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c | 2 +- .../drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c | 4 +- .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 16 +- .../drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 84 +-- .../drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c | 4 +- .../gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c | 47 +- .../drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c | 10 +- .../drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c | 54 +- drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 6 +- 242 files changed, 2886 insertions(+), 2767 deletions(-)
Signature · 1 line
2.43.0
PATCH 1/14 drm/amd: Use ACPI macros for amdgpu_acpi
From: Mario Limonciello <[email protected]>
Messages emitted from amdgpu_acpi are not device specific nor DRM specific, but rather operate on ACPI handles. Adjust the messages to use ACPI macros instead.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +12 -10
@@ -256,7 +256,7 @@ static int amdgpu_atif_verify_interface(struct amdgpu_atif *atif) size = *(u16 *) info->buffer.pointer;if (size <12 ) { -DRM_INFO ("ATIF buffer is too small: %zu\n" , size); +acpi_handle_info (atif->handle,"ATIF buffer is too small: %zu\n" , size); err = -EINVAL ; goto out; }
@@ -265,7 +265,7 @@ static int amdgpu_atif_verify_interface(struct amdgpu_atif *atif)memcpy (&output, info->buffer.pointer, size);/* TODO: check version? */ -DRM_DEBUG_DRIVER ("ATIF version %u\n" , output.version); +acpi_handle_debug (atif->handle,"ATIF version %u\n" , output.version);amdgpu_atif_parse_notification (&atif->notifications, output.notification_mask);amdgpu_atif_parse_functions (&atif->functions, output.function_bits);
@@ -616,7 +616,7 @@ static int amdgpu_atcs_verify_interface(struct amdgpu_atcs *atcs) size = *(u16 *) info->buffer.pointer;if (size <8 ) { -DRM_INFO ("ATCS buffer is too small: %zu\n" , size); +acpi_handle_info (atcs->handle,"ATCS buffer is too small: %zu\n" , size); err = -EINVAL ; goto out; }
@@ -625,7 +625,7 @@ static int amdgpu_atcs_verify_interface(struct amdgpu_atcs *atcs)memcpy (&output, info->buffer.pointer, size);/* TODO: check version? */ -DRM_DEBUG_DRIVER ("ATCS version %u\n" , output.version); +acpi_handle_debug (atcs->handle,"ATCS version %u\n" , output.version);amdgpu_atcs_parse_functions (&atcs->functions, output.function_bits);
@@ -741,7 +741,7 @@ int amdgpu_acpi_pcie_performance_request(struct amdgpu_device *adev, size = *(u16 *) info->buffer.pointer;if (size <3 ) { -DRM_INFO ("ATCS buffer is too small: %zu\n" , size); +acpi_handle_info (atcs->handle,"ATCS buffer is too small: %zu\n" , size);kfree (info);return -EINVAL ; }
@@ -800,7 +800,7 @@ int amdgpu_acpi_power_shift_control(struct amdgpu_device *adev, info =amdgpu_atcs_call (atcs,ATCS_FUNCTION_POWER_SHIFT_CONTROL , ¶ms);if (!info) { -DRM_ERROR ("ATCS PSC update failed\n" ); +acpi_handle_err (atcs->handle,"ATCS PSC update failed\n" );return -EIO ; }
@@ -1429,8 +1429,9 @@ void amdgpu_acpi_detect(void)if (atif->functions.system_params) { ret =amdgpu_atif_get_notification_params (atif);if (ret) { -DRM_DEBUG_DRIVER ("Call to GET_SYSTEM_PARAMS failed: %d\n" , - ret); +acpi_handle_debug (atif->handle, +"GET_SYSTEM_PARAMS evaluation failed: %d\n" , + ret);/* Disable notification */ atif->notification_cfg.enabled = false; }
@@ -1439,8 +1440,9 @@ void amdgpu_acpi_detect(void)if (atif->functions.query_backlight_transfer_characteristics) { ret =amdgpu_atif_query_backlight_caps (atif);if (ret) { -DRM_DEBUG_DRIVER ("Call to QUERY_BACKLIGHT_TRANSFER_CHARACTERISTICS failed: %d\n" , - ret); +acpi_handle_debug (atif->handle, +"QUERY_BACKLIGHT_TRANSFER_CHARACTERISTICS evaluation failed: %d\n" , + ret); atif->backlight_caps.caps_valid = false; } }else {
Signature · 1 line
2.43.0
PATCH 2/14 drm/amd: Avoid showing an error about memory allocation in amdgpu_acpi_enumerate_xcc()
In reply to Mario LimoncielloFrom: Mario Limonciello <[email protected]>
checkpatch.pl complains about unnecessary error messages for failing to allocate memory. These aren't needed when the return code is -ENOMEM. Drop such a message from amdgpu_acpi_enumerate_xcc().
--- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +1 -3
@@ -1116,10 +1116,8 @@ static int amdgpu_acpi_enumerate_xcc(void) xcc_info =kzalloc (sizeof (struct amdgpu_acpi_xcc_info ),GFP_KERNEL ); -if (!xcc_info) { -DRM_ERROR ("Failed to allocate memory for xcc info\n" ); +if (!xcc_info)return -ENOMEM ; - }INIT_LIST_HEAD (&xcc_info->list); xcc_info->handle =acpi_device_handle (acpi_dev);
Signature · 1 line
2.43.0
PATCH 4/14 drm/amd: Adjust amdgpu_vpe messages from dev_*() to drm_*()
In reply to Mario LimoncielloFrom: Mario Limonciello <[email protected]>
Messages emitted in amdgpu_vpe are currently device scope, but as they are drm driver messages they should be drm scope. Adjust accordingly.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c +10 -8
@@ -263,7 +263,7 @@ int amdgpu_vpe_init_microcode(struct amdgpu_vpe *vpe)return 0 ; out: -dev_err (adev->dev,"fail to initialize vpe microcode\n" ); +drm_err (adev_to_drm (adev),"fail to initialize vpe microcode\n" );release_firmware (adev->vpe.fw); adev->vpe.fw =NULL ;return ret;
@@ -317,7 +317,8 @@ static int vpe_early_init(struct amdgpu_ip_block *ip_block)vpe_set_ring_funcs (adev);vpe_set_regs (vpe); -dev_info (adev->dev,"VPE: collaborate mode %s" , vpe->collaborate_mode ?"true" :"false" ); +drm_info (adev_to_drm (adev),"VPE: collaborate mode %s" , + vpe->collaborate_mode ?"true" :"false" );return 0 ; }
@@ -347,7 +348,7 @@ static int vpe_common_init(struct amdgpu_vpe *vpe) &adev->vpe.cmdbuf_gpu_addr, (void **)&adev->vpe.cmdbuf_cpu_addr);if (r) { -dev_err (adev->dev,"VPE: failed to allocate cmdbuf bo %d\n" , r); +drm_err (adev_to_drm (adev),"VPE: failed to allocate cmdbuf bo %d\n" , r);return r; }
@@ -635,7 +636,7 @@ static int vpe_ring_preempt_ib(struct amdgpu_ring *ring)if (i >= adev->usec_timeout) { r = -EINVAL ; -dev_err (adev->dev,"ring %d failed to be preempted\n" , ring->idx); +drm_err (adev_to_drm (adev),"ring %d failed to be preempted\n" , ring->idx); }/* deassert IB preemption */
@@ -660,7 +661,7 @@ static int vpe_set_powergating_state(struct amdgpu_ip_block *ip_block,struct amdgpu_vpe *vpe = &adev->vpe;if (!adev->pm.dpm_enabled) -dev_err (adev->dev,"Without PM, cannot support powergating\n" ); +drm_err (adev_to_drm (adev),"Without PM, cannot support powergating\n" );dev_dbg (adev->dev,"%s: %s!\n" , __func__, (state ==AMD_PG_STATE_GATE ) ?"GATE" :"UNGATE" );
@@ -756,7 +757,7 @@ static int vpe_ring_test_ring(struct amdgpu_ring *ring) ret =amdgpu_device_wb_get (adev, &index);if (ret) { -dev_err (adev->dev,"(%d) failed to allocate wb slot\n" , ret); +drm_err (adev_to_drm (adev),"(%d) failed to allocate wb slot\n" , ret);return ret; }
@@ -765,7 +766,8 @@ static int vpe_ring_test_ring(struct amdgpu_ring *ring) ret =amdgpu_ring_alloc (ring,4 );if (ret) { -dev_err (adev->dev,"amdgpu: dma failed to lock ring %d (%d).\n" , ring->idx, ret); +drm_err (adev_to_drm (adev), +"amdgpu: dma failed to lock ring %d (%d).\n" , ring->idx, ret); goto out; }
@@ -800,7 +802,7 @@ static int vpe_ring_test_ib(struct amdgpu_ring *ring, long timeout) ret =amdgpu_device_wb_get (adev, &index);if (ret) { -dev_err (adev->dev,"(%d) failed to allocate wb slot\n" , ret); +drm_err (adev_to_drm (adev),"(%d) failed to allocate wb slot\n" , ret);return ret; }
Signature · 1 line
2.43.0
PATCH 3/14 drm/amd: Convert dev_err_once() messages to drm_err_once()
In reply to Mario LimoncielloFrom: Mario Limonciello <[email protected]>
The errors for power consumption in amdgpu_acpi_is_s0ix_active() are under device scope. As they're drm errors, adjust to drm scope.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +2 -2
@@ -1518,14 +1518,14 @@ bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev)* in that case. */ if (!(acpi_gbl_FADT.flags &ACPI_FADT_LOW_POWER_S0 )) { -dev_err_once (adev->dev, +drm_err_once (adev_to_drm (adev),"Power consumption will be higher as BIOS has not been configured for suspend-to-idle.\n" "To use suspend-to-idle change the sleep mode in BIOS setup.\n" );return false; }#if !IS_ENABLED (CONFIG_AMD_PMC ) -dev_err_once (adev->dev, +drm_err_once (adev_to_drm (adev),"Power consumption will be higher as the kernel has not been compiled with CONFIG_AMD_PMC.\n" );return false;#else
Signature · 1 line
2.43.0
PATCH 9/14 drm/amd: Adjust amdgpu connector messages from DRM_*() to drm_*()
In reply to Mario LimoncielloFrom: Mario Limonciello <[email protected]>
Messages emitted from amdgpu connector are currently with legacy DRM macros. These don't show which device they are using. To make messages clearer in multi-GPU systems adjust to drm_*() macros.
--- .../gpu/drm/amd/amdgpu/amdgpu_connectors.c | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c +11 -11
@@ -882,7 +882,7 @@ amdgpu_connector_vga_detect(struct drm_connector *connector, bool force)amdgpu_connector_get_edid (connector);if (!amdgpu_connector->edid) { -DRM_ERROR ("%s: probed a monitor but no|invalid EDID\n" , +drm_err (connector->dev,"%s: probed a monitor but no|invalid EDID\n" , connector->name); ret = connector_status_connected; }else {
@@ -1063,7 +1063,7 @@ amdgpu_connector_dvi_detect(struct drm_connector *connector, bool force)amdgpu_connector_get_edid (connector);if (!amdgpu_connector->edid) { -DRM_ERROR ("%s: probed a monitor but no|invalid EDID\n" , +drm_err (adev_to_drm (adev),"%s: probed a monitor but no|invalid EDID\n" , connector->name); ret = connector_status_connected; broken_edid = true;/* defer use_digital to later */
@@ -1638,7 +1638,7 @@ amdgpu_connector_add(struct amdgpu_device *adev,if (router->ddc_valid || router->cd_valid) { amdgpu_connector->router_bus =amdgpu_i2c_lookup (adev, &router->i2c_info);if (!amdgpu_connector->router_bus) -DRM_ERROR ("Failed to assign router i2c bus! Check dmesg for i2c errors.\n" ); +drm_err (adev_to_drm (adev),"Failed to assign router i2c bus! Check dmesg for i2c errors.\n" ); }if (is_dp_bridge) {
@@ -1652,7 +1652,7 @@ amdgpu_connector_add(struct amdgpu_device *adev, has_aux = true; ddc = &amdgpu_connector->ddc_bus->adapter; }else { -DRM_ERROR ("DP: Failed to assign ddc bus! Check dmesg for i2c errors.\n" ); +drm_err (adev_to_drm (adev),"DP: Failed to assign ddc bus! Check dmesg for i2c errors.\n" ); } }switch (connector_type) {
@@ -1746,7 +1746,7 @@ amdgpu_connector_add(struct amdgpu_device *adev,if (i2c_bus->valid) { amdgpu_connector->ddc_bus =amdgpu_i2c_lookup (adev, i2c_bus);if (!amdgpu_connector->ddc_bus) -DRM_ERROR ("VGA: Failed to assign ddc bus! Check dmesg for i2c errors.\n" ); +drm_err (adev_to_drm (adev),"VGA: Failed to assign ddc bus! Check dmesg for i2c errors.\n" );else ddc = &amdgpu_connector->ddc_bus->adapter; }
@@ -1771,7 +1771,7 @@ amdgpu_connector_add(struct amdgpu_device *adev,if (i2c_bus->valid) { amdgpu_connector->ddc_bus =amdgpu_i2c_lookup (adev, i2c_bus);if (!amdgpu_connector->ddc_bus) -DRM_ERROR ("DVIA: Failed to assign ddc bus! Check dmesg for i2c errors.\n" ); +drm_err (adev_to_drm (adev),"DVIA: Failed to assign ddc bus! Check dmesg for i2c errors.\n" );else ddc = &amdgpu_connector->ddc_bus->adapter; }
@@ -1801,7 +1801,7 @@ amdgpu_connector_add(struct amdgpu_device *adev,if (i2c_bus->valid) { amdgpu_connector->ddc_bus =amdgpu_i2c_lookup (adev, i2c_bus);if (!amdgpu_connector->ddc_bus) -DRM_ERROR ("DVI: Failed to assign ddc bus! Check dmesg for i2c errors.\n" ); +drm_err (adev_to_drm (adev),"DVI: Failed to assign ddc bus! Check dmesg for i2c errors.\n" );else ddc = &amdgpu_connector->ddc_bus->adapter; }
@@ -1857,7 +1857,7 @@ amdgpu_connector_add(struct amdgpu_device *adev,if (i2c_bus->valid) { amdgpu_connector->ddc_bus =amdgpu_i2c_lookup (adev, i2c_bus);if (!amdgpu_connector->ddc_bus) -DRM_ERROR ("HDMI: Failed to assign ddc bus! Check dmesg for i2c errors.\n" ); +drm_err (adev_to_drm (adev),"HDMI: Failed to assign ddc bus! Check dmesg for i2c errors.\n" );else ddc = &amdgpu_connector->ddc_bus->adapter; }
@@ -1908,7 +1908,7 @@ amdgpu_connector_add(struct amdgpu_device *adev, has_aux = true; ddc = &amdgpu_connector->ddc_bus->adapter; }else { -DRM_ERROR ("DP: Failed to assign ddc bus! Check dmesg for i2c errors.\n" ); +drm_err (adev_to_drm (adev),"DP: Failed to assign ddc bus! Check dmesg for i2c errors.\n" ); } } drm_connector_init_with_ddc(dev, &amdgpu_connector->base,
@@ -1956,7 +1956,7 @@ amdgpu_connector_add(struct amdgpu_device *adev, has_aux = true; ddc = &amdgpu_connector->ddc_bus->adapter; }else { -DRM_ERROR ("DP: Failed to assign ddc bus! Check dmesg for i2c errors.\n" ); +drm_err (adev_to_drm (adev),"DP: Failed to assign ddc bus! Check dmesg for i2c errors.\n" ); } } drm_connector_init_with_ddc(dev, &amdgpu_connector->base,
@@ -1979,7 +1979,7 @@ amdgpu_connector_add(struct amdgpu_device *adev,if (i2c_bus->valid) { amdgpu_connector->ddc_bus =amdgpu_i2c_lookup (adev, i2c_bus);if (!amdgpu_connector->ddc_bus) -DRM_ERROR ("LVDS: Failed to assign ddc bus! Check dmesg for i2c errors.\n" ); +drm_err (adev_to_drm (adev),"LVDS: Failed to assign ddc bus! Check dmesg for i2c errors.\n" );else ddc = &amdgpu_connector->ddc_bus->adapter; }
Signature · 1 line
2.43.0
PATCH 10/14 drm/amd: Adjust amdgpu_atombios messages from DRM_*() to drm_*()
In reply to Mario LimoncielloFrom: Mario Limonciello <[email protected]>
Messages emitted from amdgpu_atombios are currently with legacy DRM macros. These don't show which device they are using. To make messages clearer in multi-GPU systems adjust to drm_*() macros.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 28 +++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c +15 -13
@@ -370,7 +370,7 @@ bool amdgpu_atombios_get_connector_info_from_object_table(struct amdgpu_device *continue ;if (con_obj_id >=ARRAY_SIZE (object_connector_convert)) { -DRM_ERROR ("invalid con_obj_id %d for device tag 0x%04x\n" , +drm_err (adev_to_drm (adev),"invalid con_obj_id %d for device tag 0x%04x\n" , con_obj_id,le16_to_cpu (path->usDeviceTag));continue ; }
@@ -875,7 +875,7 @@ static void amdgpu_atombios_get_igp_ss_overrides(struct amdgpu_device *adev, }break ;default : -DRM_ERROR ("Unsupported IGP table: %d %d\n" , frev, crev); +drm_err (adev_to_drm (adev),"Unsupported IGP table: %d %d\n" , frev, crev);break ; }if (percentage)
@@ -995,7 +995,8 @@ bool amdgpu_atombios_get_asic_ss_info(struct amdgpu_device *adev, }break ;default : -DRM_ERROR ("Unsupported ASIC_InternalSS_Info table: %d %d\n" , frev, crev); +drm_err (adev_to_drm (adev), +"Unsupported ASIC_InternalSS_Info table: %d %d\n" , frev, crev);break ; }
@@ -1254,7 +1255,7 @@ int amdgpu_atombios_get_max_vddc(struct amdgpu_device *adev, u8 voltage_type, *voltage =le16_to_cpu (args.v3.usVoltageLevel);break ;default : -DRM_ERROR ("Unknown table version %d, %d\n" , frev, crev); +drm_err (adev_to_drm (adev),"Unknown table version %d, %d\n" , frev, crev);return -EINVAL ; }
@@ -1329,12 +1330,12 @@ int amdgpu_atombios_get_svi2_info(struct amdgpu_device *adev, }break ;default : -DRM_ERROR ("unknown voltage object table\n" ); +drm_err (adev_to_drm (adev),"unknown voltage object table\n" );return -EINVAL ; }break ;default : -DRM_ERROR ("unknown voltage object table\n" ); +drm_err (adev_to_drm (adev),"unknown voltage object table\n" );return -EINVAL ; }
@@ -1365,12 +1366,12 @@ amdgpu_atombios_is_voltage_gpio(struct amdgpu_device *adev,return true;break ;default : -DRM_ERROR ("unknown voltage object table\n" ); +drm_err (adev_to_drm (adev),"unknown voltage object table\n" );return false; }break ;default : -DRM_ERROR ("unknown voltage object table\n" ); +drm_err (adev_to_drm (adev),"unknown voltage object table\n" );return false; }
@@ -1423,12 +1424,12 @@ int amdgpu_atombios_get_voltage_table(struct amdgpu_device *adev, }break ;default : -DRM_ERROR ("unknown voltage object table\n" ); +drm_err (adev_to_drm (adev),"unknown voltage object table\n" );return -EINVAL ; }break ;default : -DRM_ERROR ("unknown voltage object table\n" ); +drm_err (adev_to_drm (adev),"unknown voltage object table\n" );return -EINVAL ; } }
@@ -1467,7 +1468,7 @@ int amdgpu_atombios_init_mc_reg_table(struct amdgpu_device *adev, (adev->mode_info.atom_context->bios + data_offset);switch (frev) {case 1 : -DRM_ERROR ("old table version %d, %d\n" , frev, crev); +drm_err (adev_to_drm (adev),"old table version %d, %d\n" , frev, crev);return -EINVAL ;case 2 :switch (crev) {
@@ -1529,12 +1530,13 @@ int amdgpu_atombios_init_mc_reg_table(struct amdgpu_device *adev,return -EINVAL ;break ;default : -DRM_ERROR ("Unknown table version %d, %d\n" , frev, crev); +drm_err (adev_to_drm (adev), +"Unknown table version %d, %d\n" , frev, crev);return -EINVAL ; }break ;default : -DRM_ERROR ("Unknown table version %d, %d\n" , frev, crev); +drm_err (adev_to_drm (adev),"Unknown table version %d, %d\n" , frev, crev);return -EINVAL ; }return 0 ;
Signature · 1 line
2.43.0
PATCH 8/14 drm/amd: Use drm_*() macros for all amdgpu_ucode prints
In reply to Mario LimoncielloFrom: Mario Limonciello <[email protected]>
Messages emitted from amdgpu_ucode are currently with legacy DRM macros. These don't show which device they are using. To make messages clearer in multi-GPU systems adjust to drm_*() macros.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 456 ++++++++++++---------- 1 file changed, 245 insertions(+), 211 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +245 -211
@@ -33,17 +33,25 @@static void amdgpu_ucode_print_common_hdr (struct amdgpu_device *adev,const struct common_firmware_header *hdr) { -DRM_DEBUG ("size_bytes: %u\n" ,le32_to_cpu (hdr->size_bytes)); -DRM_DEBUG ("header_size_bytes: %u\n" ,le32_to_cpu (hdr->header_size_bytes)); -DRM_DEBUG ("header_version_major: %u\n" ,le16_to_cpu (hdr->header_version_major)); -DRM_DEBUG ("header_version_minor: %u\n" ,le16_to_cpu (hdr->header_version_minor)); -DRM_DEBUG ("ip_version_major: %u\n" ,le16_to_cpu (hdr->ip_version_major)); -DRM_DEBUG ("ip_version_minor: %u\n" ,le16_to_cpu (hdr->ip_version_minor)); -DRM_DEBUG ("ucode_version: 0x%08x\n" ,le32_to_cpu (hdr->ucode_version)); -DRM_DEBUG ("ucode_size_bytes: %u\n" ,le32_to_cpu (hdr->ucode_size_bytes)); -DRM_DEBUG ("ucode_array_offset_bytes: %u\n" , -le32_to_cpu (hdr->ucode_array_offset_bytes)); -DRM_DEBUG ("crc32: 0x%08x\n" ,le32_to_cpu (hdr->crc32)); +drm_dbg (adev_to_drm (adev), +"size_bytes: %u\n" ,le32_to_cpu (hdr->size_bytes)); +drm_dbg (adev_to_drm (adev), +"header_size_bytes: %u\n" ,le32_to_cpu (hdr->header_size_bytes)); +drm_dbg (adev_to_drm (adev), +"header_version_major: %u\n" ,le16_to_cpu (hdr->header_version_major)); +drm_dbg (adev_to_drm (adev), +"header_version_minor: %u\n" ,le16_to_cpu (hdr->header_version_minor)); +drm_dbg (adev_to_drm (adev), +"ip_version_major: %u\n" ,le16_to_cpu (hdr->ip_version_major)); +drm_dbg (adev_to_drm (adev), +"ip_version_minor: %u\n" ,le16_to_cpu (hdr->ip_version_minor)); +drm_dbg (adev_to_drm (adev), +"ucode_version: 0x%08x\n" ,le32_to_cpu (hdr->ucode_version)); +drm_dbg (adev_to_drm (adev), +"ucode_size_bytes: %u\n" ,le32_to_cpu (hdr->ucode_size_bytes)); +drm_dbg (adev_to_drm (adev), +"ucode_array_offset_bytes: %u\n" ,le32_to_cpu (hdr->ucode_array_offset_bytes)); +drm_dbg (adev_to_drm (adev),"crc32: 0x%08x\n" ,le32_to_cpu (hdr->crc32)); } void amdgpu_ucode_print_mc_hdr(struct amdgpu_device *adev,
@@ -52,19 +60,20 @@ void amdgpu_ucode_print_mc_hdr(struct amdgpu_device *adev,uint16_t version_major =le16_to_cpu (hdr->header_version_major);uint16_t version_minor =le16_to_cpu (hdr->header_version_minor); -DRM_DEBUG ("MC\n" ); -amdgpu_ucode_print_common_hdr (hdr); +drm_dbg (adev_to_drm (adev),"MC\n" ); +amdgpu_ucode_print_common_hdr (adev, hdr);if (version_major ==1 ) {const struct mc_firmware_header_v1_0 *mc_hdr = container_of(hdr, struct mc_firmware_header_v1_0, header); -DRM_DEBUG ("io_debug_size_bytes: %u\n" , +drm_dbg (adev_to_drm (adev),"io_debug_size_bytes: %u\n" ,le32_to_cpu (mc_hdr->io_debug_size_bytes)); -DRM_DEBUG ("io_debug_array_offset_bytes: %u\n" , +drm_dbg (adev_to_drm (adev),"io_debug_array_offset_bytes: %u\n" ,le32_to_cpu (mc_hdr->io_debug_array_offset_bytes)); }else { -DRM_ERROR ("Unknown MC ucode version: %u.%u\n" , version_major, version_minor); +drm_err (adev_to_drm (adev), +"Unknown MC ucode version: %u.%u\n" , version_major, version_minor); } }
@@ -77,30 +86,41 @@ void amdgpu_ucode_print_smc_hdr(struct amdgpu_device *adev,const struct smc_firmware_header_v2_0 *v2_0_hdr;const struct smc_firmware_header_v2_1 *v2_1_hdr; -DRM_DEBUG ("SMC\n" ); -amdgpu_ucode_print_common_hdr (hdr); +drm_dbg (adev_to_drm (adev),"SMC\n" ); +amdgpu_ucode_print_common_hdr (adev, hdr);if (version_major ==1 ) { v1_0_hdr = container_of(hdr, struct smc_firmware_header_v1_0, header); -DRM_DEBUG ("ucode_start_addr: %u\n" ,le32_to_cpu (v1_0_hdr->ucode_start_addr)); +drm_dbg (adev_to_drm (adev), +"ucode_start_addr: %u\n" , +le32_to_cpu (v1_0_hdr->ucode_start_addr)); }else if (version_major ==2 ) {switch (version_minor) {case 0 : v2_0_hdr = container_of(hdr, struct smc_firmware_header_v2_0, v1_0.header); -DRM_DEBUG ("ppt_offset_bytes: %u\n" ,le32_to_cpu (v2_0_hdr->ppt_offset_bytes)); -DRM_DEBUG ("ppt_size_bytes: %u\n" ,le32_to_cpu (v2_0_hdr->ppt_size_bytes)); +drm_dbg (adev_to_drm (adev), +"ppt_offset_bytes: %u\n" , +le32_to_cpu (v2_0_hdr->ppt_offset_bytes)); +drm_dbg (adev_to_drm (adev), +"ppt_size_bytes: %u\n" , +le32_to_cpu (v2_0_hdr->ppt_size_bytes));break ;case 1 : v2_1_hdr = container_of(hdr, struct smc_firmware_header_v2_1, v1_0.header); -DRM_DEBUG ("pptable_count: %u\n" ,le32_to_cpu (v2_1_hdr->pptable_count)); -DRM_DEBUG ("pptable_entry_offset: %u\n" ,le32_to_cpu (v2_1_hdr->pptable_entry_offset)); +drm_dbg (adev_to_drm (adev), +"pptable_count: %u\n" , +le32_to_cpu (v2_1_hdr->pptable_count)); +drm_dbg (adev_to_drm (adev), +"pptable_entry_offset: %u\n" , +le32_to_cpu (v2_1_hdr->pptable_entry_offset));break ;default :break ; } }else { -DRM_ERROR ("Unknown SMC ucode version: %u.%u\n" , version_major, version_minor); +drm_err (adev_to_drm (adev), +"Unknown SMC ucode version: %u.%u\n" , version_major, version_minor); } }
@@ -110,25 +130,26 @@ void amdgpu_ucode_print_gfx_hdr(struct amdgpu_device *adev,uint16_t version_major =le16_to_cpu (hdr->header_version_major);uint16_t version_minor =le16_to_cpu (hdr->header_version_minor); -DRM_DEBUG ("GFX\n" ); -amdgpu_ucode_print_common_hdr (hdr); +drm_dbg (adev_to_drm (adev),"GFX\n" ); +amdgpu_ucode_print_common_hdr (adev, hdr);if (version_major ==1 ) {const struct gfx_firmware_header_v1_0 *gfx_hdr = container_of(hdr, struct gfx_firmware_header_v1_0, header); -DRM_DEBUG ("ucode_feature_version: %u\n" , +drm_dbg (adev_to_drm (adev),"ucode_feature_version: %u\n" ,le32_to_cpu (gfx_hdr->ucode_feature_version)); -DRM_DEBUG ("jt_offset: %u\n" ,le32_to_cpu (gfx_hdr->jt_offset)); -DRM_DEBUG ("jt_size: %u\n" ,le32_to_cpu (gfx_hdr->jt_size)); +drm_dbg (adev_to_drm (adev),"jt_offset: %u\n" ,le32_to_cpu (gfx_hdr->jt_offset)); +drm_dbg (adev_to_drm (adev),"jt_size: %u\n" ,le32_to_cpu (gfx_hdr->jt_size)); }else if (version_major ==2 ) {const struct gfx_firmware_header_v2_0 *gfx_hdr = container_of(hdr, struct gfx_firmware_header_v2_0, header); -DRM_DEBUG ("ucode_feature_version: %u\n" , -le32_to_cpu (gfx_hdr->ucode_feature_version)); +drm_dbg (adev_to_drm (adev), +"ucode_feature_version: %u\n" ,le32_to_cpu (gfx_hdr->ucode_feature_version)); }else { -DRM_ERROR ("Unknown GFX ucode version: %u.%u\n" , version_major, version_minor); +drm_err (adev_to_drm (adev), +"Unknown GFX ucode version: %u.%u\n" , version_major, version_minor); } }
@@ -138,22 +159,22 @@ void amdgpu_ucode_print_rlc_hdr(struct amdgpu_device *adev,uint16_t version_major =le16_to_cpu (hdr->header_version_major);uint16_t version_minor =le16_to_cpu (hdr->header_version_minor); -DRM_DEBUG ("RLC\n" ); -amdgpu_ucode_print_common_hdr (hdr); +drm_dbg (adev_to_drm (adev),"RLC\n" ); +amdgpu_ucode_print_common_hdr (adev, hdr);if (version_major ==1 ) {const struct rlc_firmware_header_v1_0 *rlc_hdr = container_of(hdr, struct rlc_firmware_header_v1_0, header); -DRM_DEBUG ("ucode_feature_version: %u\n" , +drm_dbg (adev_to_drm (adev),"ucode_feature_version: %u\n" ,le32_to_cpu (rlc_hdr->ucode_feature_version)); -DRM_DEBUG ("save_and_restore_offset: %u\n" , +drm_dbg (adev_to_drm (adev),"save_and_restore_offset: %u\n" ,le32_to_cpu (rlc_hdr->save_and_restore_offset)); -DRM_DEBUG ("clear_state_descriptor_offset: %u\n" , +drm_dbg (adev_to_drm (adev),"clear_state_descriptor_offset: %u\n" ,le32_to_cpu (rlc_hdr->clear_state_descriptor_offset)); -DRM_DEBUG ("avail_scratch_ram_locations: %u\n" , +drm_dbg (adev_to_drm (adev),"avail_scratch_ram_locations: %u\n" ,le32_to_cpu (rlc_hdr->avail_scratch_ram_locations)); -DRM_DEBUG ("master_pkt_description_offset: %u\n" , +drm_dbg (adev_to_drm (adev),"master_pkt_description_offset: %u\n" ,le32_to_cpu (rlc_hdr->master_pkt_description_offset)); }else if (version_major ==2 ) { const struct rlc_firmware_header_v2_0 *rlc_hdr =
@@ -170,129 +191,133 @@ void amdgpu_ucode_print_rlc_hdr(struct amdgpu_device *adev,switch (version_minor) {case 0 :/* rlc_hdr v2_0 */ -DRM_DEBUG ("ucode_feature_version: %u\n" , +drm_dbg (adev_to_drm (adev),"ucode_feature_version: %u\n" ,le32_to_cpu (rlc_hdr->ucode_feature_version)); -DRM_DEBUG ("jt_offset: %u\n" ,le32_to_cpu (rlc_hdr->jt_offset)); -DRM_DEBUG ("jt_size: %u\n" ,le32_to_cpu (rlc_hdr->jt_size)); -DRM_DEBUG ("save_and_restore_offset: %u\n" , -le32_to_cpu (rlc_hdr->save_and_restore_offset)); -DRM_DEBUG ("clear_state_descriptor_offset: %u\n" , -le32_to_cpu (rlc_hdr->clear_state_descriptor_offset)); -DRM_DEBUG ("avail_scratch_ram_locations: %u\n" , -le32_to_cpu (rlc_hdr->avail_scratch_ram_locations)); -DRM_DEBUG ("reg_restore_list_size: %u\n" , -le32_to_cpu (rlc_hdr->reg_restore_list_size)); -DRM_DEBUG ("reg_list_format_start: %u\n" , -le32_to_cpu (rlc_hdr->reg_list_format_start)); -DRM_DEBUG ("reg_list_format_separate_start: %u\n" , -le32_to_cpu (rlc_hdr->reg_list_format_separate_start)); -DRM_DEBUG ("starting_offsets_start: %u\n" , -le32_to_cpu (rlc_hdr->starting_offsets_start)); -DRM_DEBUG ("reg_list_format_size_bytes: %u\n" , -le32_to_cpu (rlc_hdr->reg_list_format_size_bytes)); -DRM_DEBUG ("reg_list_format_array_offset_bytes: %u\n" , -le32_to_cpu (rlc_hdr->reg_list_format_array_offset_bytes)); -DRM_DEBUG ("reg_list_size_bytes: %u\n" , -le32_to_cpu (rlc_hdr->reg_list_size_bytes)); -DRM_DEBUG ("reg_list_array_offset_bytes: %u\n" , -le32_to_cpu (rlc_hdr->reg_list_array_offset_bytes)); -DRM_DEBUG ("reg_list_format_separate_size_bytes: %u\n" , -le32_to_cpu (rlc_hdr->reg_list_format_separate_size_bytes)); -DRM_DEBUG ("reg_list_format_separate_array_offset_bytes: %u\n" , -le32_to_cpu (rlc_hdr->reg_list_format_separate_array_offset_bytes)); -DRM_DEBUG ("reg_list_separate_size_bytes: %u\n" , -le32_to_cpu (rlc_hdr->reg_list_separate_size_bytes)); -DRM_DEBUG ("reg_list_separate_array_offset_bytes: %u\n" , -le32_to_cpu (rlc_hdr->reg_list_separate_array_offset_bytes)); +drm_dbg (adev_to_drm (adev), +"jt_offset: %u\n" ,le32_to_cpu (rlc_hdr->jt_offset)); +drm_dbg (adev_to_drm (adev), +"jt_size: %u\n" ,le32_to_cpu (rlc_hdr->jt_size)); +drm_dbg (adev_to_drm (adev), +"save_and_restore_offset: %u\n" , +le32_to_cpu (rlc_hdr->save_and_restore_offset)); +drm_dbg (adev_to_drm (adev),"clear_state_descriptor_offset: %u\n" , +le32_to_cpu (rlc_hdr->clear_state_descriptor_offset)); +drm_dbg (adev_to_drm (adev),"avail_scratch_ram_locations: %u\n" , +le32_to_cpu (rlc_hdr->avail_scratch_ram_locations)); +drm_dbg (adev_to_drm (adev),"reg_restore_list_size: %u\n" , +le32_to_cpu (rlc_hdr->reg_restore_list_size)); +drm_dbg (adev_to_drm (adev),"reg_list_format_start: %u\n" , +le32_to_cpu (rlc_hdr->reg_list_format_start)); +drm_dbg (adev_to_drm (adev),"reg_list_format_separate_start: %u\n" , +le32_to_cpu (rlc_hdr->reg_list_format_separate_start)); +drm_dbg (adev_to_drm (adev),"starting_offsets_start: %u\n" , +le32_to_cpu (rlc_hdr->starting_offsets_start)); +drm_dbg (adev_to_drm (adev),"reg_list_format_size_bytes: %u\n" , +le32_to_cpu (rlc_hdr->reg_list_format_size_bytes)); +drm_dbg (adev_to_drm (adev),"reg_list_format_array_offset_bytes: %u\n" , +le32_to_cpu (rlc_hdr->reg_list_format_array_offset_bytes)); +drm_dbg (adev_to_drm (adev),"reg_list_size_bytes: %u\n" , +le32_to_cpu (rlc_hdr->reg_list_size_bytes)); +drm_dbg (adev_to_drm (adev),"reg_list_array_offset_bytes: %u\n" , +le32_to_cpu (rlc_hdr->reg_list_array_offset_bytes)); +drm_dbg (adev_to_drm (adev),"reg_list_format_separate_size_bytes: %u\n" , +le32_to_cpu (rlc_hdr->reg_list_format_separate_size_bytes)); +drm_dbg (adev_to_drm (adev),"reg_list_format_separate_array_offset_bytes: %u\n" , +le32_to_cpu (rlc_hdr->reg_list_format_separate_array_offset_bytes)); +drm_dbg (adev_to_drm (adev),"reg_list_separate_size_bytes: %u\n" , +le32_to_cpu (rlc_hdr->reg_list_separate_size_bytes)); +drm_dbg (adev_to_drm (adev),"reg_list_separate_array_offset_bytes: %u\n" , +le32_to_cpu (rlc_hdr->reg_list_separate_array_offset_bytes));break ;case 1 :/* rlc_hdr v2_1 */ -DRM_DEBUG ("reg_list_format_direct_reg_list_length: %u\n" , -le32_to_cpu (rlc_hdr_v2_1->reg_list_format_direct_reg_list_length)); -DRM_DEBUG ("save_restore_list_cntl_ucode_ver: %u\n" , -le32_to_cpu (rlc_hdr_v2_1->save_restore_list_cntl_ucode_ver)); -DRM_DEBUG ("save_restore_list_cntl_feature_ver: %u\n" , -le32_to_cpu (rlc_hdr_v2_1->save_restore_list_cntl_feature_ver)); -DRM_DEBUG ("save_restore_list_cntl_size_bytes %u\n" , -le32_to_cpu (rlc_hdr_v2_1->save_restore_list_cntl_size_bytes)); -DRM_DEBUG ("save_restore_list_cntl_offset_bytes: %u\n" , -le32_to_cpu (rlc_hdr_v2_1->save_restore_list_cntl_offset_bytes)); -DRM_DEBUG ("save_restore_list_gpm_ucode_ver: %u\n" , -le32_to_cpu (rlc_hdr_v2_1->save_restore_list_gpm_ucode_ver)); -DRM_DEBUG ("save_restore_list_gpm_feature_ver: %u\n" , -le32_to_cpu (rlc_hdr_v2_1->save_restore_list_gpm_feature_ver)); -DRM_DEBUG ("save_restore_list_gpm_size_bytes %u\n" , -le32_to_cpu (rlc_hdr_v2_1->save_restore_list_gpm_size_bytes)); -DRM_DEBUG ("save_restore_list_gpm_offset_bytes: %u\n" , -le32_to_cpu (rlc_hdr_v2_1->save_restore_list_gpm_offset_bytes)); -DRM_DEBUG ("save_restore_list_srm_ucode_ver: %u\n" , -le32_to_cpu (rlc_hdr_v2_1->save_restore_list_srm_ucode_ver)); -DRM_DEBUG ("save_restore_list_srm_feature_ver: %u\n" , -le32_to_cpu (rlc_hdr_v2_1->save_restore_list_srm_feature_ver)); -DRM_DEBUG ("save_restore_list_srm_size_bytes %u\n" , -le32_to_cpu (rlc_hdr_v2_1->save_restore_list_srm_size_bytes)); -DRM_DEBUG ("save_restore_list_srm_offset_bytes: %u\n" , -le32_to_cpu (rlc_hdr_v2_1->save_restore_list_srm_offset_bytes)); +drm_dbg (adev_to_drm (adev),"reg_list_format_direct_reg_list_length: %u\n" , +le32_to_cpu (rlc_hdr_v2_1->reg_list_format_direct_reg_list_length)); +drm_dbg (adev_to_drm (adev),"save_restore_list_cntl_ucode_ver: %u\n" , +le32_to_cpu (rlc_hdr_v2_1->save_restore_list_cntl_ucode_ver)); +drm_dbg (adev_to_drm (adev),"save_restore_list_cntl_feature_ver: %u\n" , +le32_to_cpu (rlc_hdr_v2_1->save_restore_list_cntl_feature_ver)); +drm_dbg (adev_to_drm (adev),"save_restore_list_cntl_size_bytes %u\n" , +le32_to_cpu (rlc_hdr_v2_1->save_restore_list_cntl_size_bytes)); +drm_dbg (adev_to_drm (adev),"save_restore_list_cntl_offset_bytes: %u\n" , +le32_to_cpu (rlc_hdr_v2_1->save_restore_list_cntl_offset_bytes)); +drm_dbg (adev_to_drm (adev),"save_restore_list_gpm_ucode_ver: %u\n" , +le32_to_cpu (rlc_hdr_v2_1->save_restore_list_gpm_ucode_ver)); +drm_dbg (adev_to_drm (adev),"save_restore_list_gpm_feature_ver: %u\n" , +le32_to_cpu (rlc_hdr_v2_1->save_restore_list_gpm_feature_ver)); +drm_dbg (adev_to_drm (adev),"save_restore_list_gpm_size_bytes %u\n" , +le32_to_cpu (rlc_hdr_v2_1->save_restore_list_gpm_size_bytes)); +drm_dbg (adev_to_drm (adev),"save_restore_list_gpm_offset_bytes: %u\n" , +le32_to_cpu (rlc_hdr_v2_1->save_restore_list_gpm_offset_bytes)); +drm_dbg (adev_to_drm (adev),"save_restore_list_srm_ucode_ver: %u\n" , +le32_to_cpu (rlc_hdr_v2_1->save_restore_list_srm_ucode_ver)); +drm_dbg (adev_to_drm (adev),"save_restore_list_srm_feature_ver: %u\n" , +le32_to_cpu (rlc_hdr_v2_1->save_restore_list_srm_feature_ver)); +drm_dbg (adev_to_drm (adev),"save_restore_list_srm_size_bytes %u\n" , +le32_to_cpu (rlc_hdr_v2_1->save_restore_list_srm_size_bytes)); +drm_dbg (adev_to_drm (adev),"save_restore_list_srm_offset_bytes: %u\n" , +le32_to_cpu (rlc_hdr_v2_1->save_restore_list_srm_offset_bytes));break ;case 2 :/* rlc_hdr v2_2 */ -DRM_DEBUG ("rlc_iram_ucode_size_bytes: %u\n" , -le32_to_cpu (rlc_hdr_v2_2->rlc_iram_ucode_size_bytes)); -DRM_DEBUG ("rlc_iram_ucode_offset_bytes: %u\n" , -le32_to_cpu (rlc_hdr_v2_2->rlc_iram_ucode_offset_bytes)); -DRM_DEBUG ("rlc_dram_ucode_size_bytes: %u\n" , -le32_to_cpu (rlc_hdr_v2_2->rlc_dram_ucode_size_bytes)); -DRM_DEBUG ("rlc_dram_ucode_offset_bytes: %u\n" , -le32_to_cpu (rlc_hdr_v2_2->rlc_dram_ucode_offset_bytes)); +drm_dbg (adev_to_drm (adev),"rlc_iram_ucode_size_bytes: %u\n" , +le32_to_cpu (rlc_hdr_v2_2->rlc_iram_ucode_size_bytes)); +drm_dbg (adev_to_drm (adev),"rlc_iram_ucode_offset_bytes: %u\n" , +le32_to_cpu (rlc_hdr_v2_2->rlc_iram_ucode_offset_bytes)); +drm_dbg (adev_to_drm (adev),"rlc_dram_ucode_size_bytes: %u\n" , +le32_to_cpu (rlc_hdr_v2_2->rlc_dram_ucode_size_bytes)); +drm_dbg (adev_to_drm (adev),"rlc_dram_ucode_offset_bytes: %u\n" , +le32_to_cpu (rlc_hdr_v2_2->rlc_dram_ucode_offset_bytes));break ;case 3 :/* rlc_hdr v2_3 */ -DRM_DEBUG ("rlcp_ucode_version: %u\n" , -le32_to_cpu (rlc_hdr_v2_3->rlcp_ucode_version)); -DRM_DEBUG ("rlcp_ucode_feature_version: %u\n" , -le32_to_cpu (rlc_hdr_v2_3->rlcp_ucode_feature_version)); -DRM_DEBUG ("rlcp_ucode_size_bytes: %u\n" , -le32_to_cpu (rlc_hdr_v2_3->rlcp_ucode_size_bytes)); -DRM_DEBUG ("rlcp_ucode_offset_bytes: %u\n" , -le32_to_cpu (rlc_hdr_v2_3->rlcp_ucode_offset_bytes)); -DRM_DEBUG ("rlcv_ucode_version: %u\n" , -le32_to_cpu (rlc_hdr_v2_3->rlcv_ucode_version)); -DRM_DEBUG ("rlcv_ucode_feature_version: %u\n" , -le32_to_cpu (rlc_hdr_v2_3->rlcv_ucode_feature_version)); -DRM_DEBUG ("rlcv_ucode_size_bytes: %u\n" , -le32_to_cpu (rlc_hdr_v2_3->rlcv_ucode_size_bytes)); -DRM_DEBUG ("rlcv_ucode_offset_bytes: %u\n" , -le32_to_cpu (rlc_hdr_v2_3->rlcv_ucode_offset_bytes)); +drm_dbg (adev_to_drm (adev),"rlcp_ucode_version: %u\n" , +le32_to_cpu (rlc_hdr_v2_3->rlcp_ucode_version)); +drm_dbg (adev_to_drm (adev),"rlcp_ucode_feature_version: %u\n" , +le32_to_cpu (rlc_hdr_v2_3->rlcp_ucode_feature_version)); +drm_dbg (adev_to_drm (adev),"rlcp_ucode_size_bytes: %u\n" , +le32_to_cpu (rlc_hdr_v2_3->rlcp_ucode_size_bytes)); +drm_dbg (adev_to_drm (adev),"rlcp_ucode_offset_bytes: %u\n" , +le32_to_cpu (rlc_hdr_v2_3->rlcp_ucode_offset_bytes)); +drm_dbg (adev_to_drm (adev),"rlcv_ucode_version: %u\n" , +le32_to_cpu (rlc_hdr_v2_3->rlcv_ucode_version)); +drm_dbg (adev_to_drm (adev),"rlcv_ucode_feature_version: %u\n" , +le32_to_cpu (rlc_hdr_v2_3->rlcv_ucode_feature_version)); +drm_dbg (adev_to_drm (adev),"rlcv_ucode_size_bytes: %u\n" , +le32_to_cpu (rlc_hdr_v2_3->rlcv_ucode_size_bytes)); +drm_dbg (adev_to_drm (adev),"rlcv_ucode_offset_bytes: %u\n" , +le32_to_cpu (rlc_hdr_v2_3->rlcv_ucode_offset_bytes));break ;case 4 :/* rlc_hdr v2_4 */ -DRM_DEBUG ("global_tap_delays_ucode_size_bytes :%u\n" , -le32_to_cpu (rlc_hdr_v2_4->global_tap_delays_ucode_size_bytes)); -DRM_DEBUG ("global_tap_delays_ucode_offset_bytes: %u\n" , -le32_to_cpu (rlc_hdr_v2_4->global_tap_delays_ucode_offset_bytes)); -DRM_DEBUG ("se0_tap_delays_ucode_size_bytes :%u\n" , -le32_to_cpu (rlc_hdr_v2_4->se0_tap_delays_ucode_size_bytes)); -DRM_DEBUG ("se0_tap_delays_ucode_offset_bytes: %u\n" , -le32_to_cpu (rlc_hdr_v2_4->se0_tap_delays_ucode_offset_bytes)); -DRM_DEBUG ("se1_tap_delays_ucode_size_bytes :%u\n" , -le32_to_cpu (rlc_hdr_v2_4->se1_tap_delays_ucode_size_bytes)); -DRM_DEBUG ("se1_tap_delays_ucode_offset_bytes: %u\n" , -le32_to_cpu (rlc_hdr_v2_4->se1_tap_delays_ucode_offset_bytes)); -DRM_DEBUG ("se2_tap_delays_ucode_size_bytes :%u\n" , -le32_to_cpu (rlc_hdr_v2_4->se2_tap_delays_ucode_size_bytes)); -DRM_DEBUG ("se2_tap_delays_ucode_offset_bytes: %u\n" , -le32_to_cpu (rlc_hdr_v2_4->se2_tap_delays_ucode_offset_bytes)); -DRM_DEBUG ("se3_tap_delays_ucode_size_bytes :%u\n" , -le32_to_cpu (rlc_hdr_v2_4->se3_tap_delays_ucode_size_bytes)); -DRM_DEBUG ("se3_tap_delays_ucode_offset_bytes: %u\n" , -le32_to_cpu (rlc_hdr_v2_4->se3_tap_delays_ucode_offset_bytes)); +drm_dbg (adev_to_drm (adev),"global_tap_delays_ucode_size_bytes :%u\n" , +le32_to_cpu (rlc_hdr_v2_4->global_tap_delays_ucode_size_bytes)); +drm_dbg (adev_to_drm (adev),"global_tap_delays_ucode_offset_bytes: %u\n" , +le32_to_cpu (rlc_hdr_v2_4->global_tap_delays_ucode_offset_bytes)); +drm_dbg (adev_to_drm (adev),"se0_tap_delays_ucode_size_bytes :%u\n" , +le32_to_cpu (rlc_hdr_v2_4->se0_tap_delays_ucode_size_bytes)); +drm_dbg (adev_to_drm (adev),"se0_tap_delays_ucode_offset_bytes: %u\n" , +le32_to_cpu (rlc_hdr_v2_4->se0_tap_delays_ucode_offset_bytes)); +drm_dbg (adev_to_drm (adev),"se1_tap_delays_ucode_size_bytes :%u\n" , +le32_to_cpu (rlc_hdr_v2_4->se1_tap_delays_ucode_size_bytes)); +drm_dbg (adev_to_drm (adev),"se1_tap_delays_ucode_offset_bytes: %u\n" , +le32_to_cpu (rlc_hdr_v2_4->se1_tap_delays_ucode_offset_bytes)); +drm_dbg (adev_to_drm (adev),"se2_tap_delays_ucode_size_bytes :%u\n" , +le32_to_cpu (rlc_hdr_v2_4->se2_tap_delays_ucode_size_bytes)); +drm_dbg (adev_to_drm (adev),"se2_tap_delays_ucode_offset_bytes: %u\n" , +le32_to_cpu (rlc_hdr_v2_4->se2_tap_delays_ucode_offset_bytes)); +drm_dbg (adev_to_drm (adev),"se3_tap_delays_ucode_size_bytes :%u\n" , +le32_to_cpu (rlc_hdr_v2_4->se3_tap_delays_ucode_size_bytes)); +drm_dbg (adev_to_drm (adev),"se3_tap_delays_ucode_offset_bytes: %u\n" , +le32_to_cpu (rlc_hdr_v2_4->se3_tap_delays_ucode_offset_bytes));break ;default : -DRM_ERROR ("Unknown RLC v2 ucode: v2.%u\n" , version_minor); +drm_err (adev_to_drm (adev),"Unknown RLC v2 ucode: v2.%u\n" , version_minor);break ; } }else { -DRM_ERROR ("Unknown RLC ucode version: %u.%u\n" , version_major, version_minor); +drm_err (adev_to_drm (adev), +"Unknown RLC ucode version: %u.%u\n" , version_major, version_minor); } }
@@ -302,43 +327,49 @@ void amdgpu_ucode_print_sdma_hdr(struct amdgpu_device *adev,uint16_t version_major =le16_to_cpu (hdr->header_version_major);uint16_t version_minor =le16_to_cpu (hdr->header_version_minor); -DRM_DEBUG ("SDMA\n" ); -amdgpu_ucode_print_common_hdr (hdr); +drm_dbg (adev_to_drm (adev),"SDMA\n" ); +amdgpu_ucode_print_common_hdr (adev, hdr);if (version_major ==1 ) {const struct sdma_firmware_header_v1_0 *sdma_hdr = container_of(hdr, struct sdma_firmware_header_v1_0, header); -DRM_DEBUG ("ucode_feature_version: %u\n" , +drm_dbg (adev_to_drm (adev),"ucode_feature_version: %u\n" ,le32_to_cpu (sdma_hdr->ucode_feature_version)); -DRM_DEBUG ("ucode_change_version: %u\n" , +drm_dbg (adev_to_drm (adev),"ucode_change_version: %u\n" ,le32_to_cpu (sdma_hdr->ucode_change_version)); -DRM_DEBUG ("jt_offset: %u\n" ,le32_to_cpu (sdma_hdr->jt_offset)); -DRM_DEBUG ("jt_size: %u\n" ,le32_to_cpu (sdma_hdr->jt_size)); +drm_dbg (adev_to_drm (adev),"jt_offset: %u\n" ,le32_to_cpu (sdma_hdr->jt_offset)); +drm_dbg (adev_to_drm (adev),"jt_size: %u\n" ,le32_to_cpu (sdma_hdr->jt_size));if (version_minor >=1 ) {const struct sdma_firmware_header_v1_1 *sdma_v1_1_hdr = container_of(sdma_hdr, struct sdma_firmware_header_v1_1, v1_0); -DRM_DEBUG ("digest_size: %u\n" ,le32_to_cpu (sdma_v1_1_hdr->digest_size)); +drm_dbg (adev_to_drm (adev), +"digest_size: %u\n" ,le32_to_cpu (sdma_v1_1_hdr->digest_size)); } }else if (version_major ==2 ) {const struct sdma_firmware_header_v2_0 *sdma_hdr = container_of(hdr, struct sdma_firmware_header_v2_0, header); -DRM_DEBUG ("ucode_feature_version: %u\n" , +drm_dbg (adev_to_drm (adev),"ucode_feature_version: %u\n" ,le32_to_cpu (sdma_hdr->ucode_feature_version)); -DRM_DEBUG ("ctx_jt_offset: %u\n" ,le32_to_cpu (sdma_hdr->ctx_jt_offset)); -DRM_DEBUG ("ctx_jt_size: %u\n" ,le32_to_cpu (sdma_hdr->ctx_jt_size)); -DRM_DEBUG ("ctl_ucode_offset: %u\n" ,le32_to_cpu (sdma_hdr->ctl_ucode_offset)); -DRM_DEBUG ("ctl_jt_offset: %u\n" ,le32_to_cpu (sdma_hdr->ctl_jt_offset)); -DRM_DEBUG ("ctl_jt_size: %u\n" ,le32_to_cpu (sdma_hdr->ctl_jt_size)); +drm_dbg (adev_to_drm (adev), +"ctx_jt_offset: %u\n" ,le32_to_cpu (sdma_hdr->ctx_jt_offset)); +drm_dbg (adev_to_drm (adev), +"ctx_jt_size: %u\n" ,le32_to_cpu (sdma_hdr->ctx_jt_size)); +drm_dbg (adev_to_drm (adev), +"ctl_ucode_offset: %u\n" ,le32_to_cpu (sdma_hdr->ctl_ucode_offset)); +drm_dbg (adev_to_drm (adev), +"ctl_jt_offset: %u\n" ,le32_to_cpu (sdma_hdr->ctl_jt_offset)); +drm_dbg (adev_to_drm (adev), +"ctl_jt_size: %u\n" ,le32_to_cpu (sdma_hdr->ctl_jt_size)); }else if (version_major ==3 ) {const struct sdma_firmware_header_v3_0 *sdma_hdr = container_of(hdr, struct sdma_firmware_header_v3_0, header); -DRM_DEBUG ("ucode_reversion: %u\n" , +drm_dbg (adev_to_drm (adev),"ucode_reversion: %u\n" ,le32_to_cpu (sdma_hdr->ucode_feature_version)); }else { -DRM_ERROR ("Unknown SDMA ucode version: %u.%u\n" , +drm_err (adev_to_drm (adev),"Unknown SDMA ucode version: %u.%u\n" , version_major, version_minor); } }
@@ -351,43 +382,43 @@ void amdgpu_ucode_print_psp_hdr(struct amdgpu_device *adev,uint32_t fw_index;const struct psp_fw_bin_desc *desc; -DRM_DEBUG ("PSP\n" ); -amdgpu_ucode_print_common_hdr (hdr); +drm_dbg (adev_to_drm (adev),"PSP\n" ); +amdgpu_ucode_print_common_hdr (adev, hdr);if (version_major ==1 ) {const struct psp_firmware_header_v1_0 *psp_hdr = container_of(hdr, struct psp_firmware_header_v1_0, header); -DRM_DEBUG ("ucode_feature_version: %u\n" , +drm_dbg (adev_to_drm (adev),"ucode_feature_version: %u\n" ,le32_to_cpu (psp_hdr->sos.fw_version)); -DRM_DEBUG ("sos_offset_bytes: %u\n" , +drm_dbg (adev_to_drm (adev),"sos_offset_bytes: %u\n" ,le32_to_cpu (psp_hdr->sos.offset_bytes)); -DRM_DEBUG ("sos_size_bytes: %u\n" , +drm_dbg (adev_to_drm (adev),"sos_size_bytes: %u\n" ,le32_to_cpu (psp_hdr->sos.size_bytes));if (version_minor ==1 ) {const struct psp_firmware_header_v1_1 *psp_hdr_v1_1 = container_of(psp_hdr, struct psp_firmware_header_v1_1, v1_0); -DRM_DEBUG ("toc_header_version: %u\n" , +drm_dbg (adev_to_drm (adev),"toc_header_version: %u\n" ,le32_to_cpu (psp_hdr_v1_1->toc.fw_version)); -DRM_DEBUG ("toc_offset_bytes: %u\n" , +drm_dbg (adev_to_drm (adev),"toc_offset_bytes: %u\n" ,le32_to_cpu (psp_hdr_v1_1->toc.offset_bytes)); -DRM_DEBUG ("toc_size_bytes: %u\n" , +drm_dbg (adev_to_drm (adev),"toc_size_bytes: %u\n" ,le32_to_cpu (psp_hdr_v1_1->toc.size_bytes)); -DRM_DEBUG ("kdb_header_version: %u\n" , +drm_dbg (adev_to_drm (adev),"kdb_header_version: %u\n" ,le32_to_cpu (psp_hdr_v1_1->kdb.fw_version)); -DRM_DEBUG ("kdb_offset_bytes: %u\n" , +drm_dbg (adev_to_drm (adev),"kdb_offset_bytes: %u\n" ,le32_to_cpu (psp_hdr_v1_1->kdb.offset_bytes)); -DRM_DEBUG ("kdb_size_bytes: %u\n" , +drm_dbg (adev_to_drm (adev),"kdb_size_bytes: %u\n" ,le32_to_cpu (psp_hdr_v1_1->kdb.size_bytes)); }if (version_minor ==2 ) {const struct psp_firmware_header_v1_2 *psp_hdr_v1_2 = container_of(psp_hdr, struct psp_firmware_header_v1_2, v1_0); -DRM_DEBUG ("kdb_header_version: %u\n" , +drm_dbg (adev_to_drm (adev),"kdb_header_version: %u\n" ,le32_to_cpu (psp_hdr_v1_2->kdb.fw_version)); -DRM_DEBUG ("kdb_offset_bytes: %u\n" , +drm_dbg (adev_to_drm (adev),"kdb_offset_bytes: %u\n" ,le32_to_cpu (psp_hdr_v1_2->kdb.offset_bytes)); -DRM_DEBUG ("kdb_size_bytes: %u\n" , +drm_dbg (adev_to_drm (adev),"kdb_size_bytes: %u\n" ,le32_to_cpu (psp_hdr_v1_2->kdb.size_bytes)); }if (version_minor ==3 ) {
@@ -395,23 +426,23 @@ void amdgpu_ucode_print_psp_hdr(struct amdgpu_device *adev, container_of(psp_hdr, struct psp_firmware_header_v1_1, v1_0);const struct psp_firmware_header_v1_3 *psp_hdr_v1_3 = container_of(psp_hdr_v1_1, struct psp_firmware_header_v1_3, v1_1); -DRM_DEBUG ("toc_header_version: %u\n" , +drm_dbg (adev_to_drm (adev),"toc_header_version: %u\n" ,le32_to_cpu (psp_hdr_v1_3->v1_1.toc.fw_version)); -DRM_DEBUG ("toc_offset_bytes: %u\n" , +drm_dbg (adev_to_drm (adev),"toc_offset_bytes: %u\n" ,le32_to_cpu (psp_hdr_v1_3->v1_1.toc.offset_bytes)); -DRM_DEBUG ("toc_size_bytes: %u\n" , +drm_dbg (adev_to_drm (adev),"toc_size_bytes: %u\n" ,le32_to_cpu (psp_hdr_v1_3->v1_1.toc.size_bytes)); -DRM_DEBUG ("kdb_header_version: %u\n" , +drm_dbg (adev_to_drm (adev),"kdb_header_version: %u\n" ,le32_to_cpu (psp_hdr_v1_3->v1_1.kdb.fw_version)); -DRM_DEBUG ("kdb_offset_bytes: %u\n" , +drm_dbg (adev_to_drm (adev),"kdb_offset_bytes: %u\n" ,le32_to_cpu (psp_hdr_v1_3->v1_1.kdb.offset_bytes)); -DRM_DEBUG ("kdb_size_bytes: %u\n" , +drm_dbg (adev_to_drm (adev),"kdb_size_bytes: %u\n" ,le32_to_cpu (psp_hdr_v1_3->v1_1.kdb.size_bytes)); -DRM_DEBUG ("spl_header_version: %u\n" , +drm_dbg (adev_to_drm (adev),"spl_header_version: %u\n" ,le32_to_cpu (psp_hdr_v1_3->spl.fw_version)); -DRM_DEBUG ("spl_offset_bytes: %u\n" , +drm_dbg (adev_to_drm (adev),"spl_offset_bytes: %u\n" ,le32_to_cpu (psp_hdr_v1_3->spl.offset_bytes)); -DRM_DEBUG ("spl_size_bytes: %u\n" , +drm_dbg (adev_to_drm (adev),"spl_size_bytes: %u\n" ,le32_to_cpu (psp_hdr_v1_3->spl.size_bytes)); } }else if (version_major ==2 ) {
@@ -421,72 +452,73 @@ void amdgpu_ucode_print_psp_hdr(struct amdgpu_device *adev, desc = &(psp_hdr_v2_0->psp_fw_bin[fw_index]);switch (desc->fw_type) {case PSP_FW_TYPE_PSP_SOS : -DRM_DEBUG ("psp_sos_version: %u\n" , +drm_dbg (adev_to_drm (adev),"psp_sos_version: %u\n" ,le32_to_cpu (desc->fw_version)); -DRM_DEBUG ("psp_sos_size_bytes: %u\n" , +drm_dbg (adev_to_drm (adev),"psp_sos_size_bytes: %u\n" ,le32_to_cpu (desc->size_bytes));break ;case PSP_FW_TYPE_PSP_SYS_DRV : -DRM_DEBUG ("psp_sys_drv_version: %u\n" , +drm_dbg (adev_to_drm (adev),"psp_sys_drv_version: %u\n" ,le32_to_cpu (desc->fw_version)); -DRM_DEBUG ("psp_sys_drv_size_bytes: %u\n" , +drm_dbg (adev_to_drm (adev),"psp_sys_drv_size_bytes: %u\n" ,le32_to_cpu (desc->size_bytes));break ;case PSP_FW_TYPE_PSP_KDB : -DRM_DEBUG ("psp_kdb_version: %u\n" , +drm_dbg (adev_to_drm (adev),"psp_kdb_version: %u\n" ,le32_to_cpu (desc->fw_version)); -DRM_DEBUG ("psp_kdb_size_bytes: %u\n" , +drm_dbg (adev_to_drm (adev),"psp_kdb_size_bytes: %u\n" ,le32_to_cpu (desc->size_bytes));break ;case PSP_FW_TYPE_PSP_TOC : -DRM_DEBUG ("psp_toc_version: %u\n" , +drm_dbg (adev_to_drm (adev),"psp_toc_version: %u\n" ,le32_to_cpu (desc->fw_version)); -DRM_DEBUG ("psp_toc_size_bytes: %u\n" , +drm_dbg (adev_to_drm (adev),"psp_toc_size_bytes: %u\n" ,le32_to_cpu (desc->size_bytes));break ;case PSP_FW_TYPE_PSP_SPL : -DRM_DEBUG ("psp_spl_version: %u\n" , +drm_dbg (adev_to_drm (adev),"psp_spl_version: %u\n" ,le32_to_cpu (desc->fw_version)); -DRM_DEBUG ("psp_spl_size_bytes: %u\n" , +drm_dbg (adev_to_drm (adev),"psp_spl_size_bytes: %u\n" ,le32_to_cpu (desc->size_bytes));break ;case PSP_FW_TYPE_PSP_RL : -DRM_DEBUG ("psp_rl_version: %u\n" , +drm_dbg (adev_to_drm (adev),"psp_rl_version: %u\n" ,le32_to_cpu (desc->fw_version)); -DRM_DEBUG ("psp_rl_size_bytes: %u\n" , +drm_dbg (adev_to_drm (adev),"psp_rl_size_bytes: %u\n" ,le32_to_cpu (desc->size_bytes));break ;case PSP_FW_TYPE_PSP_SOC_DRV : -DRM_DEBUG ("psp_soc_drv_version: %u\n" , +drm_dbg (adev_to_drm (adev),"psp_soc_drv_version: %u\n" ,le32_to_cpu (desc->fw_version)); -DRM_DEBUG ("psp_soc_drv_size_bytes: %u\n" , +drm_dbg (adev_to_drm (adev),"psp_soc_drv_size_bytes: %u\n" ,le32_to_cpu (desc->size_bytes));break ;case PSP_FW_TYPE_PSP_INTF_DRV : -DRM_DEBUG ("psp_intf_drv_version: %u\n" , +drm_dbg (adev_to_drm (adev),"psp_intf_drv_version: %u\n" ,le32_to_cpu (desc->fw_version)); -DRM_DEBUG ("psp_intf_drv_size_bytes: %u\n" , +drm_dbg (adev_to_drm (adev),"psp_intf_drv_size_bytes: %u\n" ,le32_to_cpu (desc->size_bytes));break ;case PSP_FW_TYPE_PSP_DBG_DRV : -DRM_DEBUG ("psp_dbg_drv_version: %u\n" , +drm_dbg (adev_to_drm (adev),"psp_dbg_drv_version: %u\n" ,le32_to_cpu (desc->fw_version)); -DRM_DEBUG ("psp_dbg_drv_size_bytes: %u\n" , +drm_dbg (adev_to_drm (adev),"psp_dbg_drv_size_bytes: %u\n" ,le32_to_cpu (desc->size_bytes));break ;case PSP_FW_TYPE_PSP_RAS_DRV : -DRM_DEBUG ("psp_ras_drv_version: %u\n" , +drm_dbg (adev_to_drm (adev),"psp_ras_drv_version: %u\n" ,le32_to_cpu (desc->fw_version)); -DRM_DEBUG ("psp_ras_drv_size_bytes: %u\n" , +drm_dbg (adev_to_drm (adev),"psp_ras_drv_size_bytes: %u\n" ,le32_to_cpu (desc->size_bytes));break ;default : -DRM_DEBUG ("Unsupported PSP fw type: %d\n" , desc->fw_type); +drm_dbg (adev_to_drm (adev), +"Unsupported PSP fw type: %d\n" , desc->fw_type);break ; } } }else { -DRM_ERROR ("Unknown PSP ucode version: %u.%u\n" , +drm_err (adev_to_drm (adev),"Unknown PSP ucode version: %u.%u\n" , version_major, version_minor); } }
@@ -497,19 +529,20 @@ void amdgpu_ucode_print_gpu_info_hdr(struct amdgpu_device *adev,uint16_t version_major =le16_to_cpu (hdr->header_version_major);uint16_t version_minor =le16_to_cpu (hdr->header_version_minor); -DRM_DEBUG ("GPU_INFO\n" ); -amdgpu_ucode_print_common_hdr (hdr); +drm_dbg (adev_to_drm (adev),"GPU_INFO\n" ); +amdgpu_ucode_print_common_hdr (adev, hdr);if (version_major ==1 ) {const struct gpu_info_firmware_header_v1_0 *gpu_info_hdr = container_of(hdr, struct gpu_info_firmware_header_v1_0, header); -DRM_DEBUG ("version_major: %u\n" , +drm_dbg (adev_to_drm (adev),"version_major: %u\n" ,le16_to_cpu (gpu_info_hdr->version_major)); -DRM_DEBUG ("version_minor: %u\n" , +drm_dbg (adev_to_drm (adev),"version_minor: %u\n" ,le16_to_cpu (gpu_info_hdr->version_minor)); }else { -DRM_ERROR ("Unknown gpu_info ucode version: %u.%u\n" , version_major, version_minor); +drm_err (adev_to_drm (adev), +"Unknown gpu_info ucode version: %u.%u\n" , version_major, version_minor); } }
@@ -1122,7 +1155,8 @@ int amdgpu_ucode_create_bo(struct amdgpu_device *adev) &adev->firmware.fw_buf_mc, &adev->firmware.fw_buf_ptr);if (!adev->firmware.fw_buf) { -dev_err (adev->dev,"failed to create kernel buffer for firmware.fw_buf\n" ); +drm_err (adev_to_drm (adev), +"failed to create kernel buffer for firmware.fw_buf\n" );return -ENOMEM ; }else if (amdgpu_sriov_vf (adev)) {memset (adev->firmware.fw_buf_ptr,0 , adev->firmware.fw_size);
@@ -1462,7 +1496,7 @@ int amdgpu_ucode_request(struct amdgpu_device *adev, const struct firmware **fw, r =vsnprintf (fname,sizeof (fname), fmt, ap);va_end (ap);if (r ==sizeof (fname)) { -dev_warn (adev->dev,"amdgpu firmware name buffer overflow\n" ); +drm_warn (adev_to_drm (adev),"amdgpu firmware name buffer overflow\n" );return -EOVERFLOW ; }
Signature · 1 line
2.43.0
PATCH 11/14 drm/amd: Add struct amdgpu_device into amdgpu_gfx_parse_disable_cu()
In reply to Mario LimoncielloFrom: Mario Limonciello <[email protected]>
In order for messages from amdgpu_gfx_parse_disable_cu() to be device specific pass in the device to the function and adjust all callers.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 4 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 2 +- 10 files changed, 13 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +3 -1
@@ -97,6 +97,7 @@ bool amdgpu_gfx_is_me_queue_enabled(struct amdgpu_device *adev,/** * amdgpu_gfx_parse_disable_cu - Parse the disable_cu module parameter * +* @adev: amdgpu device * @mask: array in which the per-shader array disable masks will be stored * @max_se: number of SEs * @max_sh: number of SHs
@@ -104,7 +105,8 @@ bool amdgpu_gfx_is_me_queue_enabled(struct amdgpu_device *adev,* The bitmask of CUs to be disabled in the shader array determined by se and * sh is stored in mask[se * max_sh + sh]. */ -void amdgpu_gfx_parse_disable_cu (unsigned int *mask,unsigned int max_se,unsigned int max_sh) +void amdgpu_gfx_parse_disable_cu (struct amdgpu_device *adev,unsigned int *mask, +unsigned int max_se,unsigned int max_sh) {unsigned int se, sh, cu;const char *p;
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h +2 -2
@@ -519,8 +519,8 @@ static inline u32 amdgpu_gfx_create_bitmask(u32 bit_width)return (u32)((1ULL << bit_width) -1 ); } -void amdgpu_gfx_parse_disable_cu (unsigned *mask,unsigned max_se, -unsigned max_sh); +void amdgpu_gfx_parse_disable_cu (struct amdgpu_device *adev,unsigned int *mask, +unsigned int max_se,unsigned int max_sh);int amdgpu_gfx_kiq_init_ring (struct amdgpu_device *adev,int xcc_id);
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +1 -1
@@ -10086,7 +10086,7 @@ static int gfx_v10_0_get_cu_info(struct amdgpu_device *adev,if (!adev || !cu_info)return -EINVAL ; -amdgpu_gfx_parse_disable_cu (disable_masks,4 ,2 ); +amdgpu_gfx_parse_disable_cu (adev, disable_masks,4 ,2 );mutex_lock (&adev->grbm_idx_mutex);for (i =0 ; i < adev->gfx.config.max_shader_engines; i++) {
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +1 -1
@@ -7109,7 +7109,7 @@ static int gfx_v11_0_get_cu_info(struct amdgpu_device *adev,if (!adev || !cu_info)return -EINVAL ; -amdgpu_gfx_parse_disable_cu (disable_masks,8 ,2 ); +amdgpu_gfx_parse_disable_cu (adev, disable_masks,8 ,2 );mutex_lock (&adev->grbm_idx_mutex);for (i =0 ; i < adev->gfx.config.max_shader_engines; i++) {
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +1 -1
@@ -5465,7 +5465,7 @@ static int gfx_v12_0_get_cu_info(struct amdgpu_device *adev,if (!adev || !cu_info)return -EINVAL ; -amdgpu_gfx_parse_disable_cu (disable_masks,8 ,2 ); +amdgpu_gfx_parse_disable_cu (adev, disable_masks,8 ,2 );mutex_lock (&adev->grbm_idx_mutex);for (i =0 ; i < adev->gfx.config.max_shader_engines; i++) {
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +1 -1
@@ -3574,7 +3574,7 @@ static void gfx_v6_0_get_cu_info(struct amdgpu_device *adev)memset (cu_info,0 ,sizeof (*cu_info)); -amdgpu_gfx_parse_disable_cu (disable_masks,4 ,2 ); +amdgpu_gfx_parse_disable_cu (adev, disable_masks,4 ,2 );mutex_lock (&adev->grbm_idx_mutex);for (i =0 ; i < adev->gfx.config.max_shader_engines; i++) {
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +1 -1
@@ -5145,7 +5145,7 @@ static void gfx_v7_0_get_cu_info(struct amdgpu_device *adev)memset (cu_info,0 ,sizeof (*cu_info)); -amdgpu_gfx_parse_disable_cu (disable_masks,4 ,2 ); +amdgpu_gfx_parse_disable_cu (adev, disable_masks,4 ,2 );mutex_lock (&adev->grbm_idx_mutex);for (i =0 ; i < adev->gfx.config.max_shader_engines; i++) {
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +1 -1
@@ -7149,7 +7149,7 @@ static void gfx_v8_0_get_cu_info(struct amdgpu_device *adev)else ao_cu_num = adev->gfx.config.max_cu_per_sh; -amdgpu_gfx_parse_disable_cu (disable_masks,4 ,2 ); +amdgpu_gfx_parse_disable_cu (adev, disable_masks,4 ,2 );mutex_lock (&adev->grbm_idx_mutex);for (i =0 ; i < adev->gfx.config.max_shader_engines; i++) {
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1 -1
@@ -7780,7 +7780,7 @@ static int gfx_v9_0_get_cu_info(struct amdgpu_device *adev, adev->gfx.config.max_sh_per_se > 16)return -EINVAL ; -amdgpu_gfx_parse_disable_cu (disable_masks, +amdgpu_gfx_parse_disable_cu (adev, disable_masks, adev->gfx.config.max_shader_engines, adev->gfx.config.max_sh_per_se);
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +1 -1
@@ -4842,7 +4842,7 @@ static int gfx_v9_4_3_get_cu_info(struct amdgpu_device *adev, adev->gfx.config.max_sh_per_se > 16)return -EINVAL ; -amdgpu_gfx_parse_disable_cu (disable_masks, +amdgpu_gfx_parse_disable_cu (adev, disable_masks, adev->gfx.config.max_shader_engines, adev->gfx.config.max_sh_per_se);
Signature · 1 line
2.43.0
PATCH 5/14 drm/amd: Adjust atombios parser messages from DRM_*() to drm_*()
In reply to Mario LimoncielloFrom: Mario Limonciello <[email protected]>
Messages emitted from atombios parser are currently with legacy DRM macros. These don't show which device they are using. To make messages clearer in multi-GPU systems adjust to drm_*() macros.
--- drivers/gpu/drm/amd/amdgpu/atom.c | 62 +++++++++++-------- drivers/gpu/drm/amd/amdgpu/atombios_crtc.c | 16 ++--- drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 18 +++--- .../gpu/drm/amd/amdgpu/atombios_encoders.c | 30 ++++----- drivers/gpu/drm/amd/amdgpu/atombios_i2c.c | 5 +- 5 files changed, 71 insertions(+), 60 deletions(-)
drivers/gpu/drm/amd/amdgpu/atom.c +36 -26
@@ -174,7 +174,7 @@ static uint32_t atom_iio_execute(struct atom_context *ctx, int base,case ATOM_IIO_END :return temp;default : -pr_info ("Unknown IIO opcode\n" ); +drm_warn (ctx->card->dev,"Unknown IIO opcode\n" );return 0 ; } }
@@ -198,18 +198,18 @@ static uint32_t atom_get_src_int(atom_exec_context *ctx, uint8_t attr, val = gctx->card->reg_read (gctx->card, idx);break ;case ATOM_IO_PCI : -pr_info ("PCI registers are not implemented\n" ); +drm_err (ctx->ctx->card->dev,"PCI registers are not implemented\n" );return 0 ;case ATOM_IO_SYSIO : -pr_info ("SYSIO registers are not implemented\n" ); +drm_err (ctx->ctx->card->dev,"SYSIO registers are not implemented\n" );return 0 ;default :if (!(gctx->io_mode &0x80 )) { -pr_info ("Bad IO mode\n" ); +drm_err (ctx->ctx->card->dev,"Bad IO mode\n" );return 0 ; }if (!gctx->iio[gctx->io_mode &0x7F ]) { -pr_info ("Undefined indirect IO read method %d\n" , +drm_err (ctx->ctx->card->dev,"Undefined indirect IO read method %d\n" , gctx->io_mode &0x7F );return 0 ; }
@@ -227,7 +227,8 @@ static uint32_t atom_get_src_int(atom_exec_context *ctx, uint8_t attr,if (idx < ctx->ps_size) val =get_unaligned_le32 ((u32 *)&ctx->ps[idx]);else -pr_info ("PS index out of range: %i > %i\n" , idx, ctx->ps_size); +drm_err (ctx->ctx->card->dev, +"PS index out of range: %i > %i\n" , idx, ctx->ps_size);if (print)DEBUG ("PS[0x%02X,0x%04X]" , idx, val);break ;
@@ -268,7 +269,9 @@ static uint32_t atom_get_src_int(atom_exec_context *ctx, uint8_t attr,if (idx < ctx->ws_size) val = ctx->ws[idx];else -pr_info ("WS index out of range: %i > %i\n" , idx, ctx->ws_size); +drm_err (ctx->ctx->card->dev, +"WS index out of range: %i > %i\n" , + idx, ctx->ws_size); }break ;case ATOM_ARG_ID :
@@ -286,7 +289,7 @@ static uint32_t atom_get_src_int(atom_exec_context *ctx, uint8_t attr, idx =U8 (*ptr); (*ptr)++;if ((gctx->fb_base + (idx *4 )) > gctx->scratch_size_bytes) { -DRM_ERROR ("ATOM: fb read beyond scratch region: %d vs. %d\n" , +drm_err (ctx->ctx->card->dev,"ATOM: fb read beyond scratch region: %d vs. %d\n" , gctx->fb_base + (idx *4 ), gctx->scratch_size_bytes); val =0 ; }else
@@ -479,18 +482,21 @@ static void atom_put_dst(atom_exec_context *ctx, int arg, uint8_t attr, gctx->card->reg_write (gctx->card, idx, val);break ;case ATOM_IO_PCI : -pr_info ("PCI registers are not implemented\n" ); +drm_err (ctx->ctx->card->dev, +"PCI registers are not implemented\n" );return ;case ATOM_IO_SYSIO : -pr_info ("SYSIO registers are not implemented\n" ); +drm_err (ctx->ctx->card->dev, +"SYSIO registers are not implemented\n" );return ;default :if (!(gctx->io_mode &0x80 )) { -pr_info ("Bad IO mode\n" ); +drm_err (ctx->ctx->card->dev,"Bad IO mode\n" );return ; }if (!gctx->iio[gctx->io_mode &0xFF ]) { -pr_info ("Undefined indirect IO write method %d\n" , +drm_err (ctx->ctx->card->dev, +"Undefined indirect IO write method %d\n" , gctx->io_mode &0x7F );return ; }
@@ -503,7 +509,9 @@ static void atom_put_dst(atom_exec_context *ctx, int arg, uint8_t attr, (*ptr)++;DEBUG ("PS[0x%02X]" , idx);if (idx >= ctx->ps_size) { -pr_info ("PS index out of range: %i > %i\n" , idx, ctx->ps_size); +drm_err (ctx->ctx->card->dev, +"PS index out of range: %i > %i\n" , + idx, ctx->ps_size);return ; } ctx->ps[idx] =cpu_to_le32 (val);
@@ -539,7 +547,9 @@ static void atom_put_dst(atom_exec_context *ctx, int arg, uint8_t attr,break ;default :if (idx >= ctx->ws_size) { -pr_info ("WS index out of range: %i > %i\n" , idx, ctx->ws_size); +drm_err (ctx->ctx->card->dev, +"WS index out of range: %i > %i\n" , + idx, ctx->ws_size);return ; } ctx->ws[idx] = val;
@@ -549,7 +559,7 @@ static void atom_put_dst(atom_exec_context *ctx, int arg, uint8_t attr, idx =U8 (*ptr); (*ptr)++;if ((gctx->fb_base + (idx *4 )) > gctx->scratch_size_bytes) { -DRM_ERROR ("ATOM: fb write beyond scratch region: %d vs. %d\n" , +drm_err (ctx->ctx->card->dev,"ATOM: fb write beyond scratch region: %d vs. %d\n" , gctx->fb_base + (idx *4 ), gctx->scratch_size_bytes); }else gctx->scratch[(gctx->fb_base /4 ) + idx] = val;
@@ -626,7 +636,7 @@ static void atom_op_and(atom_exec_context *ctx, int *ptr, int arg)static void atom_op_beep (atom_exec_context *ctx,int *ptr,int arg) { -printk ("ATOM BIOS beeped!\n" ); +drm_info (ctx->ctx->card->dev,"ATOM BIOS beeped!\n" ); }static void atom_op_calltable (atom_exec_context *ctx,int *ptr,int arg)
@@ -764,7 +774,7 @@ static void atom_op_jump(atom_exec_context *ctx, int *ptr, int arg)if (time_after (cjiffies, ctx->last_jump_jiffies)) { cjiffies -= ctx->last_jump_jiffies;if ((jiffies_to_msecs (cjiffies) >ATOM_CMD_TIMEOUT_SEC *1000 )) { -DRM_ERROR ("atombios stuck in loop for more than %dsecs aborting\n" , +drm_err (ctx->ctx->card->dev,"atombios stuck in loop for more than %dsecs aborting\n" ,ATOM_CMD_TIMEOUT_SEC ); ctx->abort = true; }
@@ -866,17 +876,17 @@ static void atom_op_postcard(atom_exec_context *ctx, int *ptr, int arg)static void atom_op_repeat (atom_exec_context *ctx,int *ptr,int arg) { -pr_info ("unimplemented!\n" ); +drm_warn (ctx->ctx->card->dev,"unimplemented!\n" ); }static void atom_op_restorereg (atom_exec_context *ctx,int *ptr,int arg) { -pr_info ("unimplemented!\n" ); +drm_warn (ctx->ctx->card->dev,"unimplemented!\n" ); }static void atom_op_savereg (atom_exec_context *ctx,int *ptr,int arg) { -pr_info ("unimplemented!\n" ); +drm_warn (ctx->ctx->card->dev,"unimplemented!\n" ); }static void atom_op_setdatablock (atom_exec_context *ctx,int *ptr,int arg)
@@ -1039,7 +1049,7 @@ static void atom_op_switch(atom_exec_context *ctx, int *ptr, int arg) } (*ptr) +=2 ; }else { -pr_info ("Bad case\n" ); +drm_err (ctx->ctx->card->dev,"Bad case\n" );return ; } (*ptr) +=2 ;
@@ -1260,7 +1270,7 @@ static int amdgpu_atom_execute_table_locked(struct atom_context *ctx, int index,else SDEBUG ("[%d] @ 0x%04X\n" , op, ptr -1 );if (ectx.abort) { -DRM_ERROR ("atombios stuck executing %04X (len %d, WS %d, PS %d) @ 0x%04X\n" , +drm_err (ctx->card->dev,"atombios stuck executing %04X (len %d, WS %d, PS %d) @ 0x%04X\n" , base, len, ws, ps, ptr -1 ); ret = -EINVAL ; goto free;
@@ -1458,7 +1468,7 @@ static void atom_get_vbios_pn(struct atom_context *ctx) ctx->vbios_pn[count] =0 ; } -pr_info ("ATOM BIOS: %s\n" , ctx->vbios_pn); +drm_info (ctx->card->dev,"ATOM BIOS: %s\n" , ctx->vbios_pn); }static void atom_get_vbios_version (struct atom_context *ctx)
@@ -1509,14 +1519,14 @@ struct atom_context *amdgpu_atom_parse(struct card_info *card, void *bios) ctx->bios = bios;if (CU16 (0 ) !=ATOM_BIOS_MAGIC ) { -pr_info ("Invalid BIOS magic\n" ); +drm_err (card->dev,"Invalid BIOS magic\n" );kfree (ctx);return NULL ; }if (strncmp (CSTR (ATOM_ATI_MAGIC_PTR ),ATOM_ATI_MAGIC ,strlen (ATOM_ATI_MAGIC ))) { -pr_info ("Invalid ATI magic\n" ); +drm_err (card->dev,"Invalid ATI magic\n" );kfree (ctx);return NULL ; }
@@ -1525,7 +1535,7 @@ struct atom_context *amdgpu_atom_parse(struct card_info *card, void *bios)if (strncmp (CSTR (base +ATOM_ROM_MAGIC_PTR ),ATOM_ROM_MAGIC ,strlen (ATOM_ROM_MAGIC ))) { -pr_info ("Invalid ATOM magic\n" ); +drm_err (card->dev,"Invalid ATOM magic\n" );kfree (ctx);return NULL ; }
drivers/gpu/drm/amd/amdgpu/atombios_crtc.c +8 -8
@@ -442,12 +442,12 @@ static u32 amdgpu_atombios_crtc_adjust_pll(struct drm_crtc *crtc, }break ;default : -DRM_ERROR ("Unknown table version %d %d\n" , frev, crev); +drm_err (adev_to_drm (adev),"Unknown table version %d %d\n" , frev, crev);return adjusted_clock; }break ;default : -DRM_ERROR ("Unknown table version %d %d\n" , frev, crev); +drm_err (adev_to_drm (adev),"Unknown table version %d %d\n" , frev, crev);return adjusted_clock; }
@@ -506,12 +506,12 @@ void amdgpu_atombios_crtc_set_disp_eng_pll(struct amdgpu_device *adev, args.v6.ucPpll =ATOM_EXT_PLL1 ;break ;default : -DRM_ERROR ("Unknown table version %d %d\n" , frev, crev); +drm_err (adev_to_drm (adev),"Unknown table version %d %d\n" , frev, crev);return ; }break ;default : -DRM_ERROR ("Unknown table version %d %d\n" , frev, crev); +drm_err (adev_to_drm (adev),"Unknown table version %d %d\n" , frev, crev);return ; }amdgpu_atom_execute_table (adev->mode_info.atom_context, index, (uint32_t *)&args,sizeof (args));
@@ -548,12 +548,12 @@ u32 amdgpu_atombios_crtc_set_dce_clock(struct amdgpu_device *adev, ret_freq =le32_to_cpu (args.v2_1.asParam.ulDCEClkFreq) *10 ;break ;default : -DRM_ERROR ("Unknown table version %d %d\n" , frev, crev); +drm_err (adev_to_drm (adev),"Unknown table version %d %d\n" , frev, crev);return 0 ; }break ;default : -DRM_ERROR ("Unknown table version %d %d\n" , frev, crev); +drm_err (adev_to_drm (adev),"Unknown table version %d %d\n" , frev, crev);return 0 ; }
@@ -731,12 +731,12 @@ void amdgpu_atombios_crtc_program_pll(struct drm_crtc *crtc, args.v7.ucPpll = pll_id;break ;default : -DRM_ERROR ("Unknown table version %d %d\n" , frev, crev); +drm_err (adev_to_drm (adev),"Unknown table version %d %d\n" , frev, crev);return ; }break ;default : -DRM_ERROR ("Unknown table version %d %d\n" , frev, crev); +drm_err (adev_to_drm (adev),"Unknown table version %d %d\n" , frev, crev);return ; }
drivers/gpu/drm/amd/amdgpu/atombios_dp.c +9 -9
@@ -617,7 +617,7 @@ amdgpu_atombios_dp_link_train_cr(struct amdgpu_atombios_dp_link_train_info *dp_iif (drm_dp_dpcd_read_link_status (dp_info->aux, dp_info->link_status) <=0 ) { -DRM_ERROR ("displayport link status failed\n" ); +drm_err (adev_to_drm (dp_info->adev),"displayport link status failed\n" );break ; }
@@ -631,14 +631,14 @@ amdgpu_atombios_dp_link_train_cr(struct amdgpu_atombios_dp_link_train_info *dp_ibreak ; }if (i == dp_info->dp_lane_count) { -DRM_ERROR ("clock recovery reached max voltage\n" ); +drm_err (adev_to_drm (dp_info->adev),"clock recovery reached max voltage\n" );break ; }if ((dp_info->train_set[0 ] &DP_TRAIN_VOLTAGE_SWING_MASK ) == voltage) { ++dp_info->tries;if (dp_info->tries ==5 ) { -DRM_ERROR ("clock recovery tried 5 times\n" ); +drm_err (adev_to_drm (dp_info->adev),"clock recovery tried 5 times\n" );break ; } }else
@@ -653,10 +653,10 @@ amdgpu_atombios_dp_link_train_cr(struct amdgpu_atombios_dp_link_train_info *dp_iamdgpu_atombios_dp_update_vs_emph (dp_info); }if (!clock_recovery) { -DRM_ERROR ("clock recovery failed\n" ); +drm_err (adev_to_drm (dp_info->adev),"clock recovery failed\n" );return -1 ; }else { -DRM_DEBUG_KMS ("clock recovery at voltage %d pre-emphasis %d\n" , +drm_dbg (dp_info->adev,"clock recovery at voltage %d pre-emphasis %d\n" , dp_info->train_set[0 ] &DP_TRAIN_VOLTAGE_SWING_MASK , (dp_info->train_set[0 ] &DP_TRAIN_PRE_EMPHASIS_MASK ) >>DP_TRAIN_PRE_EMPHASIS_SHIFT );
@@ -682,7 +682,7 @@ amdgpu_atombios_dp_link_train_ce(struct amdgpu_atombios_dp_link_train_info *dp_iif (drm_dp_dpcd_read_link_status (dp_info->aux, dp_info->link_status) <=0 ) { -DRM_ERROR ("displayport link status failed\n" ); +drm_err (adev_to_drm (dp_info->adev),"displayport link status failed\n" );break ; }
@@ -693,7 +693,7 @@ amdgpu_atombios_dp_link_train_ce(struct amdgpu_atombios_dp_link_train_info *dp_i/* Try 5 times */ if (dp_info->tries >5 ) { -DRM_ERROR ("channel eq failed: 5 tries\n" ); +drm_err (adev_to_drm (dp_info->adev),"channel eq failed: 5 tries\n" );break ; }
@@ -706,10 +706,10 @@ amdgpu_atombios_dp_link_train_ce(struct amdgpu_atombios_dp_link_train_info *dp_i }if (!channel_eq) { -DRM_ERROR ("channel eq failed\n" ); +drm_err (adev_to_drm (dp_info->adev),"channel eq failed\n" );return -1 ; }else { -DRM_DEBUG_KMS ("channel eq at voltage %d pre-emphasis %d\n" , +drm_dbg (dp_info->adev,"channel eq at voltage %d pre-emphasis %d\n" , dp_info->train_set[0 ] &DP_TRAIN_VOLTAGE_SWING_MASK , (dp_info->train_set[0 ] &DP_TRAIN_PRE_EMPHASIS_MASK ) >>DP_TRAIN_PRE_EMPHASIS_SHIFT );
drivers/gpu/drm/amd/amdgpu/atombios_encoders.c +15 -15
@@ -193,7 +193,7 @@ void amdgpu_atombios_encoder_init_backlight(struct amdgpu_encoder *amdgpu_encode pdata =kmalloc (sizeof (struct amdgpu_backlight_privdata ),GFP_KERNEL );if (!pdata) { -DRM_ERROR ("Memory allocation failed\n" ); +drm_err (dev,"Memory allocation failed\n" ); goto error; }
@@ -205,7 +205,7 @@ void amdgpu_atombios_encoder_init_backlight(struct amdgpu_encoder *amdgpu_encode bd =backlight_device_register (bl_name, drm_connector->kdev, pdata, &amdgpu_atombios_encoder_backlight_ops, &props);if (IS_ERR (bd)) { -DRM_ERROR ("Backlight registration failed\n" ); +drm_err (dev,"Backlight registration failed\n" ); goto error; }
@@ -218,7 +218,7 @@ void amdgpu_atombios_encoder_init_backlight(struct amdgpu_encoder *amdgpu_encode bd->props.power =BACKLIGHT_POWER_ON ;backlight_update_status (bd); -DRM_INFO ("amdgpu atom DIG backlight initialized\n" ); +drm_info (dev,"amdgpu atom DIG backlight initialized\n" );return ;
@@ -256,7 +256,7 @@ amdgpu_atombios_encoder_fini_backlight(struct amdgpu_encoder *amdgpu_encoder)backlight_device_unregister (bd);kfree (pdata); -DRM_INFO ("amdgpu atom LVDS backlight unloaded\n" ); +drm_info (adev_to_drm (adev),"amdgpu atom LVDS backlight unloaded\n" ); } }
@@ -423,12 +423,12 @@ amdgpu_atombios_encoder_setup_dvo(struct drm_encoder *encoder, int action) args.dvo_v4.ucBitPerColor =amdgpu_atombios_encoder_get_bpc (encoder);break ;default : -DRM_ERROR ("Unknown table version %d, %d\n" , frev, crev); +drm_err (adev_to_drm (adev),"Unknown table version %d, %d\n" , frev, crev);break ; }break ;default : -DRM_ERROR ("Unknown table version %d, %d\n" , frev, crev); +drm_err (adev_to_drm (adev),"Unknown table version %d, %d\n" , frev, crev);break ; }
@@ -718,17 +718,17 @@ amdgpu_atombios_encoder_setup_dig_encoder(struct drm_encoder *encoder, args.v5.asCmdParam.ucDigId = dig->dig_encoder;break ;default : -DRM_ERROR ("Unsupported action 0x%x\n" , action); +drm_err (adev_to_drm (adev),"Unsupported action 0x%x\n" , action);break ; }break ;default : -DRM_ERROR ("Unknown table version %d, %d\n" , frev, crev); +drm_err (adev_to_drm (adev),"Unknown table version %d, %d\n" , frev, crev);break ; }break ;default : -DRM_ERROR ("Unknown table version %d, %d\n" , frev, crev); +drm_err (adev_to_drm (adev),"Unknown table version %d, %d\n" , frev, crev);break ; }
@@ -1127,12 +1127,12 @@ amdgpu_atombios_encoder_setup_dig_transmitter(struct drm_encoder *encoder, int a args.v6.ucDigEncoderSel =1 << dig_encoder;break ;default : -DRM_ERROR ("Unknown table version %d, %d\n" , frev, crev); +drm_err (adev_to_drm (adev),"Unknown table version %d, %d\n" , frev, crev);break ; }break ;default : -DRM_ERROR ("Unknown table version %d, %d\n" , frev, crev); +drm_err (adev_to_drm (adev),"Unknown table version %d, %d\n" , frev, crev);break ; }
@@ -1280,12 +1280,12 @@ amdgpu_atombios_encoder_setup_external_encoder(struct drm_encoder *encoder, args.v3.sExtEncoder.ucBitPerColor =amdgpu_atombios_encoder_get_bpc (encoder);break ;default : -DRM_ERROR ("Unknown table version: %d, %d\n" , frev, crev); +drm_err (adev_to_drm (adev),"Unknown table version: %d, %d\n" , frev, crev);return ; }break ;default : -DRM_ERROR ("Unknown table version: %d, %d\n" , frev, crev); +drm_err (adev_to_drm (adev),"Unknown table version: %d, %d\n" , frev, crev);return ; }amdgpu_atom_execute_table (adev->mode_info.atom_context, index, (uint32_t *)&args,sizeof (args));
@@ -1629,7 +1629,7 @@ amdgpu_atombios_encoder_set_crtc_source(struct drm_encoder *encoder) }break ;default : -DRM_ERROR ("Unknown table version: %d, %d\n" , frev, crev); +drm_err (adev_to_drm (adev),"Unknown table version: %d, %d\n" , frev, crev);return ; }
@@ -2091,7 +2091,7 @@ amdgpu_atombios_encoder_get_lcd_info(struct amdgpu_encoder *encoder) record +=sizeof (ATOM_PANEL_RESOLUTION_PATCH_RECORD );break ;default : -DRM_ERROR ("Bad LCD record %d\n" , *record); +drm_err (adev_to_drm (adev),"Bad LCD record %d\n" , *record); bad_record = true;break ; }
drivers/gpu/drm/amd/amdgpu/atombios_i2c.c +3 -2
@@ -55,7 +55,8 @@ static int amdgpu_atombios_i2c_process_i2c_ch(struct amdgpu_i2c_chan *chan,if (flags &HW_I2C_WRITE ) {if (num >ATOM_MAX_HW_I2C_WRITE ) { -DRM_ERROR ("hw i2c: tried to write too many bytes (%d vs 3)\n" , num); +drm_err (adev_to_drm (adev), +"hw i2c: tried to write too many bytes (%d vs 3)\n" , num); r = -EINVAL ; goto done; }
@@ -69,7 +70,7 @@ static int amdgpu_atombios_i2c_process_i2c_ch(struct amdgpu_i2c_chan *chan,if (buf) {memcpy (&out, &buf[1 ], num); }else { -DRM_ERROR ("hw i2c: missing buf with num > 1\n" ); +drm_err (adev_to_drm (adev),"hw i2c: missing buf with num > 1\n" ); r = -EINVAL ; goto done; }
Signature · 1 line
2.43.0
PATCH 7/14 drm/amd: Add a 'struct amdgpu_device' argument to all header printers
In reply to Mario LimoncielloFrom: Mario Limonciello <[email protected]>
To allow header printing to reflect the correct GPU, pass the device into all functions.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 14 +++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 24 ++++++++++++------- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 21 ++++++++++------ drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 14 +++++------ drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 6 ++--- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 8 +++---- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 10 ++++---- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 10 ++++---- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 2 +- drivers/gpu/drm/amd/pm/legacy-dpm/si_smc.c | 2 +- .../gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 2 +- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 2 +- .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 2 +- .../gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c | 2 +- 27 files changed, 81 insertions(+), 66 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c +1 -1
@@ -373,7 +373,7 @@ static int amdgpu_cgs_get_firmware_info(struct cgs_device *cgs_device, } hdr = (const struct smc_firmware_header_v1_0 *) adev->pm.fw->data; -amdgpu_ucode_print_smc_hdr (&hdr->header); +amdgpu_ucode_print_smc_hdr (adev, &hdr->header); adev->pm.fw_version =le32_to_cpu (hdr->header.ucode_version); ucode_size =le32_to_cpu (hdr->header.ucode_size_bytes); ucode_start_address =le32_to_cpu (hdr->ucode_start_addr);
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
@@ -2546,7 +2546,7 @@ static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev) } hdr = (const struct gpu_info_firmware_header_v1_0 *)adev->firmware.gpu_info_fw->data; -amdgpu_ucode_print_gpu_info_hdr (&hdr->header); +amdgpu_ucode_print_gpu_info_hdr (adev, &hdr->header);switch (hdr->version_major) {case 1 :
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +7 -7
@@ -2710,31 +2710,31 @@ static void psp_print_fw_hdr(struct psp_context *psp,case AMDGPU_UCODE_ID_SDMA7 : hdr = (struct common_firmware_header *) adev->sdma.instance[ucode->ucode_id -AMDGPU_UCODE_ID_SDMA0 ].fw->data; -amdgpu_ucode_print_sdma_hdr (hdr); +amdgpu_ucode_print_sdma_hdr (adev, hdr);break ;case AMDGPU_UCODE_ID_CP_CE : hdr = (struct common_firmware_header *)adev->gfx.ce_fw->data; -amdgpu_ucode_print_gfx_hdr (hdr); +amdgpu_ucode_print_gfx_hdr (adev, hdr);break ;case AMDGPU_UCODE_ID_CP_PFP : hdr = (struct common_firmware_header *)adev->gfx.pfp_fw->data; -amdgpu_ucode_print_gfx_hdr (hdr); +amdgpu_ucode_print_gfx_hdr (adev, hdr);break ;case AMDGPU_UCODE_ID_CP_ME : hdr = (struct common_firmware_header *)adev->gfx.me_fw->data; -amdgpu_ucode_print_gfx_hdr (hdr); +amdgpu_ucode_print_gfx_hdr (adev, hdr);break ;case AMDGPU_UCODE_ID_CP_MEC1 : hdr = (struct common_firmware_header *)adev->gfx.mec_fw->data; -amdgpu_ucode_print_gfx_hdr (hdr); +amdgpu_ucode_print_gfx_hdr (adev, hdr);break ;case AMDGPU_UCODE_ID_RLC_G : hdr = (struct common_firmware_header *)adev->gfx.rlc_fw->data; -amdgpu_ucode_print_rlc_hdr (hdr); +amdgpu_ucode_print_rlc_hdr (adev, hdr);break ;case AMDGPU_UCODE_ID_SMC : hdr = (struct common_firmware_header *)adev->pm.fw->data; -amdgpu_ucode_print_smc_hdr (hdr); +amdgpu_ucode_print_smc_hdr (adev, hdr);break ;default :break ;
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +16 -8
@@ -30,7 +30,8 @@#define AMDGPU_UCODE_NAME_MAX (128) -static void amdgpu_ucode_print_common_hdr (const struct common_firmware_header *hdr) +static void amdgpu_ucode_print_common_hdr (struct amdgpu_device *adev, +const struct common_firmware_header *hdr) {DRM_DEBUG ("size_bytes: %u\n" ,le32_to_cpu (hdr->size_bytes));DRM_DEBUG ("header_size_bytes: %u\n" ,le32_to_cpu (hdr->header_size_bytes));
@@ -45,7 +46,8 @@ static void amdgpu_ucode_print_common_hdr(const struct common_firmware_header *hDRM_DEBUG ("crc32: 0x%08x\n" ,le32_to_cpu (hdr->crc32)); } -void amdgpu_ucode_print_mc_hdr (const struct common_firmware_header *hdr) +void amdgpu_ucode_print_mc_hdr (struct amdgpu_device *adev, +const struct common_firmware_header *hdr) {uint16_t version_major =le16_to_cpu (hdr->header_version_major);uint16_t version_minor =le16_to_cpu (hdr->header_version_minor);
@@ -66,7 +68,8 @@ void amdgpu_ucode_print_mc_hdr(const struct common_firmware_header *hdr) } } -void amdgpu_ucode_print_smc_hdr (const struct common_firmware_header *hdr) +void amdgpu_ucode_print_smc_hdr (struct amdgpu_device *adev, +const struct common_firmware_header *hdr) {uint16_t version_major =le16_to_cpu (hdr->header_version_major);uint16_t version_minor =le16_to_cpu (hdr->header_version_minor);
@@ -101,7 +104,8 @@ void amdgpu_ucode_print_smc_hdr(const struct common_firmware_header *hdr) } } -void amdgpu_ucode_print_gfx_hdr (const struct common_firmware_header *hdr) +void amdgpu_ucode_print_gfx_hdr (struct amdgpu_device *adev, +const struct common_firmware_header *hdr) {uint16_t version_major =le16_to_cpu (hdr->header_version_major);uint16_t version_minor =le16_to_cpu (hdr->header_version_minor);
@@ -128,7 +132,8 @@ void amdgpu_ucode_print_gfx_hdr(const struct common_firmware_header *hdr) } } -void amdgpu_ucode_print_rlc_hdr (const struct common_firmware_header *hdr) +void amdgpu_ucode_print_rlc_hdr (struct amdgpu_device *adev, +const struct common_firmware_header *hdr) {uint16_t version_major =le16_to_cpu (hdr->header_version_major);uint16_t version_minor =le16_to_cpu (hdr->header_version_minor);
@@ -291,7 +296,8 @@ void amdgpu_ucode_print_rlc_hdr(const struct common_firmware_header *hdr) } } -void amdgpu_ucode_print_sdma_hdr (const struct common_firmware_header *hdr) +void amdgpu_ucode_print_sdma_hdr (struct amdgpu_device *adev, +const struct common_firmware_header *hdr) {uint16_t version_major =le16_to_cpu (hdr->header_version_major);uint16_t version_minor =le16_to_cpu (hdr->header_version_minor);
@@ -337,7 +343,8 @@ void amdgpu_ucode_print_sdma_hdr(const struct common_firmware_header *hdr) } } -void amdgpu_ucode_print_psp_hdr (const struct common_firmware_header *hdr) +void amdgpu_ucode_print_psp_hdr (struct amdgpu_device *adev, +const struct common_firmware_header *hdr) {uint16_t version_major =le16_to_cpu (hdr->header_version_major);uint16_t version_minor =le16_to_cpu (hdr->header_version_minor);
@@ -484,7 +491,8 @@ void amdgpu_ucode_print_psp_hdr(const struct common_firmware_header *hdr) } } -void amdgpu_ucode_print_gpu_info_hdr (const struct common_firmware_header *hdr) +void amdgpu_ucode_print_gpu_info_hdr (struct amdgpu_device *adev, +const struct common_firmware_header *hdr) {uint16_t version_major =le16_to_cpu (hdr->header_version_major);uint16_t version_minor =le16_to_cpu (hdr->header_version_minor);
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h +14 -7
@@ -602,13 +602,20 @@ struct amdgpu_firmware {uint64_t fw_buf_mc; }; -void amdgpu_ucode_print_mc_hdr (const struct common_firmware_header *hdr); -void amdgpu_ucode_print_smc_hdr (const struct common_firmware_header *hdr); -void amdgpu_ucode_print_gfx_hdr (const struct common_firmware_header *hdr); -void amdgpu_ucode_print_rlc_hdr (const struct common_firmware_header *hdr); -void amdgpu_ucode_print_sdma_hdr (const struct common_firmware_header *hdr); -void amdgpu_ucode_print_psp_hdr (const struct common_firmware_header *hdr); -void amdgpu_ucode_print_gpu_info_hdr (const struct common_firmware_header *hdr); +void amdgpu_ucode_print_mc_hdr (struct amdgpu_device *adev, +const struct common_firmware_header *hdr); +void amdgpu_ucode_print_smc_hdr (struct amdgpu_device *adev, +const struct common_firmware_header *hdr); +void amdgpu_ucode_print_gfx_hdr (struct amdgpu_device *adev, +const struct common_firmware_header *hdr); +void amdgpu_ucode_print_rlc_hdr (struct amdgpu_device *adev, +const struct common_firmware_header *hdr); +void amdgpu_ucode_print_sdma_hdr (struct amdgpu_device *adev, +const struct common_firmware_header *hdr); +void amdgpu_ucode_print_psp_hdr (struct amdgpu_device *adev, +const struct common_firmware_header *hdr); +void amdgpu_ucode_print_gpu_info_hdr (struct amdgpu_device *adev, +const struct common_firmware_header *hdr); __printf(4, 5)int amdgpu_ucode_request (struct amdgpu_device *adev,const struct firmware **fw,enum amdgpu_ucode_required required,const char *fmt, ...);
drivers/gpu/drm/amd/amdgpu/cik_sdma.c +1 -1
@@ -539,7 +539,7 @@ static int cik_sdma_load_microcode(struct amdgpu_device *adev)if (!adev->sdma.instance[i].fw)return -EINVAL ; hdr = (const struct sdma_firmware_header_v1_0 *)adev->sdma.instance[i].fw->data; -amdgpu_ucode_print_sdma_hdr (&hdr->header); +amdgpu_ucode_print_sdma_hdr (adev, &hdr->header); fw_size =le32_to_cpu (hdr->header.ucode_size_bytes) /4 ; adev->sdma.instance[i].fw_version =le32_to_cpu (hdr->header.ucode_version); adev->sdma.instance[i].feature_version =le32_to_cpu (hdr->ucode_feature_version);
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +1 -1
@@ -5499,7 +5499,7 @@ static int gfx_v10_0_rlc_load_microcode(struct amdgpu_device *adev)return -EINVAL ; hdr = (const struct rlc_firmware_header_v2_0 *)adev->gfx.rlc_fw->data; -amdgpu_ucode_print_rlc_hdr (&hdr->header); +amdgpu_ucode_print_rlc_hdr (adev, &hdr->header); fw_data = (const __le32 *)(adev->gfx.rlc_fw->data +le32_to_cpu (hdr->header.ucode_array_offset_bytes));
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +7 -7
@@ -2351,7 +2351,7 @@ static int gfx_v11_0_rlc_load_microcode(struct amdgpu_device *adev)return -EINVAL ; hdr = (const struct rlc_firmware_header_v2_0 *)adev->gfx.rlc_fw->data; -amdgpu_ucode_print_rlc_hdr (&hdr->header); +amdgpu_ucode_print_rlc_hdr (adev, &hdr->header); version_major =le16_to_cpu (hdr->header.header_version_major); version_minor =le16_to_cpu (hdr->header.header_version_minor);
@@ -3065,7 +3065,7 @@ static int gfx_v11_0_cp_gfx_load_pfp_microcode(struct amdgpu_device *adev) pfp_hdr = (const struct gfx_firmware_header_v1_0 *) adev->gfx.pfp_fw->data; -amdgpu_ucode_print_gfx_hdr (&pfp_hdr->header); +amdgpu_ucode_print_gfx_hdr (adev, &pfp_hdr->header); fw_data = (const __le32 *)(adev->gfx.pfp_fw->data +le32_to_cpu (pfp_hdr->header.ucode_array_offset_bytes));
@@ -3112,7 +3112,7 @@ static int gfx_v11_0_cp_gfx_load_pfp_microcode_rs64(struct amdgpu_device *adev) pfp_hdr = (const struct gfx_firmware_header_v2_0 *) adev->gfx.pfp_fw->data; -amdgpu_ucode_print_gfx_hdr (&pfp_hdr->header); +amdgpu_ucode_print_gfx_hdr (adev, &pfp_hdr->header);/* instruction */ fw_ucode = (const __le32 *)(adev->gfx.pfp_fw->data +
@@ -3283,7 +3283,7 @@ static int gfx_v11_0_cp_gfx_load_me_microcode(struct amdgpu_device *adev) me_hdr = (const struct gfx_firmware_header_v1_0 *) adev->gfx.me_fw->data; -amdgpu_ucode_print_gfx_hdr (&me_hdr->header); +amdgpu_ucode_print_gfx_hdr (adev, &me_hdr->header); fw_data = (const __le32 *)(adev->gfx.me_fw->data +le32_to_cpu (me_hdr->header.ucode_array_offset_bytes));
@@ -3330,7 +3330,7 @@ static int gfx_v11_0_cp_gfx_load_me_microcode_rs64(struct amdgpu_device *adev) me_hdr = (const struct gfx_firmware_header_v2_0 *) adev->gfx.me_fw->data; -amdgpu_ucode_print_gfx_hdr (&me_hdr->header); +amdgpu_ucode_print_gfx_hdr (adev, &me_hdr->header);/* instruction */ fw_ucode = (const __le32 *)(adev->gfx.me_fw->data +
@@ -3793,7 +3793,7 @@ static int gfx_v11_0_cp_compute_load_microcode(struct amdgpu_device *adev)gfx_v11_0_cp_compute_enable (adev, false); mec_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.mec_fw->data; -amdgpu_ucode_print_gfx_hdr (&mec_hdr->header); +amdgpu_ucode_print_gfx_hdr (adev, &mec_hdr->header); fw_data = (const __le32 *) (adev->gfx.mec_fw->data +
@@ -3845,7 +3845,7 @@ static int gfx_v11_0_cp_compute_load_microcode_rs64(struct amdgpu_device *adev)gfx_v11_0_cp_compute_enable (adev, false); mec_hdr = (const struct gfx_firmware_header_v2_0 *)adev->gfx.mec_fw->data; -amdgpu_ucode_print_gfx_hdr (&mec_hdr->header); +amdgpu_ucode_print_gfx_hdr (adev, &mec_hdr->header); fw_ucode = (const __le32 *) (adev->gfx.mec_fw->data +le32_to_cpu (mec_hdr->ucode_offset_bytes));
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +3 -3
@@ -1990,7 +1990,7 @@ static int gfx_v12_0_rlc_load_microcode(struct amdgpu_device *adev)return -EINVAL ; hdr = (const struct rlc_firmware_header_v2_0 *)adev->gfx.rlc_fw->data; -amdgpu_ucode_print_rlc_hdr (&hdr->header); +amdgpu_ucode_print_rlc_hdr (adev, &hdr->header); version_major =le16_to_cpu (hdr->header.header_version_major); version_minor =le16_to_cpu (hdr->header.header_version_minor);
@@ -2302,7 +2302,7 @@ static int gfx_v12_0_cp_gfx_load_pfp_microcode_rs64(struct amdgpu_device *adev) pfp_hdr = (const struct gfx_firmware_header_v2_0 *) adev->gfx.pfp_fw->data; -amdgpu_ucode_print_gfx_hdr (&pfp_hdr->header); +amdgpu_ucode_print_gfx_hdr (adev, &pfp_hdr->header);/* instruction */ fw_ucode = (const __le32 *)(adev->gfx.pfp_fw->data +
@@ -2446,7 +2446,7 @@ static int gfx_v12_0_cp_gfx_load_me_microcode_rs64(struct amdgpu_device *adev) me_hdr = (const struct gfx_firmware_header_v2_0 *) adev->gfx.me_fw->data; -amdgpu_ucode_print_gfx_hdr (&me_hdr->header); +amdgpu_ucode_print_gfx_hdr (adev, &me_hdr->header);/* instruction */ fw_ucode = (const __le32 *)(adev->gfx.me_fw->data +
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +4 -4
@@ -1963,9 +1963,9 @@ static int gfx_v6_0_cp_gfx_load_microcode(struct amdgpu_device *adev) ce_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.ce_fw->data; me_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.me_fw->data; -amdgpu_ucode_print_gfx_hdr (&pfp_hdr->header); -amdgpu_ucode_print_gfx_hdr (&ce_hdr->header); -amdgpu_ucode_print_gfx_hdr (&me_hdr->header); +amdgpu_ucode_print_gfx_hdr (adev, &pfp_hdr->header); +amdgpu_ucode_print_gfx_hdr (adev, &ce_hdr->header); +amdgpu_ucode_print_gfx_hdr (adev, &me_hdr->header);/* PFP */ fw_data = (const __le32 *)
@@ -2530,7 +2530,7 @@ static int gfx_v6_0_rlc_resume(struct amdgpu_device *adev) fw_data = (const __le32 *) (adev->gfx.rlc_fw->data +le32_to_cpu (hdr->header.ucode_array_offset_bytes)); -amdgpu_ucode_print_rlc_hdr (&hdr->header); +amdgpu_ucode_print_rlc_hdr (adev, &hdr->header);for (i =0 ; i < fw_size; i++) {WREG32 (mmRLC_UCODE_ADDR, i);
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +5 -5
@@ -2403,9 +2403,9 @@ static int gfx_v7_0_cp_gfx_load_microcode(struct amdgpu_device *adev) ce_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.ce_fw->data; me_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.me_fw->data; -amdgpu_ucode_print_gfx_hdr (&pfp_hdr->header); -amdgpu_ucode_print_gfx_hdr (&ce_hdr->header); -amdgpu_ucode_print_gfx_hdr (&me_hdr->header); +amdgpu_ucode_print_gfx_hdr (adev, &pfp_hdr->header); +amdgpu_ucode_print_gfx_hdr (adev, &ce_hdr->header); +amdgpu_ucode_print_gfx_hdr (adev, &me_hdr->header); adev->gfx.pfp_fw_version =le32_to_cpu (pfp_hdr->header.ucode_version); adev->gfx.ce_fw_version =le32_to_cpu (ce_hdr->header.ucode_version); adev->gfx.me_fw_version =le32_to_cpu (me_hdr->header.ucode_version);
@@ -2663,7 +2663,7 @@ static int gfx_v7_0_cp_compute_load_microcode(struct amdgpu_device *adev)return -EINVAL ; mec_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.mec_fw->data; -amdgpu_ucode_print_gfx_hdr (&mec_hdr->header); +amdgpu_ucode_print_gfx_hdr (adev, &mec_hdr->header); adev->gfx.mec_fw_version =le32_to_cpu (mec_hdr->header.ucode_version); adev->gfx.mec_feature_version =le32_to_cpu ( mec_hdr->ucode_feature_version);
@@ -3424,7 +3424,7 @@ static int gfx_v7_0_rlc_resume(struct amdgpu_device *adev)return -EINVAL ; hdr = (const struct rlc_firmware_header_v1_0 *)adev->gfx.rlc_fw->data; -amdgpu_ucode_print_rlc_hdr (&hdr->header); +amdgpu_ucode_print_rlc_hdr (adev, &hdr->header); adev->gfx.rlc_fw_version =le32_to_cpu (hdr->header.ucode_version); adev->gfx.rlc_feature_version =le32_to_cpu ( hdr->ucode_feature_version);
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +5 -5
@@ -3149,7 +3149,7 @@ static int gfx_v9_0_rlc_load_microcode(struct amdgpu_device *adev)return -EINVAL ; hdr = (const struct rlc_firmware_header_v2_0 *)adev->gfx.rlc_fw->data; -amdgpu_ucode_print_rlc_hdr (&hdr->header); +amdgpu_ucode_print_rlc_hdr (adev, &hdr->header); fw_data = (const __le32 *)(adev->gfx.rlc_fw->data +le32_to_cpu (hdr->header.ucode_array_offset_bytes));
@@ -3252,9 +3252,9 @@ static int gfx_v9_0_cp_gfx_load_microcode(struct amdgpu_device *adev) me_hdr = (const struct gfx_firmware_header_v1_0 *) adev->gfx.me_fw->data; -amdgpu_ucode_print_gfx_hdr (&pfp_hdr->header); -amdgpu_ucode_print_gfx_hdr (&ce_hdr->header); -amdgpu_ucode_print_gfx_hdr (&me_hdr->header); +amdgpu_ucode_print_gfx_hdr (adev, &pfp_hdr->header); +amdgpu_ucode_print_gfx_hdr (adev, &ce_hdr->header); +amdgpu_ucode_print_gfx_hdr (adev, &me_hdr->header);gfx_v9_0_cp_gfx_enable (adev, false);
@@ -3463,7 +3463,7 @@ static int gfx_v9_0_cp_compute_load_microcode(struct amdgpu_device *adev)gfx_v9_0_cp_compute_enable (adev, false); mec_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.mec_fw->data; -amdgpu_ucode_print_gfx_hdr (&mec_hdr->header); +amdgpu_ucode_print_gfx_hdr (adev, &mec_hdr->header); fw_data = (const __le32 *) (adev->gfx.mec_fw->data +
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +2 -2
@@ -1559,7 +1559,7 @@ static int gfx_v9_4_3_xcc_rlc_load_microcode(struct amdgpu_device *adev,return -EINVAL ; hdr = (const struct rlc_firmware_header_v2_0 *)adev->gfx.rlc_fw->data; -amdgpu_ucode_print_rlc_hdr (&hdr->header); +amdgpu_ucode_print_rlc_hdr (adev, &hdr->header); fw_data = (const __le32 *)(adev->gfx.rlc_fw->data +le32_to_cpu (hdr->header.ucode_array_offset_bytes));
@@ -1716,7 +1716,7 @@ static int gfx_v9_4_3_xcc_cp_compute_load_microcode(struct amdgpu_device *adev,gfx_v9_4_3_xcc_cp_compute_enable (adev, false, xcc_id); mec_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.mec_fw->data; -amdgpu_ucode_print_gfx_hdr (&mec_hdr->header); +amdgpu_ucode_print_gfx_hdr (adev, &mec_hdr->header); fw_data = (const __le32 *) (adev->gfx.mec_fw->data +
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +1 -1
@@ -155,7 +155,7 @@ static int gmc_v6_0_mc_load_microcode(struct amdgpu_device *adev) hdr = (const struct mc_firmware_header_v1_0 *)adev->gmc.fw->data; -amdgpu_ucode_print_mc_hdr (&hdr->header); +amdgpu_ucode_print_mc_hdr (adev, &hdr->header); adev->gmc.fw_version =le32_to_cpu (hdr->header.ucode_version); regs_size =le32_to_cpu (hdr->io_debug_size_bytes) / (4 *2 );
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c +1 -1
@@ -186,7 +186,7 @@ static int gmc_v7_0_mc_load_microcode(struct amdgpu_device *adev)return -EINVAL ; hdr = (const struct mc_firmware_header_v1_0 *)adev->gmc.fw->data; -amdgpu_ucode_print_mc_hdr (&hdr->header); +amdgpu_ucode_print_mc_hdr (adev, &hdr->header); adev->gmc.fw_version =le32_to_cpu (hdr->header.ucode_version); regs_size =le32_to_cpu (hdr->io_debug_size_bytes) / (4 *2 );
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +1 -1
@@ -296,7 +296,7 @@ static int gmc_v8_0_tonga_mc_load_microcode(struct amdgpu_device *adev)return -EINVAL ; hdr = (const struct mc_firmware_header_v1_0 *)adev->gmc.fw->data; -amdgpu_ucode_print_mc_hdr (&hdr->header); +amdgpu_ucode_print_mc_hdr (adev, &hdr->header); adev->gmc.fw_version =le32_to_cpu (hdr->header.ucode_version); regs_size =le32_to_cpu (hdr->io_debug_size_bytes) / (4 *2 );
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +1 -1
@@ -1351,7 +1351,7 @@ static int sdma_v4_0_load_microcode(struct amdgpu_device *adev)return -EINVAL ; hdr = (const struct sdma_firmware_header_v1_0 *)adev->sdma.instance[i].fw->data; -amdgpu_ucode_print_sdma_hdr (&hdr->header); +amdgpu_ucode_print_sdma_hdr (adev, &hdr->header); fw_size =le32_to_cpu (hdr->header.ucode_size_bytes) /4 ; fw_data = (const __le32 *)
drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c +1 -1
@@ -926,7 +926,7 @@ static int sdma_v4_4_2_inst_load_microcode(struct amdgpu_device *adev,return -EINVAL ; hdr = (const struct sdma_firmware_header_v1_0 *)adev->sdma.instance[i].fw->data; -amdgpu_ucode_print_sdma_hdr (&hdr->header); +amdgpu_ucode_print_sdma_hdr (adev, &hdr->header); fw_size =le32_to_cpu (hdr->header.ucode_size_bytes) /4 ; fw_data = (const __le32 *)
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c +1 -1
@@ -891,7 +891,7 @@ static int sdma_v5_0_load_microcode(struct amdgpu_device *adev)return -EINVAL ; hdr = (const struct sdma_firmware_header_v1_0 *)adev->sdma.instance[i].fw->data; -amdgpu_ucode_print_sdma_hdr (&hdr->header); +amdgpu_ucode_print_sdma_hdr (adev, &hdr->header); fw_size =le32_to_cpu (hdr->header.ucode_size_bytes) /4 ; fw_data = (const __le32 *)
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +1 -1
@@ -738,7 +738,7 @@ static int sdma_v5_2_load_microcode(struct amdgpu_device *adev)return -EINVAL ; hdr = (const struct sdma_firmware_header_v1_0 *)adev->sdma.instance[i].fw->data; -amdgpu_ucode_print_sdma_hdr (&hdr->header); +amdgpu_ucode_print_sdma_hdr (adev, &hdr->header); fw_size =le32_to_cpu (hdr->header.ucode_size_bytes) /4 ; fw_data = (const __le32 *)
drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c +1 -1
@@ -716,7 +716,7 @@ static int sdma_v6_0_load_microcode(struct amdgpu_device *adev)for (i =0 ; i < adev->sdma.num_instances; i++) {/* load Control Thread microcode */ hdr = (const struct sdma_firmware_header_v2_0 *)adev->sdma.instance[0 ].fw->data; -amdgpu_ucode_print_sdma_hdr (&hdr->header); +amdgpu_ucode_print_sdma_hdr (adev, &hdr->header); fw_size =le32_to_cpu (hdr->ctx_jt_offset + hdr->ctx_jt_size) /4 ; fw_data = (const __le32 *)
drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c +1 -1
@@ -691,7 +691,7 @@ static int sdma_v7_0_load_microcode(struct amdgpu_device *adev) hdr = (const struct sdma_firmware_header_v3_0 *) adev->sdma.instance[0 ].fw->data; -amdgpu_ucode_print_sdma_hdr (&hdr->header); +amdgpu_ucode_print_sdma_hdr (adev, &hdr->header); fw_data = (const __le32 *)(adev->sdma.instance[0 ].fw->data +le32_to_cpu (hdr->ucode_offset_bytes));
drivers/gpu/drm/amd/pm/legacy-dpm/si_smc.c +1 -1
@@ -220,7 +220,7 @@ int amdgpu_si_load_smc_ucode(struct amdgpu_device *adev, u32 limit) hdr = (const struct smc_firmware_header_v1_0 *)adev->pm.fw->data; -amdgpu_ucode_print_smc_hdr (&hdr->header); +amdgpu_ucode_print_smc_hdr (adev, &hdr->header); adev->pm.fw_version =le32_to_cpu (hdr->header.ucode_version); ucode_start_address =le32_to_cpu (hdr->ucode_start_addr);
drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c +1 -1
@@ -111,7 +111,7 @@ int smu_v11_0_init_microcode(struct smu_context *smu) goto out; hdr = (const struct smc_firmware_header_v1_0 *) adev->pm.fw->data; -amdgpu_ucode_print_smc_hdr (&hdr->header); +amdgpu_ucode_print_smc_hdr (adev, &hdr->header); adev->pm.fw_version =le32_to_cpu (hdr->header.ucode_version);if (adev->firmware.load_type ==AMDGPU_FW_LOAD_PSP ) {
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c +1 -1
@@ -109,7 +109,7 @@ int smu_v13_0_init_microcode(struct smu_context *smu) goto out; hdr = (const struct smc_firmware_header_v1_0 *) adev->pm.fw->data; -amdgpu_ucode_print_smc_hdr (&hdr->header); +amdgpu_ucode_print_smc_hdr (adev, &hdr->header); adev->pm.fw_version =le32_to_cpu (hdr->header.ucode_version);if (adev->firmware.load_type ==AMDGPU_FW_LOAD_PSP ) {
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +1 -1
@@ -464,7 +464,7 @@ static int smu_v13_0_6_init_microcode(struct smu_context *smu) goto out; hdr = (const struct common_firmware_header *)adev->pm.fw->data; -amdgpu_ucode_print_smc_hdr (hdr); +amdgpu_ucode_print_smc_hdr (adev, hdr);/* SMU v13.0.6 binary file doesn't carry pptables, instead the entries * are used to carry p2s tables.
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c +1 -1
@@ -85,7 +85,7 @@ int smu_v14_0_init_microcode(struct smu_context *smu) goto out; hdr = (const struct smc_firmware_header_v1_0 *) adev->pm.fw->data; -amdgpu_ucode_print_smc_hdr (&hdr->header); +amdgpu_ucode_print_smc_hdr (adev, &hdr->header); adev->pm.fw_version =le32_to_cpu (hdr->header.ucode_version);if (adev->firmware.load_type ==AMDGPU_FW_LOAD_PSP ) {
Signature · 1 line
2.43.0
PATCH 6/14 drm/amd: Drop prototype for amdgpu_ucode_print_imu_hdr()
In reply to Mario LimoncielloFrom: Mario Limonciello <[email protected]>
There is no matching function for amdgpu_ucode_print_imu_hdr(). Drop the prototype.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h +0 -1
@@ -604,7 +604,6 @@ struct amdgpu_firmware {void amdgpu_ucode_print_mc_hdr (const struct common_firmware_header *hdr);void amdgpu_ucode_print_smc_hdr (const struct common_firmware_header *hdr); -void amdgpu_ucode_print_imu_hdr (const struct common_firmware_header *hdr);void amdgpu_ucode_print_gfx_hdr (const struct common_firmware_header *hdr);void amdgpu_ucode_print_rlc_hdr (const struct common_firmware_header *hdr);void amdgpu_ucode_print_sdma_hdr (const struct common_firmware_header *hdr);
Signature · 1 line
2.43.0
PATCH 14/14 drm/amd: Drop 'amdgpu' from pr_fmt()
In reply to Mario LimoncielloFrom: Mario Limonciello <[email protected]>
As the driver uses drm_*() macros to print messages it's not necessary to include amdgpu a second time in all messages.
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 12 ------------ drivers/gpu/drm/amd/pm/powerplay/inc/pp_debug.h | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +0 -12
@@ -28,18 +28,6 @@#ifndef __AMDGPU_H__#define __AMDGPU_H__ -#ifdef pr_fmt -#undef pr_fmt -#endif - -#define pr_fmt (fmt) "amdgpu: " fmt - -#ifdef dev_fmt -#undef dev_fmt -#endif - -#define dev_fmt (fmt) "amdgpu: " fmt -#include "amdgpu_ctx.h" #include <linux/atomic.h>
drivers/gpu/drm/amd/pm/powerplay/inc/pp_debug.h +1 -1
@@ -28,7 +28,7 @@#undef pr_fmt#endif -#define pr_fmt (fmt) "amdgpu: [powerplay] " fmt +#define pr_fmt (fmt) "[powerplay] " fmt#include <linux/types.h> #include <linux/kernel.h>
Signature · 1 line
2.43.0
PATCH 12/14 drm/amd: Add struct amdgpu_device argument to amdgpu_reset_create_reset_domain()
In reply to Mario LimoncielloFrom: Mario Limonciello <[email protected]>
In order to be able to log messages specific to a GPU, add device argument into the amdgpu_reset_create_reset_domain() function.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -1
@@ -4391,7 +4391,8 @@ int amdgpu_device_init(struct amdgpu_device *adev,* (if any) and initialized to use reset sem and in_gpu reset flag * early on during init and before calling to RREG32. */ - adev->reset_domain =amdgpu_reset_create_reset_domain (SINGLE_DEVICE ,"amdgpu-reset-dev" ); + adev->reset_domain =amdgpu_reset_create_reset_domain (adev,SINGLE_DEVICE , +"amdgpu-reset-dev" );if (!adev->reset_domain)return -ENOMEM ;
drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c +2 -1
@@ -271,7 +271,8 @@ void amdgpu_reset_destroy_reset_domain(struct kref *ref)kvfree (reset_domain); } -struct amdgpu_reset_domain *amdgpu_reset_create_reset_domain (enum amdgpu_reset_domain_type type, +struct amdgpu_reset_domain *amdgpu_reset_create_reset_domain (struct amdgpu_device *adev, +enum amdgpu_reset_domain_type type,char *wq_name) {struct amdgpu_reset_domain *reset_domain;
drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h +2 -1
@@ -114,7 +114,8 @@ int amdgpu_reset_prepare_env(struct amdgpu_device *adev,int amdgpu_reset_restore_env (struct amdgpu_device *adev,struct amdgpu_reset_context *reset_context); -struct amdgpu_reset_domain *amdgpu_reset_create_reset_domain (enum amdgpu_reset_domain_type type, +struct amdgpu_reset_domain *amdgpu_reset_create_reset_domain (struct amdgpu_device *adev, +enum amdgpu_reset_domain_type type,char *wq_name);void amdgpu_reset_destroy_reset_domain (struct kref *ref);
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c +2 -1
@@ -687,7 +687,8 @@ struct amdgpu_hive_info *amdgpu_get_xgmi_hive(struct amdgpu_device *adev)*/ if (adev->reset_domain->type !=XGMI_HIVE ) { hive->reset_domain = -amdgpu_reset_create_reset_domain (XGMI_HIVE ,"amdgpu-reset-hive" ); +amdgpu_reset_create_reset_domain (adev,XGMI_HIVE , +"amdgpu-reset-hive" );if (!hive->reset_domain) {dev_err (adev->dev,"XGMI: failed initializing reset domain for xgmi hive\n" ); ret = -ENOMEM ;
Signature · 1 line
2.43.0
Re: [PATCH 02/14] drm/amd: Avoid showing an error about memory allocation in amdgpu_acpi_enumerate_xcc()
In reply to Mario LimoncielloQuoted 4 lines · Mario Limonciello
From: Mario Limonciello <[email protected]>
checkpatch.pl complains about unnecessary error messages for failing to allocate memory. These aren't needed when the return code is
-ENOMEM.
It's not about the error code. It conveys till what stage driver proceeded and when the failure happened. I do see other instances in kernel which do give an error message with -ENOMEM.
Thanks,
Lijo
Quoted 23 lines
Drop such a message from
amdgpu_acpi_enumerate_xcc().Signed-off-by Mario Limonciello <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +1
-3@@ -1116,10 +1116,8 @@ static int amdgpu_acpi_enumerate_xcc(void) xcc_info =kzalloc (sizeof (struct amdgpu_acpi_xcc_info ),GFP_KERNEL ); -if (!xcc_info) { -DRM_ERROR ("Failed to allocate memory for xcc info\n" ); +if (!xcc_info)return -ENOMEM ; - }INIT_LIST_HEAD (&xcc_info->list); xcc_info->handle =acpi_device_handle (acpi_dev);
PATCH 13/14 drm/amd: Convert DRM_*() and dev_*() macros to drm_*()
In reply to Mario LimoncielloFrom: Mario Limonciello <[email protected]>
Messages emitted by amdgpu with legacy DRM macros don't show which device they are using. To make messages clearer in multi-GPU systems adjust to drm_*() macros.
--- drivers/gpu/drm/amd/amdgpu/aldebaran.c | 10 +- drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 22 +- .../drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c | 2 +- .../drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10_3.c | 2 +- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c | 22 +- drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 44 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 14 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c | 14 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 16 +- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 8 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 14 +- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 8 +- .../gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 279 +++++++++--------- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 102 +++---- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 81 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 4 +- .../gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c | 10 +- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 21 +- .../gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 14 +- .../drm/amd/amdgpu/amdgpu_fw_attestation.c | 11 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 8 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 10 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 74 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 58 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_hdp.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 12 +- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 8 +- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 24 +- drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 8 +- drivers/gpu/drm/amd/amdgpu/amdgpu_mca.c | 8 +- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 56 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_mmhub.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 26 +- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 2 +- .../gpu/drm/amd/amdgpu/amdgpu_preempt_mgr.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 222 +++++++------- drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.c | 18 +- drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c | 20 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 96 +++--- .../gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 48 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 16 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c | 34 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.c | 12 +- drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 8 +- .../gpu/drm/amd/amdgpu/amdgpu_securedisplay.c | 8 +- drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.c | 6 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 58 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 20 +- drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c | 12 +- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 62 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 42 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 16 +- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 36 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 22 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 12 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 54 ++-- drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c | 8 +- drivers/gpu/drm/amd/amdgpu/cik.c | 14 +- drivers/gpu/drm/amd/amdgpu/cik_ih.c | 4 +- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 4 +- drivers/gpu/drm/amd/amdgpu/cz_ih.c | 4 +- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 36 +-- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 40 +-- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 40 +-- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 38 +-- drivers/gpu/drm/amd/amdgpu/df_v3_6.c | 6 +- drivers/gpu/drm/amd/amdgpu/df_v4_3.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 102 +++---- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 124 ++++---- drivers/gpu/drm/amd/amdgpu/gfx_v11_0_3.c | 8 +- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 88 +++--- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 22 +- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 22 +- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 54 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 80 ++--- drivers/gpu/drm/amd/amdgpu/gfx_v9_4.c | 26 +- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c | 60 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 50 ++-- drivers/gpu/drm/amd/amdgpu/gfxhub_v11_5_0.c | 14 +- drivers/gpu/drm/amd/amdgpu/gfxhub_v12_0.c | 14 +- drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c | 14 +- drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c | 14 +- drivers/gpu/drm/amd/amdgpu/gfxhub_v3_0.c | 14 +- drivers/gpu/drm/amd/amdgpu/gfxhub_v3_0_3.c | 14 +- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 16 +- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 16 +- drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 14 +- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 32 +- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 26 +- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 38 +-- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 48 +-- drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 4 +- drivers/gpu/drm/amd/amdgpu/ih_v6_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/ih_v6_1.c | 4 +- drivers/gpu/drm/amd/amdgpu/ih_v7_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/imu_v11_0.c | 5 +- drivers/gpu/drm/amd/amdgpu/imu_v12_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c | 14 +- drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c | 6 +- drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c | 6 +- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c | 6 +- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 10 +- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c | 2 +- drivers/gpu/drm/amd/amdgpu/lsdma_v6_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/lsdma_v7_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/mes_userqueue.c | 2 +- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 48 +-- drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 52 ++-- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c | 6 +- drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c | 4 +- drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c | 14 +- drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c | 14 +- drivers/gpu/drm/amd/amdgpu/mmhub_v3_0.c | 14 +- drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_1.c | 14 +- drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_2.c | 14 +- drivers/gpu/drm/amd/amdgpu/mmhub_v3_3.c | 14 +- drivers/gpu/drm/amd/amdgpu/mmhub_v4_1_0.c | 14 +- drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c | 6 +- drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 8 +- drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c | 6 +- drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 4 +- drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c | 6 +- drivers/gpu/drm/amd/amdgpu/nbio_v7_9.c | 6 +- drivers/gpu/drm/amd/amdgpu/nv.c | 12 +- drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 24 +- drivers/gpu/drm/amd/amdgpu/psp_v11_0_8.c | 6 +- drivers/gpu/drm/amd/amdgpu/psp_v12_0.c | 8 +- drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 26 +- drivers/gpu/drm/amd/amdgpu/psp_v13_0_4.c | 6 +- drivers/gpu/drm/amd/amdgpu/psp_v14_0.c | 24 +- drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 10 +- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 4 +- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 22 +- drivers/gpu/drm/amd/amdgpu/sdma_v4_4.c | 4 +- drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 14 +- drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 16 +- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 18 +- drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 24 +- drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 24 +- drivers/gpu/drm/amd/amdgpu/si.c | 18 +- drivers/gpu/drm/amd/amdgpu/si_dma.c | 2 +- drivers/gpu/drm/amd/amdgpu/si_ih.c | 4 +- drivers/gpu/drm/amd/amdgpu/sienna_cichlid.c | 8 +- drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c | 22 +- drivers/gpu/drm/amd/amdgpu/smu_v13_0_10.c | 8 +- drivers/gpu/drm/amd/amdgpu/soc15.c | 16 +- drivers/gpu/drm/amd/amdgpu/soc21.c | 18 +- drivers/gpu/drm/amd/amdgpu/soc24.c | 10 +- drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 4 +- drivers/gpu/drm/amd/amdgpu/umc_v12_0.c | 10 +- drivers/gpu/drm/amd/amdgpu/umc_v6_7.c | 18 +- drivers/gpu/drm/amd/amdgpu/umc_v8_10.c | 4 +- drivers/gpu/drm/amd/amdgpu/umsch_mm_v4_0.c | 8 +- drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c | 12 +- drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 8 +- drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 10 +- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 24 +- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 20 +- drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 10 +- drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 16 +- drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 14 +- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 14 +- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 10 +- drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 10 +- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 20 +- drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 34 +-- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 18 +- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c | 16 +- drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 16 +- drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c | 10 +- drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 4 +- drivers/gpu/drm/amd/amdgpu/vega20_ih.c | 4 +- drivers/gpu/drm/amd/amdgpu/vi.c | 6 +- drivers/gpu/drm/amd/amdgpu/vpe_v6_1.c | 4 +- drivers/gpu/drm/amd/amdkfd/kfd_debug.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 60 ++-- .../drm/amd/amdkfd/kfd_device_queue_manager.c | 18 +- drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c | 12 +- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 10 +- drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 10 +- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 8 +- drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c | 56 ++-- .../gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c | 26 +- drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 86 +++--- .../gpu/drm/amd/pm/powerplay/amd_powerplay.c | 4 +- .../drm/amd/pm/powerplay/hwmgr/common_baco.c | 2 +- .../drm/amd/pm/powerplay/smumgr/ci_smumgr.c | 2 +- .../amd/pm/powerplay/smumgr/smu10_smumgr.c | 4 +- .../drm/amd/pm/powerplay/smumgr/smu7_smumgr.c | 2 +- .../drm/amd/pm/powerplay/smumgr/smu9_smumgr.c | 2 +- .../amd/pm/powerplay/smumgr/vega20_smumgr.c | 4 +- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 106 +++---- .../gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c | 8 +- .../gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 8 +- .../amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 4 +- .../gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 16 +- .../gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 6 +- .../gpu/drm/amd/pm/swsmu/smu12/smu_v12_0.c | 2 +- .../drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 14 +- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 35 ++- .../drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 70 ++--- .../drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c | 2 +- .../drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c | 4 +- .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 14 +- .../drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 84 +++--- .../drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c | 4 +- .../gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c | 45 +-- .../drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c | 10 +- .../drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c | 54 ++-- drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 6 +- 226 files changed, 2416 insertions(+), 2354 deletions(-)
drivers/gpu/drm/amd/amdgpu/aldebaran.c +5 -5
@@ -236,7 +236,7 @@ static int aldebaran_mode2_restore_ip(struct amdgpu_device *adev) cmn_block =amdgpu_device_ip_get_ip_block (adev,AMD_IP_BLOCK_TYPE_COMMON );if (unlikely (!cmn_block)) { -dev_err (adev->dev,"Failed to get BIF handle\n" ); +drm_err (adev_to_drm (adev),"Failed to get BIF handle\n" );return -EINVAL ; } r =amdgpu_ip_block_resume (cmn_block);
@@ -247,14 +247,14 @@ static int aldebaran_mode2_restore_ip(struct amdgpu_device *adev) adev->gfxhub.funcs->init (adev); r = adev->gfxhub.funcs->gart_enable (adev);if (r) { -dev_err (adev->dev,"GFXHUB gart reenable failed after reset\n" ); +drm_err (adev_to_drm (adev),"GFXHUB gart reenable failed after reset\n" );return r; }/* Reload GFX firmware */ r =psp_load_fw_list (&adev->psp, ucode_list, ucode_count);if (r) { -dev_err (adev->dev,"GFX ucode load failed after reset\n" ); +drm_err (adev_to_drm (adev),"GFX ucode load failed after reset\n" );return r; }
@@ -264,7 +264,7 @@ static int aldebaran_mode2_restore_ip(struct amdgpu_device *adev)/* Wait for FW reset event complete */ r =amdgpu_dpm_wait_for_event (adev,SMU_EVENT_RESET_COMPLETE ,0 );if (r) { -dev_err (adev->dev, +drm_err (adev_to_drm (adev),"Failed to get response from firmware after reset\n" );return r; }
@@ -294,7 +294,7 @@ static int aldebaran_mode2_restore_ip(struct amdgpu_device *adev) r = adev->ip_blocks[i].version->funcs->late_init ( &adev->ip_blocks[i]);if (r) { -dev_err (adev->dev, +drm_err (adev_to_drm (adev),"late_init of IP block <%s> failed %d after reset\n" , adev->ip_blocks[i].version->funcs->name, r);
drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c +2 -1
@@ -865,7 +865,8 @@ static int amdgpu_aca_smu_debug_mode_set(void *data, u64 val)if (ret)return ret; -dev_info (adev->dev,"amdgpu set smu aca debug mode %s success\n" , val ?"on" :"off" ); +drm_info (adev_to_drm (adev), +"amdgpu set smu aca debug mode %s success\n" , val ?"on" :"off" );return 0 ; }
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +11 -11
@@ -155,7 +155,7 @@ int amdgpu_amdkfd_drm_client_create(struct amdgpu_device *adev) ret =drm_client_init (&adev->ddev, &adev->kfd.client,"kfd" , &kfd_client_funcs);if (ret) { -dev_err (adev->dev,"Failed to init DRM client: %d\n" , +drm_err (adev_to_drm (adev),"Failed to init DRM client: %d\n" , ret);return ret; }
@@ -315,7 +315,7 @@ int amdgpu_amdkfd_alloc_gtt_mem(struct amdgpu_device *adev, size_t size, r =amdgpu_bo_create (adev, &bp, &bo);if (r) { -dev_err (adev->dev, +drm_err (adev_to_drm (adev),"failed to allocate BO for amdkfd (%d)\n" , r);return r; }
@@ -323,25 +323,25 @@ int amdgpu_amdkfd_alloc_gtt_mem(struct amdgpu_device *adev, size_t size,/* map the buffer */ r =amdgpu_bo_reserve (bo, true);if (r) { -dev_err (adev->dev,"(%d) failed to reserve bo for amdkfd\n" , r); +drm_err (adev_to_drm (adev),"(%d) failed to reserve bo for amdkfd\n" , r); goto allocate_mem_reserve_bo_failed; } r =amdgpu_bo_pin (bo,AMDGPU_GEM_DOMAIN_GTT );if (r) { -dev_err (adev->dev,"(%d) failed to pin bo for amdkfd\n" , r); +drm_err (adev_to_drm (adev),"(%d) failed to pin bo for amdkfd\n" , r); goto allocate_mem_pin_bo_failed; } r =amdgpu_ttm_alloc_gart (&bo->tbo);if (r) { -dev_err (adev->dev,"%p bind failed\n" , bo); +drm_err (adev_to_drm (adev),"%p bind failed\n" , bo); goto allocate_mem_kmap_bo_failed; } r =amdgpu_bo_kmap (bo, &cpu_ptr_tmp);if (r) { -dev_err (adev->dev, +drm_err (adev_to_drm (adev),"(%d) failed to map bo to kernel for amdkfd\n" , r); goto allocate_mem_kmap_bo_failed; }
@@ -394,7 +394,7 @@ int amdgpu_amdkfd_alloc_gws(struct amdgpu_device *adev, size_t size, r =amdgpu_bo_create_user (adev, &bp, &ubo);if (r) { -dev_err (adev->dev, +drm_err (adev_to_drm (adev),"failed to allocate gws BO for amdkfd (%d)\n" , r);return r; }
@@ -469,7 +469,7 @@ void amdgpu_amdkfd_get_local_mem_info(struct amdgpu_device *adev, } mem_info->vram_width = adev->gmc.vram_width; -pr_debug ("Address base: %pap public 0x%llx private 0x%llx\n" , +drm_dbg (adev_to_drm (adev),"Address base: %pap public 0x%llx private 0x%llx\n" , &adev->gmc.aper_base, mem_info->local_mem_size_public, mem_info->local_mem_size_private);
@@ -634,7 +634,7 @@ int amdgpu_amdkfd_submit_ib(struct amdgpu_device *adev, ring = &adev->sdma.instance[1 ].ring;break ;default : -pr_err ("Invalid engine in IB submission: %d\n" , engine); +drm_err (adev_to_drm (adev),"Invalid engine in IB submission: %d\n" , engine); ret = -EINVAL ; goto err; }
@@ -656,7 +656,7 @@ int amdgpu_amdkfd_submit_ib(struct amdgpu_device *adev, ret =amdgpu_ib_schedule (ring,1 , ib, job, &f);if (ret) { -DRM_ERROR ("amdgpu: failed to schedule IB.\n" ); +drm_err (adev_to_drm (adev),"amdgpu: failed to schedule IB.\n" ); goto err_ib_sched; }
@@ -676,7 +676,7 @@ void amdgpu_amdkfd_set_compute_idle(struct amdgpu_device *adev, bool idle)if ((IP_VERSION_MAJ (amdgpu_ip_version (adev,GC_HWIP ,0 )) ==11 && ((adev->mes.kiq_version &AMDGPU_MES_VERSION_MASK ) <=64 )) || (IP_VERSION_MAJ (amdgpu_ip_version (adev,GC_HWIP ,0 )) ==12 )) { -pr_debug ("GFXOFF is %s\n" , idle ?"enabled" :"disabled" ); +drm_dbg (adev_to_drm (adev),"GFXOFF is %s\n" , idle ?"enabled" :"disabled" );amdgpu_gfx_off_ctrl (adev, idle); }else if ((IP_VERSION_MAJ (amdgpu_ip_version (adev,GC_HWIP ,0 )) ==9 ) && (adev->flags &AMD_IS_APU )) {
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c +1 -1
@@ -73,7 +73,7 @@ static uint32_t get_sdma_rlc_reg_offset(struct amdgpu_device *adev,switch (engine_id) {default : -dev_warn (adev->dev, +drm_warn (adev_to_drm (adev),"Invalid sdma engine id (%d), using engine id 0\n" , engine_id); fallthrough;
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10_3.c +1 -1
@@ -135,7 +135,7 @@ static uint32_t get_sdma_rlc_reg_offset(struct amdgpu_device *adev,switch (engine_id) {default : -dev_warn (adev->dev, +drm_warn (adev_to_drm (adev),"Invalid sdma engine id (%d), using engine id 0\n" , engine_id); fallthrough;
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c +1 -1
@@ -186,7 +186,7 @@ static uint32_t get_sdma_rlc_reg_offset(struct amdgpu_device *adev,switch (engine_id) {default : -dev_warn (adev->dev, +drm_warn (adev_to_drm (adev),"Invalid sdma engine id (%d), using engine id 0\n" , engine_id); fallthrough;
drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c +11 -11
@@ -66,7 +66,7 @@ static void amdgpu_benchmark_log_results(struct amdgpu_device *adev, throughput =div64_s64 (throughput, time_ms); -dev_info (adev->dev,"amdgpu: %s %u bo moves of %u kB from" +drm_info (adev_to_drm (adev),"amdgpu: %s %u bo moves of %u kB from" " %d to %d in %lld ms, throughput: %lld Mb/s or %lld MB/s\n" , kind, n, size >>10 , sdomain, ddomain, time_ms, throughput *8 , throughput);
@@ -110,7 +110,7 @@ static int amdgpu_benchmark_move(struct amdgpu_device *adev, unsigned size, out_cleanup:/* Check error value now. The value can be overwritten when clean up.*/ if (r <0 ) -dev_info (adev->dev,"Error while benchmarking BO move.\n" ); +drm_info (adev_to_drm (adev),"Error while benchmarking BO move.\n" );if (sobj)amdgpu_bo_free_kernel (&sobj, &saddr,NULL );
@@ -145,7 +145,7 @@ int amdgpu_benchmark(struct amdgpu_device *adev, int test_number)mutex_lock (&adev->benchmark_mutex);switch (test_number) {case 1 : -dev_info (adev->dev, +drm_info (adev_to_drm (adev),"benchmark test: %d (simple test, VRAM to GTT and GTT to VRAM)\n" , test_number);/* simple test, VRAM to GTT and GTT to VRAM */
@@ -159,7 +159,7 @@ int amdgpu_benchmark(struct amdgpu_device *adev, int test_number) goto done;break ;case 2 : -dev_info (adev->dev, +drm_info (adev_to_drm (adev),"benchmark test: %d (simple test, VRAM to VRAM)\n" , test_number);/* simple test, VRAM to VRAM */
@@ -169,7 +169,7 @@ int amdgpu_benchmark(struct amdgpu_device *adev, int test_number) goto done;break ;case 3 : -dev_info (adev->dev, +drm_info (adev_to_drm (adev),"benchmark test: %d (GTT to VRAM, buffer size sweep, powers of 2)\n" , test_number);/* GTT to VRAM, buffer size sweep, powers of 2 */
@@ -182,7 +182,7 @@ int amdgpu_benchmark(struct amdgpu_device *adev, int test_number) }break ;case 4 : -dev_info (adev->dev, +drm_info (adev_to_drm (adev),"benchmark test: %d (VRAM to GTT, buffer size sweep, powers of 2)\n" , test_number);/* VRAM to GTT, buffer size sweep, powers of 2 */
@@ -195,7 +195,7 @@ int amdgpu_benchmark(struct amdgpu_device *adev, int test_number) }break ;case 5 : -dev_info (adev->dev, +drm_info (adev_to_drm (adev),"benchmark test: %d (VRAM to VRAM, buffer size sweep, powers of 2)\n" , test_number);/* VRAM to VRAM, buffer size sweep, powers of 2 */
@@ -208,7 +208,7 @@ int amdgpu_benchmark(struct amdgpu_device *adev, int test_number) }break ;case 6 : -dev_info (adev->dev, +drm_info (adev_to_drm (adev),"benchmark test: %d (GTT to VRAM, buffer size sweep, common modes)\n" , test_number);/* GTT to VRAM, buffer size sweep, common modes */
@@ -221,7 +221,7 @@ int amdgpu_benchmark(struct amdgpu_device *adev, int test_number) }break ;case 7 : -dev_info (adev->dev, +drm_info (adev_to_drm (adev),"benchmark test: %d (VRAM to GTT, buffer size sweep, common modes)\n" , test_number);/* VRAM to GTT, buffer size sweep, common modes */
@@ -234,7 +234,7 @@ int amdgpu_benchmark(struct amdgpu_device *adev, int test_number) }break ;case 8 : -dev_info (adev->dev, +drm_info (adev_to_drm (adev),"benchmark test: %d (VRAM to VRAM, buffer size sweep, common modes)\n" , test_number);/* VRAM to VRAM, buffer size sweep, common modes */
@@ -248,7 +248,7 @@ int amdgpu_benchmark(struct amdgpu_device *adev, int test_number)break ;default : -dev_info (adev->dev,"Unknown benchmark %d\n" , test_number); +drm_info (adev_to_drm (adev),"Unknown benchmark %d\n" , test_number); r = -EINVAL ;break ; }
drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c +22 -22
151 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c +7 -7
@@ -73,7 +73,7 @@ static uint32_t amdgpu_cgs_read_ind_register(struct cgs_device *cgs_device,case CGS_IND_REG_SE_CAC :return RREG32_SE_CAC (index);case CGS_IND_REG__AUDIO_ENDPT : -DRM_ERROR ("audio endpt register access not implemented.\n" ); +drm_err (adev_to_drm (adev),"audio endpt register access not implemented.\n" );return 0 ;default :BUG ();
@@ -101,7 +101,7 @@ static void amdgpu_cgs_write_ind_register(struct cgs_device *cgs_device,case CGS_IND_REG_SE_CAC :return WREG32_SE_CAC (index, value);case CGS_IND_REG__AUDIO_ENDPT : -DRM_ERROR ("audio endpt register access not implemented.\n" ); +drm_err (adev_to_drm (adev),"audio endpt register access not implemented.\n" );return ;default :BUG ();
@@ -151,7 +151,7 @@ static uint32_t fw_type_convert(struct cgs_device *cgs_device, uint32_t fw_type) result =AMDGPU_UCODE_ID_STORAGE ;break ;default : -DRM_ERROR ("Firmware type not supported\n" ); +drm_err (adev_to_drm (adev),"Firmware type not supported\n" ); }return result; }
@@ -193,7 +193,7 @@ static uint16_t amdgpu_get_firmware_version(struct cgs_device *cgs_device,case CGS_UCODE_ID_STORAGE :break ;default : -DRM_ERROR ("firmware type %d do not have version\n" , type); +drm_err (adev_to_drm (adev),"firmware type %d do not have version\n" , type);break ; }return fw_version;
@@ -349,7 +349,7 @@ static int amdgpu_cgs_get_firmware_info(struct cgs_device *cgs_device,strscpy (fw_name,"amdgpu/vega20_smc.bin" );break ;default : -DRM_ERROR ("SMC firmware not supported\n" ); +drm_err (adev_to_drm (adev),"SMC firmware not supported\n" );return -EINVAL ; }
@@ -357,7 +357,7 @@ static int amdgpu_cgs_get_firmware_info(struct cgs_device *cgs_device,AMDGPU_UCODE_REQUIRED , "%s", fw_name);if (err) { -DRM_ERROR ("Failed to load firmware \"%s\"" , fw_name); +drm_err (adev_to_drm (adev),"Failed to load firmware \"%s\"" , fw_name);amdgpu_ucode_release (&adev->pm.fw);return err; }
@@ -402,7 +402,7 @@ struct cgs_device *amdgpu_cgs_create_device(struct amdgpu_device *adev)kmalloc (sizeof (*cgs_device),GFP_KERNEL );if (!cgs_device) { -DRM_ERROR ("Couldn't allocate CGS device structure\n" ); +drm_err (adev_to_drm (adev),"Couldn't allocate CGS device structure\n" );return NULL ; }
drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c +7 -7
@@ -100,7 +100,7 @@ void amdgpu_cper_entry_fill_hdr(struct amdgpu_device *adev, hdr->notify_type =MCE ;break ;default : -dev_err (adev->dev,"Unknown CPER Type\n" ); +drm_err (adev_to_drm (adev),"Unknown CPER Type\n" );break ; }
@@ -266,7 +266,7 @@ struct cper_hdr *amdgpu_cper_alloc_entry(struct amdgpu_device *adev, size += (BOOT_SEC_LEN * section_count);break ;default : -dev_err (adev->dev,"Unknown CPER Type!\n" ); +drm_err (adev_to_drm (adev),"Unknown CPER Type!\n" );return NULL ; }
@@ -290,7 +290,7 @@ int amdgpu_cper_generate_ue_record(struct amdgpu_device *adev, fatal =amdgpu_cper_alloc_entry (adev,AMDGPU_CPER_TYPE_FATAL ,1 );if (!fatal) { -dev_err (adev->dev,"fail to alloc cper entry for ue record\n" ); +drm_err (adev_to_drm (adev),"fail to alloc cper entry for ue record\n" );return -ENOMEM ; }
@@ -322,7 +322,7 @@ int amdgpu_cper_generate_bp_threshold_record(struct amdgpu_device *adev) bp_threshold =amdgpu_cper_alloc_entry (adev,AMDGPU_CPER_TYPE_BP_THRESHOLD ,1 );if (!bp_threshold) { -dev_err (adev->dev,"fail to alloc cper entry for bad page threshold record\n" ); +drm_err (adev_to_drm (adev),"fail to alloc cper entry for bad page threshold record\n" );return -ENOMEM ; }
@@ -348,7 +348,7 @@ static enum cper_error_severity amdgpu_aca_err_type_to_cper_sev(struct amdgpu_decase ACA_ERROR_TYPE_DEFERRED :return CPER_SEV_NON_FATAL_UNCORRECTED ;default : -dev_err (adev->dev,"Unknown ACA error type!\n" ); +drm_err (adev_to_drm (adev),"Unknown ACA error type!\n" );return CPER_SEV_FATAL ; } }
@@ -368,7 +368,7 @@ int amdgpu_cper_generate_ce_records(struct amdgpu_device *adev, corrected =amdgpu_cper_alloc_entry (adev,AMDGPU_CPER_TYPE_RUNTIME , bank_count);if (!corrected) { -dev_err (adev->dev,"fail to allocate cper entry for ce records\n" ); +drm_err (adev_to_drm (adev),"fail to allocate cper entry for ce records\n" );return -ENOMEM ; }
@@ -554,7 +554,7 @@ int amdgpu_cper_init(struct amdgpu_device *adev) r =amdgpu_cper_ring_init (adev);if (r) { -dev_err (adev->dev,"failed to initialize cper ring, r = %d\n" , r); +drm_err (adev_to_drm (adev),"failed to initialize cper ring, r = %d\n" , r);return r; }
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +8 -8
@@ -373,7 +373,7 @@ static int amdgpu_cs_p2_ib(struct amdgpu_cs_parser *p, chunk_ib->ib_bytes : 0, AMDGPU_IB_POOL_DELAYED, ib);if (r) { -DRM_ERROR ("Failed to get ib !\n" ); +drm_err (adev_to_drm (p->adev),"Failed to get ib !\n" );return r; }
@@ -445,7 +445,7 @@ static int amdgpu_syncobj_lookup_and_add(struct amdgpu_cs_parser *p, r =drm_syncobj_find_fence (p->filp, handle, point, flags, &fence);if (r) { -DRM_ERROR ("syncobj %u failed to find fence @ %llu (%d)!\n" , +drm_err (adev_to_drm (p->adev),"syncobj %u failed to find fence @ %llu (%d)!\n" , handle, point, r);return r; }
@@ -879,7 +879,7 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p,sizeof (struct page *), GFP_KERNEL);if (!e->user_pages) { -DRM_ERROR ("kvmalloc_array failure\n" ); +drm_err (adev_to_drm (p->adev),"kvmalloc_array failure\n" ); r = -ENOMEM ; goto out_free_user_pages; }
@@ -960,7 +960,7 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p, r =amdgpu_vm_validate (p->adev, &fpriv->vm,NULL , amdgpu_cs_bo_validate, p);if (r) { -DRM_ERROR ("amdgpu_vm_validate() failed.\n" ); +drm_err (adev_to_drm (p->adev),"amdgpu_vm_validate() failed.\n" ); goto out_free_user_pages; }
@@ -1038,13 +1038,13 @@ static int amdgpu_cs_patch_ibs(struct amdgpu_cs_parser *p, va_start = ib->gpu_addr &AMDGPU_GMC_HOLE_MASK ; r =amdgpu_cs_find_mapping (p, va_start, &aobj, &m);if (r) { -DRM_ERROR ("IB va_start is invalid\n" ); +drm_err (adev_to_drm (ring->adev),"IB va_start is invalid\n" );return r; }if ((va_start + ib->length_dw *4 ) > (m->last +1 ) *AMDGPU_GPU_PAGE_SIZE ) { -DRM_ERROR ("IB va_start+ib_bytes is invalid\n" ); +drm_err (adev_to_drm (ring->adev),"IB va_start+ib_bytes is invalid\n" );return -EINVAL ; }
@@ -1212,7 +1212,7 @@ static int amdgpu_cs_sync_rings(struct amdgpu_cs_parser *p) r =amdgpu_ctx_wait_prev_fence (p->ctx, p->entities[p->gang_leader_idx]);if (r) {if (r != -ERESTARTSYS ) -DRM_ERROR ("amdgpu_ctx_wait_prev_fence failed.\n" ); +drm_err (adev_to_drm (p->adev),"amdgpu_ctx_wait_prev_fence failed.\n" );return r; }
@@ -1440,7 +1440,7 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp) r =amdgpu_cs_parser_bos (&parser, data);if (r) {if (r == -ENOMEM ) -DRM_ERROR ("Not enough memory for command submission!\n" ); +drm_err (adev_to_drm (adev),"Not enough memory for command submission!\n" );else if (r != -ERESTARTSYS && r != -EAGAIN )DRM_DEBUG ("Failed to process the buffer list %d!\n" , r); goto error_fini;
drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c +4 -4
@@ -76,7 +76,7 @@ int amdgpu_map_static_csa(struct amdgpu_device *adev, struct amdgpu_vm *vm, r =drm_exec_lock_obj (&exec, &bo->tbo.base);drm_exec_retry_on_contention (&exec);if (unlikely (r)) { -DRM_ERROR ("failed to reserve CSA,PD BOs: err=%d\n" , r); +drm_err (adev_to_drm (adev),"failed to reserve CSA,PD BOs: err=%d\n" , r); goto error; } }
@@ -92,7 +92,7 @@ int amdgpu_map_static_csa(struct amdgpu_device *adev, struct amdgpu_vm *vm, AMDGPU_PTE_EXECUTABLE);if (r) { -DRM_ERROR ("failed to do bo_map on static CSA, err=%d\n" , r); +drm_err (adev_to_drm (adev),"failed to do bo_map on static CSA, err=%d\n" , r);amdgpu_vm_bo_del (adev, *bo_va); goto error; }
@@ -116,14 +116,14 @@ int amdgpu_unmap_static_csa(struct amdgpu_device *adev, struct amdgpu_vm *vm, r =drm_exec_lock_obj (&exec, &bo->tbo.base);drm_exec_retry_on_contention (&exec);if (unlikely (r)) { -DRM_ERROR ("failed to reserve CSA,PD BOs: err=%d\n" , r); +drm_err (adev_to_drm (adev),"failed to reserve CSA,PD BOs: err=%d\n" , r); goto error; } } r =amdgpu_vm_bo_unmap (adev, bo_va, csa_addr);if (r) { -DRM_ERROR ("failed to do bo_unmap on static CSA, err=%d\n" , r); +drm_err (adev_to_drm (adev),"failed to do bo_unmap on static CSA, err=%d\n" , r); goto error; }
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +7 -7
@@ -438,18 +438,18 @@ int amdgpu_ctx_get_entity(struct amdgpu_ctx *ctx, u32 hw_ip, u32 instance,struct drm_sched_entity *ctx_entity;if (hw_ip >=AMDGPU_HW_IP_NUM ) { -DRM_ERROR ("unknown HW IP type: %d\n" , hw_ip); +drm_err (adev_to_drm (ctx->mgr->adev),"unknown HW IP type: %d\n" , hw_ip);return -EINVAL ; }/* Right now all IPs have only one instance - multiple rings. */ if (instance !=0 ) { -DRM_DEBUG ("invalid ip instance: %d\n" , instance); +drm_dbg (adev_to_drm (ctx->mgr->adev),"invalid ip instance: %d\n" , instance);return -EINVAL ; }if (ring >= amdgpu_ctx_num_entities[hw_ip]) { -DRM_DEBUG ("invalid ring: %d %d\n" , hw_ip, ring); +drm_dbg (adev_to_drm (ctx->mgr->adev),"invalid ring: %d %d\n" , hw_ip, ring);return -EINVAL ; }
@@ -462,7 +462,7 @@ int amdgpu_ctx_get_entity(struct amdgpu_ctx *ctx, u32 hw_ip, u32 instance, ctx_entity = &ctx->entities[hw_ip][ring]->entity; r =drm_sched_entity_error (ctx_entity);if (r) { -DRM_DEBUG ("error entity %p\n" , ctx_entity); +drm_dbg (adev_to_drm (ctx->mgr->adev),"error entity %p\n" , ctx_entity);return r; }
@@ -874,7 +874,7 @@ int amdgpu_ctx_wait_prev_fence(struct amdgpu_ctx *ctx, r =dma_fence_wait (other, true);if (r <0 && r != -ERESTARTSYS ) -DRM_ERROR ("Error (%ld) waiting for fence!\n" , r); +drm_err (adev_to_drm (ctx->mgr->adev),"Error (%ld) waiting for fence!\n" , r);dma_fence_put (other);return r;
@@ -929,7 +929,7 @@ void amdgpu_ctx_mgr_entity_fini(struct amdgpu_ctx_mgr *mgr)idr_for_each_entry (idp, ctx, id) {if (kref_read (&ctx->refcount) !=1 ) { -DRM_ERROR ("ctx %p is still alive\n" , ctx); +drm_err (adev_to_drm (mgr->adev),"ctx %p is still alive\n" , ctx);continue ; }
@@ -959,7 +959,7 @@ void amdgpu_ctx_mgr_fini(struct amdgpu_ctx_mgr *mgr)idr_for_each_entry (idp, ctx, id) {if (kref_put (&ctx->refcount, amdgpu_ctx_fini) !=1 ) -DRM_ERROR ("ctx %p is still alive\n" , ctx); +drm_err (adev_to_drm (mgr->adev),"ctx %p is still alive\n" , ctx); }idr_destroy (&mgr->ctx_handles);
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +4 -4
@@ -1953,7 +1953,7 @@ static int amdgpu_debugfs_ib_preempt(void *data, u64 val)if (atomic_read (&ring->fence_drv.last_seq) != ring->fence_drv.sync_seq) { -DRM_INFO ("ring %d was preempted\n" , ring->idx); +drm_info (adev_to_drm (adev),"ring %d was preempted\n" , ring->idx);amdgpu_ib_preempt_mark_partial_job (ring);
@@ -2041,14 +2041,14 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev) ent =debugfs_create_file ("amdgpu_preempt_ib" ,0600 , root, adev, &fops_ib_preempt);if (IS_ERR (ent)) { -DRM_ERROR ("unable to create amdgpu_preempt_ib debugsfs file\n" ); +drm_err (adev_to_drm (adev),"unable to create amdgpu_preempt_ib debugsfs file\n" );return PTR_ERR (ent); } ent =debugfs_create_file ("amdgpu_force_sclk" ,0200 , root, adev, &fops_sclk_set);if (IS_ERR (ent)) { -DRM_ERROR ("unable to create amdgpu_set_sclk debugsfs file\n" ); +drm_err (adev_to_drm (adev),"unable to create amdgpu_set_sclk debugsfs file\n" );return PTR_ERR (ent); }
@@ -2061,7 +2061,7 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev) r =amdgpu_debugfs_regs_init (adev);if (r) -DRM_ERROR ("registering register debugfs failed (%d).\n" , r); +drm_err (adev_to_drm (adev),"registering register debugfs failed (%d).\n" , r);amdgpu_debugfs_firmware_init (adev);amdgpu_ta_if_debugfs_init (adev);
drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c +1 -1
@@ -336,7 +336,7 @@ void amdgpu_coredump(struct amdgpu_device *adev, bool skip_vram_check, coredump =kzalloc (sizeof (*coredump),GFP_NOWAIT );if (!coredump) { -DRM_ERROR ("%s: failed to allocate memory for coredump\n" , __func__); +drm_err (adev_to_drm (adev),"%s: failed to allocate memory for coredump\n" , __func__);return ; }
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +140 -139
1,042 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +51 -51
404 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +52 -29
176 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c +2 -2
@@ -351,7 +351,7 @@ amdgpu_dma_buf_move_notify(struct dma_buf_attachment *attach) r =ttm_bo_validate (&bo->tbo, &placement, &ctx);if (r) { -DRM_ERROR ("Failed to invalidate DMA-buf import (%d))\n" , r); +drm_err (adev_to_drm (adev),"Failed to invalidate DMA-buf import (%d))\n" , r);return ; }
@@ -385,7 +385,7 @@ amdgpu_dma_buf_move_notify(struct dma_buf_attachment *attach) r =amdgpu_vm_handle_moved (adev, vm, ticket);if (r && r != -EBUSY ) -DRM_ERROR ("Failed to invalidate VM page tables (%d))\n" , +drm_err (adev_to_drm (adev),"Failed to invalidate VM page tables (%d))\n" , r);dma_resv_unlock (resv);
drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c +5 -5
@@ -41,7 +41,7 @@ u32 amdgpu_mm_rdoorbell(struct amdgpu_device *adev, u32 index)if (index < adev->doorbell.num_kernel_doorbells)return readl (adev->doorbell.cpu_addr + index); -DRM_ERROR ("reading beyond doorbell aperture: 0x%08x!\n" , index); +drm_err (adev_to_drm (adev),"reading beyond doorbell aperture: 0x%08x!\n" , index);return 0 ; }
@@ -63,7 +63,7 @@ void amdgpu_mm_wdoorbell(struct amdgpu_device *adev, u32 index, u32 v)if (index < adev->doorbell.num_kernel_doorbells)writel (v, adev->doorbell.cpu_addr + index);else -DRM_ERROR ("writing beyond doorbell aperture: 0x%08x!\n" , index); +drm_err (adev_to_drm (adev),"writing beyond doorbell aperture: 0x%08x!\n" , index); }/**
@@ -83,7 +83,7 @@ u64 amdgpu_mm_rdoorbell64(struct amdgpu_device *adev, u32 index)if (index < adev->doorbell.num_kernel_doorbells)return atomic64_read ((atomic64_t *)(adev->doorbell.cpu_addr + index)); -DRM_ERROR ("reading beyond doorbell aperture: 0x%08x!\n" , index); +drm_err (adev_to_drm (adev),"reading beyond doorbell aperture: 0x%08x!\n" , index);return 0 ; }
@@ -105,7 +105,7 @@ void amdgpu_mm_wdoorbell64(struct amdgpu_device *adev, u32 index, u64 v)if (index < adev->doorbell.num_kernel_doorbells)atomic64_set ((atomic64_t *)(adev->doorbell.cpu_addr + index), v);else -DRM_ERROR ("writing beyond doorbell aperture: 0x%08x!\n" , index); +drm_err (adev_to_drm (adev),"writing beyond doorbell aperture: 0x%08x!\n" , index); }/**
@@ -166,7 +166,7 @@ int amdgpu_doorbell_create_kernel_doorbells(struct amdgpu_device *adev)NULL , (void **)&adev->doorbell.cpu_addr);if (r) { -DRM_ERROR ("Failed to allocate kernel doorbells, err=%d\n" , r); +drm_err (adev_to_drm (adev),"Failed to allocate kernel doorbells, err=%d\n" , r);return r; }
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +11 -10
@@ -2220,32 +2220,32 @@ static void amdgpu_get_secondary_funcs(struct amdgpu_device *adev)static void amdgpu_init_debug_options (struct amdgpu_device *adev) {if (amdgpu_debug_mask &AMDGPU_DEBUG_VM ) { -pr_info ("debug: VM handling debug enabled\n" ); +drm_info (adev_to_drm (adev),"debug: VM handling debug enabled\n" ); adev->debug_vm = true; }if (amdgpu_debug_mask &AMDGPU_DEBUG_LARGEBAR ) { -pr_info ("debug: enabled simulating large-bar capability on non-large bar system\n" ); +drm_info (adev_to_drm (adev),"debug: enabled simulating large-bar capability on non-large bar system\n" ); adev->debug_largebar = true; }if (amdgpu_debug_mask &AMDGPU_DEBUG_DISABLE_GPU_SOFT_RECOVERY ) { -pr_info ("debug: soft reset for GPU recovery disabled\n" ); +drm_info (adev_to_drm (adev),"debug: soft reset for GPU recovery disabled\n" ); adev->debug_disable_soft_recovery = true; }if (amdgpu_debug_mask &AMDGPU_DEBUG_USE_VRAM_FW_BUF ) { -pr_info ("debug: place fw in vram for frontdoor loading\n" ); +drm_info (adev_to_drm (adev),"debug: place fw in vram for frontdoor loading\n" ); adev->debug_use_vram_fw_buf = true; }if (amdgpu_debug_mask &AMDGPU_DEBUG_ENABLE_RAS_ACA ) { -pr_info ("debug: enable RAS ACA\n" ); +drm_info (adev_to_drm (adev),"debug: enable RAS ACA\n" ); adev->debug_enable_ras_aca = true; }if (amdgpu_debug_mask &AMDGPU_DEBUG_ENABLE_EXP_RESETS ) { -pr_info ("debug: enable experimental reset features\n" ); +drm_info (adev_to_drm (adev),"debug: enable experimental reset features\n" ); adev->debug_exp_resets = true; }
@@ -2304,7 +2304,8 @@ static int amdgpu_pci_probe(struct pci_dev *pdev, supports_atomic = true;if ((flags &AMD_EXP_HW_SUPPORT ) && !amdgpu_exp_hw_support) { -DRM_INFO ("This hardware requires experimental hardware support.\n" +dev_info (&pdev->dev, +"This hardware requires experimental hardware support.\n" "See modparam exp_hw_support\n" );return -ENODEV ; }
@@ -2391,7 +2392,7 @@ static int amdgpu_pci_probe(struct pci_dev *pdev, retry_init: ret =drm_dev_register (ddev, flags);if (ret == -EAGAIN && ++retry <=3 ) { -DRM_INFO ("retry init %d\n" , retry); +dev_info (&pdev->dev,"retry init %d\n" , retry);/* Don't request EX mode too frequently which is attacking */ msleep (5000 ); goto retry_init;
@@ -2426,7 +2427,7 @@ static int amdgpu_pci_probe(struct pci_dev *pdev, ret =amdgpu_debugfs_init (adev);if (ret) -DRM_ERROR ("Creating debugfs files failed (%d).\n" , ret); +drm_err (ddev,"Creating debugfs files failed (%d).\n" , ret);if (adev->pm.rpm_mode !=AMDGPU_RUNPM_NONE ) {/* only need to skip on ATPX */
@@ -2780,7 +2781,7 @@ static int amdgpu_pmops_runtime_suspend(struct device *dev)amdgpu_device_baco_enter (drm_dev); } -dev_dbg (&pdev->dev,"asic/device is runtime suspended\n" ); +drm_dbg (drm_dev,"asic/device is runtime suspended\n" );return 0 ; }
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +7 -7
@@ -152,19 +152,19 @@ int amdgpu_fru_get_product_info(struct amdgpu_device *adev) len =amdgpu_eeprom_read (adev->pm.fru_eeprom_i2c_bus, fru_addr, buf,sizeof (buf));if (len !=8 ) { -DRM_ERROR ("Couldn't read the IPMI Common Header: %d" , len); +drm_err (adev_to_drm (adev),"Couldn't read the IPMI Common Header: %d" , len);return len <0 ? len : -EIO ; }if (buf[0 ] !=1 ) { -DRM_ERROR ("Bad IPMI Common Header version: 0x%02x" , buf[0 ]); +drm_err (adev_to_drm (adev),"Bad IPMI Common Header version: 0x%02x" , buf[0 ]);return -EIO ; }for (csum =0 ; len >0 ; len--) csum += buf[len -1 ];if (csum) { -DRM_ERROR ("Bad IPMI Common Header checksum: 0x%02x" , csum); +drm_err (adev_to_drm (adev),"Bad IPMI Common Header checksum: 0x%02x" , csum);return -EIO ; }
@@ -179,12 +179,12 @@ int amdgpu_fru_get_product_info(struct amdgpu_device *adev)/* Read the header of the PIA. */ len =amdgpu_eeprom_read (adev->pm.fru_eeprom_i2c_bus, addr, buf,3 );if (len !=3 ) { -DRM_ERROR ("Couldn't read the Product Info Area header: %d" , len); +drm_err (adev_to_drm (adev),"Couldn't read the Product Info Area header: %d" , len);return len <0 ? len : -EIO ; }if (buf[0 ] !=1 ) { -DRM_ERROR ("Bad IPMI Product Info Area version: 0x%02x" , buf[0 ]); +drm_err (adev_to_drm (adev),"Bad IPMI Product Info Area version: 0x%02x" , buf[0 ]);return -EIO ; }
@@ -197,14 +197,14 @@ int amdgpu_fru_get_product_info(struct amdgpu_device *adev) len =amdgpu_eeprom_read (adev->pm.fru_eeprom_i2c_bus, addr, pia, size);if (len != size) {kfree (pia); -DRM_ERROR ("Couldn't read the Product Info Area: %d" , len); +drm_err (adev_to_drm (adev),"Couldn't read the Product Info Area: %d" , len);return len <0 ? len : -EIO ; }for (csum =0 ; size >0 ; size--) csum += pia[size -1 ];if (csum) { -DRM_ERROR ("Bad Product Info Area checksum: 0x%02x" , csum); +drm_err (adev_to_drm (adev),"Bad Product Info Area checksum: 0x%02x" , csum);kfree (pia);return -EIO ; }
drivers/gpu/drm/amd/amdgpu/amdgpu_fw_attestation.c +6 -5
@@ -62,17 +62,17 @@ static ssize_t amdgpu_fw_attestation_debugfs_read(struct file *f,struct FW_ATT_RECORD fw_att_record = {0 };if (size <sizeof (struct FW_ATT_RECORD )) { -DRM_WARN ("FW attestation input buffer not enough memory" ); +drm_warn (adev_to_drm (adev),"FW attestation input buffer not enough memory" );return -EINVAL ; }if ((*pos +sizeof (struct FW_ATT_DB_HEADER )) >=FW_ATTESTATION_MAX_SIZE ) { -DRM_WARN ("FW attestation out of bounds" ); +drm_warn (adev_to_drm (adev),"FW attestation out of bounds" );return 0 ; }if (psp_get_fw_attestation_records_addr (&adev->psp, &records_addr)) { -DRM_WARN ("Failed to get FW attestation record address" ); +drm_warn (adev_to_drm (adev),"Failed to get FW attestation record address" );return -EINVAL ; }
@@ -86,11 +86,12 @@ static ssize_t amdgpu_fw_attestation_debugfs_read(struct file *f, false);if (fw_att_hdr.AttDbCookie !=FW_ATTESTATION_DB_COOKIE ) { -DRM_WARN ("Invalid FW attestation cookie" ); +drm_warn (adev_to_drm (adev),"Invalid FW attestation cookie" );return -EINVAL ; } -DRM_INFO ("FW attestation version = 0x%X" , fw_att_hdr.AttDbVersion); +drm_info (adev_to_drm (adev), +"FW attestation version = 0x%X" , fw_att_hdr.AttDbVersion); } amdgpu_device_vram_access(adev,
drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c +4 -4
@@ -151,7 +151,7 @@ int amdgpu_gart_table_ram_alloc(struct amdgpu_device *adev)return -EFAULT ; } -dev_info (adev->dev,"%s dma_addr:%pad\n" , __func__, &dma_addr); +drm_info (adev_to_drm (adev),"%s dma_addr:%pad\n" , __func__, &dma_addr);/* Create SG table */ sg =kmalloc (sizeof (*sg),GFP_KERNEL );if (!sg) {
@@ -187,7 +187,7 @@ int amdgpu_gart_table_ram_alloc(struct amdgpu_device *adev) ret =amdgpu_bo_reserve (bo, true);if (ret) { -dev_err (adev->dev,"(%d) failed to reserve bo for GART system bo\n" , ret); +drm_err (adev_to_drm (adev),"(%d) failed to reserve bo for GART system bo\n" , ret); goto error; }
@@ -433,7 +433,7 @@ int amdgpu_gart_init(struct amdgpu_device *adev)/* We need PAGE_SIZE >= AMDGPU_GPU_PAGE_SIZE */ if (PAGE_SIZE <AMDGPU_GPU_PAGE_SIZE ) { -DRM_ERROR ("Page size is smaller than GPU page size!\n" ); +drm_err (adev_to_drm (adev),"Page size is smaller than GPU page size!\n" );return -EINVAL ; } r =amdgpu_gart_dummy_page_init (adev);
@@ -442,7 +442,7 @@ int amdgpu_gart_init(struct amdgpu_device *adev)/* Compute table size */ adev->gart.num_cpu_pages = adev->gmc.gart_size /PAGE_SIZE ; adev->gart.num_gpu_pages = adev->gmc.gart_size /AMDGPU_GPU_PAGE_SIZE ; -DRM_INFO ("GART: num cpu pages %u, num gpu pages %u\n" , +drm_info (adev_to_drm (adev),"GART: num cpu pages %u, num gpu pages %u\n" , adev->gart.num_cpu_pages, adev->gart.num_gpu_pages);return 0 ;
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +5 -5
@@ -324,9 +324,9 @@ static int amdgpu_gem_object_open(struct drm_gem_object *obj,if (r) {struct amdgpu_task_info *ti =amdgpu_vm_get_task_info_vm (vm); -dev_warn (adev->dev,"validate_and_fence failed: %d\n" , r); +drm_warn (adev_to_drm (adev),"validate_and_fence failed: %d\n" , r);if (ti) { -dev_warn (adev->dev,"pid %d\n" , ti->pid); +drm_warn (adev_to_drm (adev),"pid %d\n" , ti->pid);amdgpu_vm_put_task_info (ti); } }
@@ -375,7 +375,7 @@ static void amdgpu_gem_object_close(struct drm_gem_object *obj, r =amdgpu_vm_clear_freed (adev, vm, &fence);if (unlikely (r <0 )) -dev_err (adev->dev,"failed to clear page " +drm_err (adev_to_drm (adev),"failed to clear page " "tables on GEM object close (%ld)\n" , r);if (r || !fence) goto out_unlock;
@@ -385,7 +385,7 @@ static void amdgpu_gem_object_close(struct drm_gem_object *obj, out_unlock:if (r) -dev_err (adev->dev,"leaking bo va (%ld)\n" , r); +drm_err (adev_to_drm (adev),"leaking bo va (%ld)\n" , r);drm_exec_fini (&exec); }
@@ -469,7 +469,7 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,/* if gds bo is created from user space, it must be * passed to bo list */ -DRM_ERROR ("GDS bo cannot be per-vm-bo\n" ); +drm_err (adev_to_drm (adev),"GDS bo cannot be per-vm-bo\n" );return -EINVAL ; } flags |=AMDGPU_GEM_CREATE_NO_CPU_ACCESS ;
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +39 -35
274 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +29 -29
127 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_hdp.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +12 -12
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_mca.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +28 -28
56 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_mmhub.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +13 -13
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h +1 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_preempt_mgr.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +111 -111
222 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.c +9 -9
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c +10 -10
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +48 -48
96 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c +24 -24
48 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +8 -8
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c +17 -17
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.c +6 -6
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +29 -29
58 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +10 -10
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c +6 -6
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c +31 -31
62 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +21 -21
42 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +8 -8
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +18 -18
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c +11 -11
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c +27 -27
54 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +18 -18
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +20 -20
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +20 -20
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +19 -19
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +51 -51
102 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +62 -62
124 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/gfx_v11_0_3.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +44 -44
88 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +11 -11
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +11 -11
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +27 -27
54 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +40 -40
80 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/gfx_v9_4.c +13 -13
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c +30 -30
60 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +25 -25
50 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/gfxhub_v11_5_0.c +7 -7
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/gfxhub_v12_0.c +7 -7
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c +7 -7
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c +7 -7
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/gfxhub_v3_0.c +7 -7
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/gfxhub_v3_0_3.c +7 -7
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +16 -16
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c +13 -13
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +19 -19
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +24 -24
48 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/iceland_ih.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c +5 -5
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/lsdma_v6_0.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/lsdma_v7_0.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/mes_userqueue.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +24 -24
48 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/mes_v12_0.c +26 -26
52 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c +7 -7
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c +7 -7
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/mmhub_v3_0.c +7 -7
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_1.c +7 -7
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_2.c +7 -7
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/mmhub_v3_3.c +7 -7
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/mmhub_v4_1_0.c +7 -7
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/psp_v11_0.c +12 -12
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/psp_v11_0_8.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/psp_v13_0.c +13 -13
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/psp_v13_0_4.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/psp_v14_0.c +12 -12
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +11 -11
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c +7 -7
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c +12 -12
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c +12 -12
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/sienna_cichlid.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c +11 -11
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/smu_v13_0_10.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/umsch_mm_v4_0.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +12 -12
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c +10 -10
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c +10 -10
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c +17 -17
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c +9 -9
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c +8 -8
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c +8 -8
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c +5 -5
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdkfd/kfd_device.c +31 -29
60 lines not on this page · raw message
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +9 -9
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c +6 -6
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c +5 -5
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c +28 -28
56 lines not on this page · raw message
drivers/gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c +13 -13
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c +43 -43
86 lines not on this page · raw message
drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/pm/powerplay/hwmgr/common_baco.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/pm/powerplay/smumgr/smu10_smumgr.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/pm/powerplay/smumgr/smu7_smumgr.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/pm/powerplay/smumgr/smu9_smumgr.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/pm/powerplay/smumgr/vega20_smumgr.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +53 -53
106 lines not on this page · raw message
drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c +8 -8
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/pm/swsmu/smu12/smu_v12_0.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c +7 -7
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c +19 -16
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +35 -35
70 lines not on this page · raw message
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +7 -7
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c +51 -33
84 lines not on this page · raw message
drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c +27 -18
45 lines not on this page · raw message
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c +5 -5
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c +27 -27
54 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.43.0
Part of the diff is not shown here. View the raw message.
Re: [PATCH 02/14] drm/amd: Avoid showing an error about memory allocation in amdgpu_acpi_enumerate_xcc()
In reply to Lazar, LijoQuoted 12 lines · Lijo
Quoted 4 lines · Mario Limonciello
From: Mario Limonciello <[email protected]>
checkpatch.pl complains about unnecessary error messages for failing to allocate memory. These aren't needed when the return code is
-ENOMEM.It's not about the error code. It conveys till what stage driver proceeded and when the failure happened. I do see other instances in kernel which do give an error message with
-ENOMEM.
OK Thanks. I will change this to an ACPI handle message then (roll it into patch 1).
Quoted 27 lines
Thanks,
LijoQuoted 23 lines
Drop such a message from
amdgpu_acpi_enumerate_xcc().Signed-off-by Mario Limonciello <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +1
-3@@ -1116,10 +1116,8 @@ static int amdgpu_acpi_enumerate_xcc(void) xcc_info =kzalloc (sizeof (struct amdgpu_acpi_xcc_info ),GFP_KERNEL ); -if (!xcc_info) { -DRM_ERROR ("Failed to allocate memory for xcc info\n" ); +if (!xcc_info)return -ENOMEM ; - }INIT_LIST_HEAD (&xcc_info->list); xcc_info->handle =acpi_device_handle (acpi_dev);
Re: [PATCH 01/14] drm/amd: Use ACPI macros for amdgpu_acpi
In reply to Mario LimoncielloQuoted 8 lines · Mario Limonciello
From: Mario Limonciello <[email protected]>
Messages emitted from
amdgpu_acpiare not device specific nor DRM specific, but rather operate on ACPI handles. Adjust the messages to use ACPI macros instead.Signed-off-by Mario Limonciello <[email protected]>
Quoted 89 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +12
-11@@ -256,7 +256,7 @@ static int amdgpu_atif_verify_interface(struct amdgpu_atif *atif) size = *(u16 *) info->buffer.pointer;if (size <12 ) { -DRM_INFO ("ATIF buffer is too small: %zu\n" , size); +acpi_handle_info (atif->handle,"ATIF buffer is too small: %zu\n" , size); err = -EINVAL ; goto out; }@@ -265,7 +265,7 @@ static int amdgpu_atif_verify_interface(struct amdgpu_atif *atif)memcpy (&output, info->buffer.pointer, size);/* TODO: check version? */ -DRM_DEBUG_DRIVER ("ATIF version %u\n" , output.version); +acpi_handle_debug (atif->handle,"ATIF version %u\n" , output.version);amdgpu_atif_parse_notification (&atif->notifications, output.notification_mask);amdgpu_atif_parse_functions (&atif->functions, output.function_bits);@@ -616,7 +616,7 @@ static int amdgpu_atcs_verify_interface(struct amdgpu_atcs *atcs) size = *(u16 *) info->buffer.pointer;if (size <8 ) { -DRM_INFO ("ATCS buffer is too small: %zu\n" , size); +acpi_handle_info (atcs->handle,"ATCS buffer is too small: %zu\n" , size); err = -EINVAL ; goto out; }@@ -625,7 +625,7 @@ static int amdgpu_atcs_verify_interface(struct amdgpu_atcs *atcs)memcpy (&output, info->buffer.pointer, size);/* TODO: check version? */ -DRM_DEBUG_DRIVER ("ATCS version %u\n" , output.version); +acpi_handle_debug (atcs->handle,"ATCS version %u\n" , output.version);amdgpu_atcs_parse_functions (&atcs->functions, output.function_bits);@@ -741,7 +741,7 @@ int amdgpu_acpi_pcie_performance_request(struct amdgpu_device *adev, size = *(u16 *) info->buffer.pointer;if (size <3 ) { -DRM_INFO ("ATCS buffer is too small: %zu\n" , size); +acpi_handle_info (atcs->handle,"ATCS buffer is too small: %zu\n" , size);kfree (info);return -EINVAL ; }@@ -800,7 +800,7 @@ int amdgpu_acpi_power_shift_control(struct amdgpu_device *adev, info =amdgpu_atcs_call (atcs,ATCS_FUNCTION_POWER_SHIFT_CONTROL , ¶ms);if (!info) { -DRM_ERROR ("ATCS PSC update failed\n" ); +acpi_handle_err (atcs->handle,"ATCS PSC update failed\n" );return -EIO ; }@@ -1429,8 +1429,9 @@ void amdgpu_acpi_detect(void)if (atif->functions.system_params) { ret =amdgpu_atif_get_notification_params (atif);if (ret) { -DRM_DEBUG_DRIVER ("Call to GET_SYSTEM_PARAMS failed: %d\n" , - ret); +acpi_handle_debug (atif->handle, +"GET_SYSTEM_PARAMS evaluation failed: %d\n" , + ret);/* Disable notification */ atif->notification_cfg.enabled = false; }@@ -1439,8 +1440,9 @@ void amdgpu_acpi_detect(void)if (atif->functions.query_backlight_transfer_characteristics) { ret =amdgpu_atif_query_backlight_caps (atif);if (ret) { -DRM_DEBUG_DRIVER ("Call to QUERY_BACKLIGHT_TRANSFER_CHARACTERISTICS failed: %d\n" , - ret); +acpi_handle_debug (atif->handle, +"QUERY_BACKLIGHT_TRANSFER_CHARACTERISTICS evaluation failed: %d\n" , + ret); atif->backlight_caps.caps_valid = false; } }else { --2.43.0
Re: [PATCH 03/14] drm/amd: Convert dev_err_once() messages to drm_err_once()
In reply to Mario LimoncielloQuoted 5 lines · Mario Limonciello
From: Mario Limonciello <[email protected]>
The errors for power consumption in
amdgpu_acpi_is_s0ix_active()are under device scope. As they're drm errors, adjust to drm scope.
Is there an advantage to drm vs dev scope? I guess just consistency with core drm messages? I presume the drm variants also print device information so we can differentiate between multiple GPUs in a system?
That was why we transitioned from the DRM to the dev variants in the
first place.
Alex
Quoted 30 lines
Signed-off-by Mario Limonciello <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +2
-3@@ -1518,14 +1518,14 @@ bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev)* in that case. */ if (!(acpi_gbl_FADT.flags &ACPI_FADT_LOW_POWER_S0 )) { -dev_err_once (adev->dev, +drm_err_once (adev_to_drm (adev),"Power consumption will be higher as BIOS has not been configured for suspend-to-idle.\n" "To use suspend-to-idle change the sleep mode in BIOS setup.\n" );return false; }#if !IS_ENABLED (CONFIG_AMD_PMC ) -dev_err_once (adev->dev, +drm_err_once (adev_to_drm (adev),"Power consumption will be higher as the kernel has not been compiled with CONFIG_AMD_PMC.\n" );return false;#else --2.43.0
Re: [PATCH 03/14] drm/amd: Convert dev_err_once() messages to drm_err_once()
Quoted 7 lines · Alex Deucher
Quoted 5 lines · Mario Limonciello
From: Mario Limonciello <[email protected]>
The errors for power consumption in
amdgpu_acpi_is_s0ix_active()are under device scope. As they're drm errors, adjust to drm scope.
Quoted 8 lines
Is there an advantage to drm vs dev scope? I guess just consistency with core drm messages? I presume the drm variants also print device information so we can differentiate between multiple GPUs in a system?
That was why we transitioned from the DRM to the dev variants in the
first place.Alex
Yeah it's just consistency that you end up with a [drm] at the end of the dev_*() prefix for all messages. So you can easily find all drm core and amdgpu messages by grep'ing '[drm]'.
Quoted 30 lines
Quoted 30 lines
Signed-off-by Mario Limonciello <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +2
-3@@ -1518,14 +1518,14 @@ bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev)* in that case. */ if (!(acpi_gbl_FADT.flags &ACPI_FADT_LOW_POWER_S0 )) { -dev_err_once (adev->dev, +drm_err_once (adev_to_drm (adev),"Power consumption will be higher as BIOS has not been configured for suspend-to-idle.\n" "To use suspend-to-idle change the sleep mode in BIOS setup.\n" );return false; }#if !IS_ENABLED (CONFIG_AMD_PMC ) -dev_err_once (adev->dev, +drm_err_once (adev_to_drm (adev),"Power consumption will be higher as the kernel has not been compiled with CONFIG_AMD_PMC.\n" );return false;#else --2.43.0