Message handling improvements for amdgpu
Subsystems (5)
PATCH 2/9 drm/amdkfd: Correct the topology message for APUs
In reply to Mario Limonciello (AMD)At bootup on a Strix machine the following message comes up:
``` amdgpu: Topology: Add dGPU node [0x150e:0x1002] ```
This is an APU though. Clarify the messaging by only offer a "CPU node" or "GPU node" message. Also set the message as VID:DID instead which is how other messages work.
--- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_topology.c +5 -10
@@ -931,17 +931,12 @@ static void kfd_debug_print_topology(void) dev =list_last_entry (&topology_device_list, struct kfd_topology_device, list);if (dev) { -if (dev->node_props.cpu_cores_count && - dev->node_props.simd_count) { -pr_info ("Topology: Add APU node [0x%0x:0x%0x]\n" , - dev->node_props.device_id, - dev->node_props.vendor_id); - }else if (dev->node_props.cpu_cores_count) +if (dev->node_props.cpu_cores_count)pr_info ("Topology: Add CPU node\n" ); -else if (dev->node_props.simd_count) -pr_info ("Topology: Add dGPU node [0x%0x:0x%0x]\n" , - dev->node_props.device_id, - dev->node_props.vendor_id); +else +pr_info ("Topology: Add GPU node [0x%0x:0x%0x]\n" , + dev->node_props.vendor_id, + dev->node_props.device_id); }up_read (&topology_lock); }
Signature · 1 line
2.43.0
cover Message handling improvements for amdgpu
I noticed a lot of inconsistency in message handling.
* sometimes two amdgpu prints in a message
* sometimes no prints in a message
* some messages are device specific, others aren't
This series improves a lot of the cases that I've found to:
1. print no more than one time
2. include the device whenever possible.
Mario Limonciello (AMD) (9):
drm/amd: Drop "amdgpu kernel modesetting enabled" message drm/amdkfd: Correct the topology message for APUs drm/amd: Add correct prefix for VBIOS message drm/amd: Pass adev to amdgpu_gfx_parse_disable_cu() drm/amd: Drop dev_fmt prefix
drm/amd/display: Fix DPMS log printing
drm/amd: Convert amdgpu_display from DRM_* to drm_ macros drm/amd: Drop amdgpu prefix from message prints drm/amd: Convert DRM_*() to drm_*()
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 6 - drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 9 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 7 +- .../gpu/drm/amd/amdgpu/amdgpu_connectors.c | 34 ++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 12 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 14 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 12 +- .../gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 5 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 40 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5 +- .../drm/amd/amdgpu/amdgpu_fw_attestation.c | 11 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 14 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 10 +- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 9 +- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 7 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c | 2 +- drivers/gpu/drm/amd/amdgpu/atom.c | 2 +- .../gpu/drm/amd/amdgpu/atombios_encoders.c | 6 +- drivers/gpu/drm/amd/amdgpu/cik.c | 8 +- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 16 +-- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 14 +-- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 12 +- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 8 +- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 18 +-- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 25 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 6 +- drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/gmc_v12_0.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 | 4 +- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 14 +-- drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c | 4 +- drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/psp_v12_0.c | 6 +- drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 6 +- drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 8 +- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 10 +- drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 8 +- drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 10 +- drivers/gpu/drm/amd/amdgpu/si.c | 8 +- drivers/gpu/drm/amd/amdgpu/si_dma.c | 2 +- drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c | 8 +- drivers/gpu/drm/amd/amdgpu/umc_v6_1.c | 9 +- drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c | 8 +- drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 4 +- drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 6 +- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 16 +-- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 10 +- drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 6 +- drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 8 +- drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 6 +- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 15 +-- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 4 +- .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 2 +- .../amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 8 +- .../gpu/drm/amd/display/dc/link/link_dpms.c | 114 +++++------------- .../link/protocols/link_edp_panel_control.c | 9 +- drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 20 +-- drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 5 +- .../gpu/drm/amd/pm/powerplay/amd_powerplay.c | 7 +- 81 files changed, 352 insertions(+), 383 deletions(-)
Signature · 1 line
2.43.0
PATCH 1/9 drm/amd: Drop "amdgpu kernel modesetting enabled" message
The behavior for amdgpu was changed with commit e00e5c223878 ("drm/amdgpu: adjust drm_firmware_drivers_only() handling") to potentially allow loading even if nomodeset was set, so the message is no longer accurate.
Just drop it to avoid confusion.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0 -1
@@ -3165,7 +3165,6 @@ static int __init amdgpu_init(void)if (r) goto error_fence; -DRM_INFO ("amdgpu kernel modesetting enabled.\n" );amdgpu_register_atpx_handler ();amdgpu_acpi_detect ();
Signature · 1 line
2.43.0
PATCH 7/9 drm/amd: Convert amdgpu_display from DRM_* to drm_ macros
In reply to Mario Limonciello (AMD)drm_* macros show the device they were called with which is helpful in multi-GPU systems.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 40 ++++++++++----------- 1 file changed, 20 insertions(+), 20 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +20 -20
@@ -417,15 +417,15 @@ void amdgpu_display_print_display_setup(struct drm_device *dev)int i =0 ;drm_connector_list_iter_begin (dev, &iter); -DRM_INFO ("AMDGPU Display Connectors\n" ); +drm_info (dev,"AMDGPU Display Connectors\n" );drm_for_each_connector_iter (connector, &iter) { amdgpu_connector =to_amdgpu_connector (connector); -DRM_INFO ("Connector %d:\n" , i); -DRM_INFO (" %s\n" , connector->name); +drm_info (dev,"Connector %d:\n" , i); +drm_info (dev," %s\n" , connector->name);if (amdgpu_connector->hpd.hpd !=AMDGPU_HPD_NONE ) -DRM_INFO (" %s\n" , hpd_names[amdgpu_connector->hpd.hpd]); +drm_info (dev," %s\n" , hpd_names[amdgpu_connector->hpd.hpd]);if (amdgpu_connector->ddc_bus) { - DRM_INFO(" DDC: 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x\n", + drm_info(dev, " DDC: 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x\n", amdgpu_connector->ddc_bus->rec.mask_clk_reg, amdgpu_connector->ddc_bus->rec.mask_data_reg, amdgpu_connector->ddc_bus->rec.a_clk_reg,
@@ -435,11 +435,11 @@ void amdgpu_display_print_display_setup(struct drm_device *dev) amdgpu_connector->ddc_bus->rec.y_clk_reg, amdgpu_connector->ddc_bus->rec.y_data_reg);if (amdgpu_connector->router.ddc_valid) -DRM_INFO (" DDC Router 0x%x/0x%x\n" , +drm_info (dev," DDC Router 0x%x/0x%x\n" , amdgpu_connector->router.ddc_mux_control_pin, amdgpu_connector->router.ddc_mux_state);if (amdgpu_connector->router.cd_valid) -DRM_INFO (" Clock/Data Router 0x%x/0x%x\n" , +drm_info (dev," Clock/Data Router 0x%x/0x%x\n" , amdgpu_connector->router.cd_mux_control_pin, amdgpu_connector->router.cd_mux_state); }else {
@@ -449,35 +449,35 @@ void amdgpu_display_print_display_setup(struct drm_device *dev) connector->connector_type == DRM_MODE_CONNECTOR_DVIA || connector->connector_type == DRM_MODE_CONNECTOR_HDMIA || connector->connector_type == DRM_MODE_CONNECTOR_HDMIB) -DRM_INFO (" DDC: no ddc bus - possible BIOS bug - please report to [email protected]\n" ); +drm_info (dev," DDC: no ddc bus - possible BIOS bug - please report to [email protected]\n" ); } -DRM_INFO (" Encoders:\n" ); +drm_info (dev," Encoders:\n" );list_for_each_entry (encoder, &dev->mode_config.encoder_list, head) { amdgpu_encoder =to_amdgpu_encoder (encoder); devices = amdgpu_encoder->devices & amdgpu_connector->devices;if (devices) {if (devices &ATOM_DEVICE_CRT1_SUPPORT ) -DRM_INFO (" CRT1: %s\n" , encoder_names[amdgpu_encoder->encoder_id]); +drm_info (dev," CRT1: %s\n" , encoder_names[amdgpu_encoder->encoder_id]);if (devices &ATOM_DEVICE_CRT2_SUPPORT ) -DRM_INFO (" CRT2: %s\n" , encoder_names[amdgpu_encoder->encoder_id]); +drm_info (dev," CRT2: %s\n" , encoder_names[amdgpu_encoder->encoder_id]);if (devices &ATOM_DEVICE_LCD1_SUPPORT ) -DRM_INFO (" LCD1: %s\n" , encoder_names[amdgpu_encoder->encoder_id]); +drm_info (dev," LCD1: %s\n" , encoder_names[amdgpu_encoder->encoder_id]);if (devices &ATOM_DEVICE_DFP1_SUPPORT ) -DRM_INFO (" DFP1: %s\n" , encoder_names[amdgpu_encoder->encoder_id]); +drm_info (dev," DFP1: %s\n" , encoder_names[amdgpu_encoder->encoder_id]);if (devices &ATOM_DEVICE_DFP2_SUPPORT ) -DRM_INFO (" DFP2: %s\n" , encoder_names[amdgpu_encoder->encoder_id]); +drm_info (dev," DFP2: %s\n" , encoder_names[amdgpu_encoder->encoder_id]);if (devices &ATOM_DEVICE_DFP3_SUPPORT ) -DRM_INFO (" DFP3: %s\n" , encoder_names[amdgpu_encoder->encoder_id]); +drm_info (dev," DFP3: %s\n" , encoder_names[amdgpu_encoder->encoder_id]);if (devices &ATOM_DEVICE_DFP4_SUPPORT ) -DRM_INFO (" DFP4: %s\n" , encoder_names[amdgpu_encoder->encoder_id]); +drm_info (dev," DFP4: %s\n" , encoder_names[amdgpu_encoder->encoder_id]);if (devices &ATOM_DEVICE_DFP5_SUPPORT ) -DRM_INFO (" DFP5: %s\n" , encoder_names[amdgpu_encoder->encoder_id]); +drm_info (dev," DFP5: %s\n" , encoder_names[amdgpu_encoder->encoder_id]);if (devices &ATOM_DEVICE_DFP6_SUPPORT ) -DRM_INFO (" DFP6: %s\n" , encoder_names[amdgpu_encoder->encoder_id]); +drm_info (dev," DFP6: %s\n" , encoder_names[amdgpu_encoder->encoder_id]);if (devices &ATOM_DEVICE_TV1_SUPPORT ) -DRM_INFO (" TV1: %s\n" , encoder_names[amdgpu_encoder->encoder_id]); +drm_info (dev," TV1: %s\n" , encoder_names[amdgpu_encoder->encoder_id]);if (devices &ATOM_DEVICE_CV_SUPPORT ) -DRM_INFO (" CV: %s\n" , encoder_names[amdgpu_encoder->encoder_id]); +drm_info (dev," CV: %s\n" , encoder_names[amdgpu_encoder->encoder_id]); } } i++;
Signature · 1 line
2.43.0
PATCH 4/9 drm/amd: Pass `adev` to amdgpu_gfx_parse_disable_cu()
In reply to Mario Limonciello (AMD)In order for messages to be attribute to the correct device amdgpu_gfx_parse_disable_cu() needs to know what device is being operated on. Pass the argument in.
--- 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
@@ -100,6 +100,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 pointer * @mask: array in which the per-shader array disable masks will be stored * @max_se: number of SEs * @max_sh: number of SHs
@@ -107,7 +108,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
@@ -569,8 +569,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
@@ -10114,7 +10114,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
@@ -7472,7 +7472,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
@@ -5728,7 +5728,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
@@ -3555,7 +3555,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
@@ -5063,7 +5063,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
@@ -7084,7 +7084,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
@@ -7762,7 +7762,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
@@ -4903,7 +4903,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/9 drm/amd: Drop dev_fmt prefix
In reply to Mario Limonciello (AMD)The amdgpu: prefix in dev_fmt() isn't needed because the core already includes the driver in the print.
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 6 ------ 1 file changed, 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +0 -6
@@ -34,12 +34,6 @@#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>
Signature · 1 line
2.43.0
PATCH 3/9 drm/amd: Add correct prefix for VBIOS message
In reply to Mario Limonciello (AMD)It's not obvious which GPU the ATOM BIOS message goes with. Use drm_info() to show the correct one.
--- drivers/gpu/drm/amd/amdgpu/atom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/atom.c +1 -1
@@ -1463,7 +1463,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)
Signature · 1 line
2.43.0
PATCH 9/9 drm/amd: Convert DRM_*() to drm_*()
In reply to Mario Limonciello (AMD)The drm_*() macros include the device which is helpful for debugging issues in multi-GPU systems.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 9 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 7 ++-- .../gpu/drm/amd/amdgpu/amdgpu_connectors.c | 34 ++++++++++++------- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 12 ++++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 14 +++++--- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 12 ++++--- .../gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 5 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 +-- .../drm/amd/amdgpu/amdgpu_fw_attestation.c | 11 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 4 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 10 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 7 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 4 ++- .../gpu/drm/amd/amdgpu/atombios_encoders.c | 6 ++-- drivers/gpu/drm/amd/amdgpu/cik.c | 8 ++--- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 4 +-- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 4 +-- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 4 +-- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 8 ++--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 15 ++++---- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 4 +-- drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 2 +- 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 | 4 +-- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 12 +++---- drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c | 4 ++- drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/psp_v12_0.c | 6 ++-- drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 6 ++-- drivers/gpu/drm/amd/amdgpu/si.c | 8 ++--- drivers/gpu/drm/amd/amdgpu/si_dma.c | 2 +- drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c | 8 +++-- drivers/gpu/drm/amd/amdgpu/umc_v6_1.c | 9 ++--- drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 4 +-- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 14 ++++---- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 8 ++--- drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 6 ++-- drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 8 ++--- drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 6 ++-- .../drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 4 ++- .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 2 +- .../amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 8 +++-- .../link/protocols/link_edp_panel_control.c | 9 +++-- drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 20 +++++------ drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 5 ++- .../gpu/drm/amd/pm/powerplay/amd_powerplay.c | 7 ++-- 61 files changed, 210 insertions(+), 177 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +4 -5
@@ -745,7 +745,8 @@ 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); +drm_info (adev_to_drm (adev), +"ATCS buffer is too small: %zu\n" , size);kfree (info);return -EINVAL ; }
@@ -804,7 +805,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" ); +drm_err (adev_to_drm (adev),"ATCS PSC call failed\n" );return -EIO ; }
@@ -1121,10 +1122,8 @@ 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);
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +1 -1
@@ -683,7 +683,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),"failed to schedule IB.\n" ); goto err_ib_sched; }
drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c +4 -3
@@ -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,8 @@ 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\"\n" , fw_name);amdgpu_ucode_release (&adev->pm.fw);return err; }
@@ -402,7 +403,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_connectors.c +22 -12
@@ -879,8 +879,9 @@ 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" , - connector->name); +drm_err (connector->dev, +"%s: probed a monitor but no|invalid EDID\n" , + connector->name); ret = connector_status_connected; }else { amdgpu_connector->use_digital =
@@ -1060,7 +1061,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 */
@@ -1675,7 +1676,8 @@ 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) {
@@ -1689,7 +1691,8 @@ 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) {
@@ -1783,7 +1786,8 @@ 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; }
@@ -1808,7 +1812,8 @@ 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; }
@@ -1838,7 +1843,8 @@ 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; }
@@ -1894,7 +1900,8 @@ 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; }
@@ -1945,7 +1952,8 @@ 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,
@@ -1993,7 +2001,8 @@ 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), +"eDP: Failed to assign ddc bus! Check dmesg for i2c errors.\n" ); } } drm_connector_init_with_ddc(dev, &amdgpu_connector->base,
@@ -2016,7 +2025,8 @@ 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; }
drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c +8 -4
@@ -76,7 +76,8 @@ 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 +93,8 @@ int amdgpu_map_static_csa(struct amdgpu_device *adev, struct amdgpu_vm *vm, AMDGPU_VM_PAGE_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 +118,16 @@ 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 +9 -5
@@ -438,18 +438,21 @@ 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 ; }
@@ -874,7 +877,8 @@ 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), +"AMDGPU: Error waiting for fence in ctx %p\n" , ctx);dma_fence_put (other);return r;
@@ -929,7 +933,7 @@ static 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 ; }
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +7 -5
@@ -1945,7 +1945,7 @@ static int amdgpu_debugfs_ib_preempt(void *data, u64 val)/* preempt the IB */ r =amdgpu_ring_preempt_ib (ring);if (r) { -DRM_WARN ("failed to preempt ring %d\n" , ring->idx); +drm_warn (adev_to_drm (adev),"failed to preempt ring %d\n" , ring->idx); goto failure; }
@@ -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,16 @@ 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 +2063,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 -4
@@ -334,11 +334,8 @@ void amdgpu_coredump(struct amdgpu_device *adev, bool skip_vram_check,struct drm_sched_job *s_job; coredump =kzalloc (sizeof (*coredump),GFP_NOWAIT ); - -if (!coredump) { -DRM_ERROR ("%s: failed to allocate memory for coredump\n" , __func__); +if (!coredump)return ; - } coredump->skip_vram_check = skip_vram_check; coredump->reset_vram_lost = vram_lost;
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
@@ -6548,7 +6548,7 @@ static int amdgpu_device_sched_resume(struct list_head *device_list, !amdgpu_ras_eeprom_check_err_threshold(tmp_adev))dev_info ( tmp_adev->dev, -"GPU reset(%d) failed with error %d \n" , +"GPU reset(%d) failed with error %d\n" ,atomic_read ( &tmp_adev->gpu_reset_counter), tmp_adev->asic_reset_res);
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -2
@@ -2402,7 +2402,7 @@ 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" +drm_info (adev_to_drm (adev),"This hardware requires experimental hardware support.\n" "See modparam exp_hw_support\n" );return -ENODEV ; }
@@ -2449,7 +2449,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); +drm_info (adev_to_drm (adev),"retry init %d\n" , retry);/* Don't request EX mode too frequently which is attacking */ msleep (5000 ); goto retry_init;
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 +1 -1
@@ -476,7 +476,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_gfx.c +2 -2
@@ -125,7 +125,7 @@ void amdgpu_gfx_parse_disable_cu(struct amdgpu_device *adev, unsigned int *mask,int ret =sscanf (p,"%u.%u.%u" , &se, &sh, &cu);if (ret <3 ) { -DRM_ERROR ("amdgpu: could not parse disable_cu\n" ); +drm_err (adev_to_drm (adev),"could not parse disable_cu\n" );return ; }
@@ -134,7 +134,7 @@ void amdgpu_gfx_parse_disable_cu(struct amdgpu_device *adev, unsigned int *mask, mask[se * max_sh + sh] |=1u << cu; }else {drm_err (adev_to_drm (adev),"disable_cu %u.%u.%u is out of range\n" , - se, sh, cu); + se, sh, cu); } next =strchr (p,',' );
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +6 -4
@@ -92,7 +92,7 @@ void amdgpu_driver_unload_kms(struct drm_device *dev)return ;if (amdgpu_acpi_smart_shift_update (adev,AMDGPU_SS_DRV_UNLOAD )) -DRM_WARN ("smart shift update failed\n" ); +drm_warn (dev,"smart shift update failed\n" );amdgpu_acpi_fini (adev);amdgpu_device_fini_hw (adev);
@@ -105,7 +105,7 @@ void amdgpu_register_gpu_instance(struct amdgpu_device *adev)mutex_lock (&mgpu_info.mutex);if (mgpu_info.num_gpu >=MAX_GPU_INSTANCE ) { -DRM_ERROR ("Cannot register more gpu instance\n" ); +drm_err (adev_to_drm (adev),"Cannot register more gpu instance\n" );mutex_unlock (&mgpu_info.mutex);return ; }
@@ -162,7 +162,7 @@ int amdgpu_driver_load_kms(struct amdgpu_device *adev, unsigned long flags)dev_dbg (dev->dev,"Error during ACPI methods call\n" );if (amdgpu_acpi_smart_shift_update (adev,AMDGPU_SS_DRV_LOAD )) -DRM_WARN ("smart shift update failed\n" ); +drm_warn (dev,"smart shift update failed\n" ); out:if (r)
@@ -1476,7 +1476,9 @@ int amdgpu_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv) r =amdgpu_userq_mgr_init (&fpriv->userq_mgr, file_priv, adev);if (r) -DRM_WARN ("Can't setup usermode queues, use legacy workload submission only\n" ); +drm_warn (adev_to_drm (adev), +"Failed to init usermode queue manager (%d), use legacy workload submission only\n" , + r); r =amdgpu_eviction_fence_init (&fpriv->evf_mgr);if (r)
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +2 -2
@@ -1081,10 +1081,10 @@ int amdgpu_bo_init(struct amdgpu_device *adev) adev->gmc.aper_size); } -DRM_INFO ("Detected VRAM RAM=%lluM, BAR=%lluM\n" , +drm_info (adev_to_drm (adev),"Detected VRAM RAM=%lluM, BAR=%lluM\n" , adev->gmc.mc_vram_size >>20 , (unsigned long long )adev->gmc.aper_size >>20 ); -DRM_INFO ("RAM width %dbits %s\n" , +drm_info (adev_to_drm (adev),"RAM width %dbits %s\n" , adev->gmc.vram_width, amdgpu_vram_names[adev->gmc.vram_type]);return amdgpu_ttm_init (adev); }
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2 -2
@@ -4418,10 +4418,10 @@ static int amdgpu_persistent_edc_harvesting(struct amdgpu_device *adev,return 0 ;if (amdgpu_ras_query_error_status (adev, &info) !=0 ) -DRM_WARN ("RAS init harvest failure" ); +drm_warn (adev_to_drm (adev),"RAS init query failure" );if (amdgpu_ras_reset_error_status (adev, ras_block->block) !=0 ) -DRM_WARN ("RAS init harvest reset failure" ); +drm_warn (adev_to_drm (adev),"RAS init harvest reset failure" );return 0 ; }
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +2 -1
@@ -2197,7 +2197,8 @@ int amdgpu_ttm_init(struct amdgpu_device *adev) AMDGPU_GEM_DOMAIN_GTT, &adev->mman.sdma_access_bo, NULL, &adev->mman.sdma_access_ptr)) -DRM_WARN ("Debug VRAM access will use slowpath MM access\n" ); +drm_warn (adev_to_drm (adev), +"Debug VRAM access will use slowpath MM access\n" );return 0 ; }
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c +4 -3
@@ -279,7 +279,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev) version_major = (le32_to_cpu (hdr->ucode_version) >>24 ) &0xff ; version_minor = (le32_to_cpu (hdr->ucode_version) >>8 ) &0xff ; -DRM_INFO ("Found UVD firmware Version: %u.%u Family ID: %u\n" , +drm_info (adev_to_drm (adev),"Found UVD firmware Version: %u.%u Family ID: %u\n" , version_major, version_minor, family_id);/*
@@ -306,7 +306,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev) dec_minor = (le32_to_cpu (hdr->ucode_version) >>8 ) &0xff ; enc_minor = (le32_to_cpu (hdr->ucode_version) >>24 ) &0x3f ; enc_major = (le32_to_cpu (hdr->ucode_version) >>30 ) &0x3 ; -DRM_INFO ("Found UVD firmware ENC: %u.%u DEC: .%u Family ID: %u\n" , +drm_info (adev_to_drm (adev),"Found UVD firmware ENC: %u.%u DEC: .%u Family ID: %u\n" , enc_major, enc_minor, dec_minor, family_id); adev->uvd.max_handles =AMDGPU_MAX_UVD_HANDLES ;
@@ -467,7 +467,8 @@ int amdgpu_uvd_prepare_suspend(struct amdgpu_device *adev)int amdgpu_uvd_suspend (struct amdgpu_device *adev) {if (amdgpu_ras_intr_triggered ()) -DRM_WARN ("UVD VCPU state may lost due to RAS ERREVENT_ATHUB_INTERRUPT\n" ); +drm_warn (adev_to_drm (adev), +"UVD VCPU state may lost due to RAS ERREVENT_ATHUB_INTERRUPT\n" );return 0 ; }
drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c +3 -1
@@ -53,7 +53,9 @@ static enum hrtimer_restart amdgpu_vkms_vblank_simulate(struct hrtimer *timer) ret_overrun =hrtimer_forward_now (&amdgpu_crtc->vblank_timer, output->period_ns);if (ret_overrun !=1 ) -DRM_WARN ("%s: vblank timer overrun\n" , __func__); +drm_warn (amdgpu_crtc->base.dev, +"%s: vblank timer overrun count: %llu\n" , + __func__, ret_overrun); ret =drm_crtc_handle_vblank (crtc);/* Don't queue timer again when vblank is disabled. */
drivers/gpu/drm/amd/amdgpu/atombios_encoders.c +3 -3
@@ -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 (adev_to_drm (adev),"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),"ATOM LVDS backlight unloaded\n" ); } }
@@ -1724,7 +1724,7 @@ amdgpu_atombios_encoder_dac_detect(struct drm_encoder *encoder,uint32_t bios_0_scratch;if (!amdgpu_atombios_encoder_dac_load_detect (encoder, connector)) { -DRM_DEBUG_KMS ("detect returned false \n" ); +DRM_DEBUG_KMS ("detect returned false\n" );return connector_status_unknown; }
drivers/gpu/drm/amd/amdgpu/cik.c +4 -4
@@ -1552,16 +1552,16 @@ static void cik_pcie_gen3_enable(struct amdgpu_device *adev)PCIE_LC_SPEED_CNTL__LC_CURRENT_DATA_RATE__SHIFT ;if (adev->pm.pcie_gen_mask &CAIL_PCIE_LINK_SPEED_SUPPORT_GEN3 ) {if (current_data_rate ==2 ) { -DRM_INFO ("PCIE gen 3 link speeds already enabled\n" ); +drm_info (adev_to_drm (adev),"PCIE gen 3 link speeds already enabled\n" );return ; } -DRM_INFO ("enabling PCIE gen 3 link speeds, disable with amdgpu.pcie_gen2=0\n" ); +drm_info (adev_to_drm (adev),"enabling PCIE gen 3 link speeds, disable with amdgpu.pcie_gen2=0\n" ); }else if (adev->pm.pcie_gen_mask &CAIL_PCIE_LINK_SPEED_SUPPORT_GEN2 ) {if (current_data_rate ==1 ) { -DRM_INFO ("PCIE gen 2 link speeds already enabled\n" ); +drm_info (adev_to_drm (adev),"PCIE gen 2 link speeds already enabled\n" );return ; } -DRM_INFO ("enabling PCIE gen 2 link speeds, disable with amdgpu.pcie_gen2=0\n" ); +drm_info (adev_to_drm (adev),"enabling PCIE gen 2 link speeds, disable with amdgpu.pcie_gen2=0\n" ); }if (!pci_is_pcie (root) || !pci_is_pcie (adev->pdev))
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +2 -2
@@ -4170,7 +4170,7 @@ static void gfx_v10_0_check_fw_write_wait(struct amdgpu_device *adev) }if (!adev->gfx.cp_fw_write_wait) -DRM_WARN_ONCE ("CP firmware version too old, please update!" ); +drm_warn_once (adev_to_drm (adev),"CP firmware version too old, please update!" ); }static bool gfx_v10_0_navi10_gfxoff_should_enable (struct amdgpu_device *adev)
@@ -9385,7 +9385,7 @@ static int gfx_v10_0_bad_op_irq(struct amdgpu_device *adev, struct amdgpu_irq_src *source, struct amdgpu_iv_entry *entry) { - DRM_ERROR("Illegal opcode in command stream \n"); + DRM_ERROR("Illegal opcode in command stream\n");gfx_v10_0_handle_priv_fault (adev, entry);return 0 ; }
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +2 -2
@@ -4789,7 +4789,7 @@ static int gfx_v11_0_hw_init(struct amdgpu_ip_block *ip_block) adev->gfx.is_poweron = true;if (get_gb_addr_config (adev)) -DRM_WARN ("Invalid gb_addr_config !\n" ); +drm_warn (adev_to_drm (adev),"Invalid gb_addr_config !\n" );if (adev->firmware.load_type ==AMDGPU_FW_LOAD_PSP && adev->gfx.rs64_enable)
@@ -6659,7 +6659,7 @@ static int gfx_v11_0_bad_op_irq(struct amdgpu_device *adev, struct amdgpu_irq_src *source, struct amdgpu_iv_entry *entry) { - DRM_ERROR("Illegal opcode in command stream \n"); + DRM_ERROR("Illegal opcode in command stream\n");gfx_v11_0_handle_priv_fault (adev, entry);return 0 ; }
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +2 -2
@@ -3657,7 +3657,7 @@ static int gfx_v12_0_hw_init(struct amdgpu_ip_block *ip_block) adev->gfx.is_poweron = true;if (get_gb_addr_config (adev)) -DRM_WARN ("Invalid gb_addr_config !\n" ); +drm_warn (adev_to_drm (adev),"Invalid gb_addr_config !\n" );if (adev->firmware.load_type ==AMDGPU_FW_LOAD_PSP )gfx_v12_0_config_gfx_rs64 (adev);
@@ -5046,7 +5046,7 @@ static int gfx_v12_0_bad_op_irq(struct amdgpu_device *adev, struct amdgpu_irq_src *source, struct amdgpu_iv_entry *entry) { - DRM_ERROR("Illegal opcode in command stream \n"); + DRM_ERROR("Illegal opcode in command stream\n");gfx_v12_0_handle_priv_fault (adev, entry);return 0 ; }
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +1 -1
@@ -3002,7 +3002,7 @@ static void gfx_v6_0_read_wave_sgprs(struct amdgpu_device *adev, uint32_t xcc_idstatic void gfx_v6_0_select_me_pipe_q (struct amdgpu_device *adev,u32 me,u32 pipe,u32 q,u32 vm,u32 xcc_id) { -DRM_INFO ("Not implemented\n" ); +drm_info (adev_to_drm (adev),"Not implemented\n" ); }static const struct amdgpu_gfx_funcs gfx_v6_0_gfx_funcs = {
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +4 -4
@@ -1048,7 +1048,7 @@ static int gfx_v8_0_init_microcode(struct amdgpu_device *adev)if (adev->gfx.ce_feature_version >=46 && adev->gfx.pfp_feature_version >=46 ) { adev->virt.chained_ib_support = true; -DRM_INFO ("Chained IB support enabled!\n" ); +drm_info (adev_to_drm (adev),"Chained IB support enabled!\n" ); }else adev->virt.chained_ib_support = false;
@@ -3820,7 +3820,7 @@ static void gfx_v8_0_wait_for_rlc_serdes(struct amdgpu_device *adev)gfx_v8_0_select_se_sh (adev,0xffffffff ,0xffffffff ,0xffffffff ,0 );mutex_unlock (&adev->grbm_idx_mutex); -DRM_INFO ("Timeout wait for RLC serdes %u,%u\n" , +drm_info (adev_to_drm (adev),"Timeout wait for RLC serdes %u,%u\n" , i, j);return ; }
@@ -6669,7 +6669,7 @@ static void gfx_v8_0_parse_sq_irq(struct amdgpu_device *adev, unsigned ih_data,switch (enc) {case 0 : -DRM_INFO ("SQ general purpose intr detected:" +drm_info (adev_to_drm (adev),"SQ general purpose intr detected:" "se_id %d, immed_overflow %d, host_reg_overflow %d," "host_cmd_overflow %d, cmd_timestamp %d," "reg_timestamp %d, thread_trace_buff_full %d,"
@@ -6711,7 +6711,7 @@ static void gfx_v8_0_parse_sq_irq(struct amdgpu_device *adev, unsigned ih_data,else sprintf (type,"EDC/ECC error" ); - DRM_INFO( + drm_info(adev_to_drm(adev), "SQ %s detected: " "se_id %d, sh_id %d, cu_id %d, simd_id %d, wave_id %d, vm_id %d " "trap %s, sq_ed_info.source %s.\n",
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +8 -7
@@ -1301,7 +1301,8 @@ static void gfx_v9_0_check_fw_write_wait(struct amdgpu_device *adev) (adev->gfx.mec_feature_version < 46) || (adev->gfx.pfp_fw_version < 0x000000b7) || (adev->gfx.pfp_feature_version < 46))) -DRM_WARN_ONCE ("CP firmware version too old, please update!" ); +drm_warn_once (adev_to_drm (adev), +"CP firmware version too old, please update!" );switch (amdgpu_ip_version (adev,GC_HWIP ,0 )) {case IP_VERSION (9 ,0 ,1 ):
@@ -2040,7 +2041,7 @@ static int gfx_v9_0_gpu_early_init(struct amdgpu_device *adev) adev->gfx.config.sc_hiz_tile_fifo_size =0x30 ; adev->gfx.config.sc_earlyz_tile_fifo_size =0x4C0 ; gb_addr_config =VEGA12_GB_ADDR_CONFIG_GOLDEN ; -DRM_INFO ("fix gfx.config for vega12\n" ); +drm_info (adev_to_drm (adev),"fix gfx.config for vega12\n" );break ;case IP_VERSION (9 ,4 ,0 ): adev->gfx.ras = &gfx_v9_0_ras;
@@ -2728,7 +2729,7 @@ static void gfx_v9_0_wait_for_rlc_serdes(struct amdgpu_device *adev)amdgpu_gfx_select_se_sh (adev,0xffffffff ,0xffffffff ,0xffffffff ,0 );mutex_unlock (&adev->grbm_idx_mutex); -DRM_INFO ("Timeout wait for RLC serdes %u,%u\n" , +drm_info (adev_to_drm (adev),"Timeout wait for RLC serdes %u,%u\n" , i, j);return ; }
@@ -3151,7 +3152,7 @@ static void gfx_v9_0_rlc_start(struct amdgpu_device *adev)/* RLC_GPM_GENERAL_6 : RLC Ucode version */ rlc_ucode_ver =RREG32_SOC15 (GC ,0 , mmRLC_GPM_GENERAL_6);if (rlc_ucode_ver ==0x108 ) { -DRM_INFO ("Using rlc debug ucode. mmRLC_GPM_GENERAL_6 ==0x08%x / fw_ver == %i \n" , +drm_info (adev_to_drm (adev),"Using rlc debug ucode. mmRLC_GPM_GENERAL_6 ==0x08%x / fw_ver == %i\n" , rlc_ucode_ver, adev->gfx.rlc_fw_version);/* RLC_GPM_TIMER_INT_3 : Timer interval in RefCLK cycles, * default is 0x9C4 to create a 100us interval */
@@ -3334,12 +3335,12 @@ static int gfx_v9_0_cp_gfx_start(struct amdgpu_device *adev)*/ if (adev->flags &AMD_IS_APU && adev->in_s3 && !pm_resume_via_firmware ()) { -DRM_INFO ("Will skip the CSB packet resubmit\n" ); +drm_info (adev_to_drm (adev),"Will skip the CSB packet resubmit\n" );return 0 ; } r =amdgpu_ring_alloc (ring,gfx_v9_0_get_csb_size (adev) +4 +3 );if (r) { -DRM_ERROR ("amdgpu: cp failed to lock ring (%d).\n" , r); +drm_err (adev_to_drm (adev),"cp failed to lock ring (%d).\n" , r);return r; }
@@ -5734,7 +5735,7 @@ static int gfx_v9_0_ring_preempt_ib(struct amdgpu_ring *ring)if (i >= adev->usec_timeout) { r = -EINVAL ; -DRM_WARN ("ring %d timeout to preempt ib\n" , ring->idx); +drm_warn (adev_to_drm (adev),"ring %d timeout to preempt ib\n" , ring->idx); }/*reset the CP_VMID_PREEMPT after trailing fence*/
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +2 -2
@@ -1482,7 +1482,7 @@ static void gfx_v9_4_3_xcc_wait_for_rlc_serdes(struct amdgpu_device *adev,0xffffffff , 0xffffffff, xcc_id);mutex_unlock (&adev->grbm_idx_mutex); -DRM_INFO ("Timeout wait for RLC serdes %u,%u\n" , +drm_info (adev_to_drm (adev),"Timeout wait for RLC serdes %u,%u\n" , i, j);return ; }
@@ -1583,7 +1583,7 @@ static void gfx_v9_4_3_rlc_start(struct amdgpu_device *adev) rlc_ucode_ver =RREG32_SOC15 (GC ,GET_INST (GC , i), regRLC_GPM_GENERAL_6);if (rlc_ucode_ver ==0x108 ) {dev_info (adev->dev, -"Using rlc debug ucode. regRLC_GPM_GENERAL_6 ==0x08%x / fw_ver == %i \n" , +"Using rlc debug ucode. regRLC_GPM_GENERAL_6 ==0x08%x / fw_ver == %i\n" , rlc_ucode_ver, adev->gfx.rlc_fw_version);/* RLC_GPM_TIMER_INT_3 : Timer interval in RefCLK cycles, * default is 0x9C4 to create a 100us interval */
drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c +1 -1
@@ -649,7 +649,7 @@ static void gfxhub_v2_1_halt(struct amdgpu_device *adev) }if (!time) -DRM_WARN ("failed to wait for GRBM(EA) idle\n" ); +drm_warn (adev_to_drm (adev),"failed to wait for GRBM(EA) idle\n" ); }const struct amdgpu_gfxhub_funcs gfxhub_v2_1_funcs = {
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +1 -1
@@ -957,7 +957,7 @@ static int gmc_v10_0_gart_enable(struct amdgpu_device *adev)if (!adev->in_s0ix)gmc_v10_0_flush_gpu_tlb (adev,0 ,AMDGPU_GFXHUB (0 ),0 ); -DRM_INFO ("PCIE GART of %uM enabled (table at 0x%016llX).\n" , +drm_info (adev_to_drm (adev),"PCIE GART of %uM enabled (table at 0x%016llX).\n" , (unsigned int )(adev->gmc.gart_size >>20 ), (unsigned long long )amdgpu_bo_gpu_offset (adev->gart.bo));
drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c +1 -1
@@ -922,7 +922,7 @@ static int gmc_v11_0_gart_enable(struct amdgpu_device *adev) adev->mmhub.funcs->set_fault_enable_default (adev, value);gmc_v11_0_flush_gpu_tlb (adev,0 ,AMDGPU_MMHUB0 (0 ),0 ); -DRM_INFO ("PCIE GART of %uM enabled (table at 0x%016llX).\n" , +drm_info (adev_to_drm (adev),"PCIE GART of %uM enabled (table at 0x%016llX).\n" , (unsigned int )(adev->gmc.gart_size >>20 ), (unsigned long long )amdgpu_bo_gpu_offset (adev->gart.bo));
drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c +1 -1
@@ -976,7 +976,7 @@ static int gmc_v12_0_gart_enable(struct amdgpu_device *adev) adev->mmhub.funcs->set_fault_enable_default (adev, value);gmc_v12_0_flush_gpu_tlb (adev,0 ,AMDGPU_MMHUB0 (0 ),0 ); -dev_info (adev->dev,"PCIE GART of %uM enabled (table at 0x%016llX).\n" , +drm_info (adev_to_drm (adev),"PCIE GART of %uM enabled (table at 0x%016llX).\n" , (unsigned )(adev->gmc.gart_size >>20 ), (unsigned long long )amdgpu_bo_gpu_offset (adev->gart.bo));
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +1 -1
@@ -555,7 +555,7 @@ static int gmc_v6_0_gart_enable(struct amdgpu_device *adev)gmc_v6_0_set_fault_enable_default (adev, true);gmc_v6_0_flush_gpu_tlb (adev,0 ,0 ,0 ); -dev_info (adev->dev,"PCIE GART of %uM enabled (table at 0x%016llX).\n" , +drm_info (adev_to_drm (adev),"PCIE GART of %uM enabled (table at 0x%016llX).\n" , (unsigned int )(adev->gmc.gart_size >>20 ), (unsigned long long )table_addr);return 0 ;
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c +1 -1
@@ -705,7 +705,7 @@ static int gmc_v7_0_gart_enable(struct amdgpu_device *adev) }gmc_v7_0_flush_gpu_tlb (adev,0 ,0 ,0 ); -DRM_INFO ("PCIE GART of %uM enabled (table at 0x%016llX).\n" , +drm_info (adev_to_drm (adev),"PCIE GART of %uM enabled (table at 0x%016llX).\n" , (unsigned int )(adev->gmc.gart_size >>20 ), (unsigned long long )table_addr);return 0 ;
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +2 -2
@@ -560,7 +560,7 @@ static int gmc_v8_0_mc_init(struct amdgpu_device *adev) tmp =RREG32 (mmCONFIG_MEMSIZE);/* some boards may have garbage in the upper 16 bits */ if (tmp &0xffff0000 ) { -DRM_INFO ("Probable bad vram size: 0x%08x\n" , tmp); +drm_info (adev_to_drm (adev),"Probably bad vram size: 0x%08x\n" , tmp);if (tmp &0xffff ) tmp &=0xffff ; }
@@ -939,7 +939,7 @@ static int gmc_v8_0_gart_enable(struct amdgpu_device *adev)gmc_v8_0_set_fault_enable_default (adev, true);gmc_v8_0_flush_gpu_tlb (adev,0 ,0 ,0 ); -DRM_INFO ("PCIE GART of %uM enabled (table at 0x%016llX).\n" , +drm_info (adev_to_drm (adev),"PCIE GART of %uM enabled (table at 0x%016llX).\n" , (unsigned int )(adev->gmc.gart_size >>20 ), (unsigned long long )table_addr);return 0 ;
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +6 -6
@@ -1137,13 +1137,13 @@ static void gmc_v9_0_get_coherence_flags(struct amdgpu_device *adev,*/ mtype_local =MTYPE_RW ;if (amdgpu_mtype_local ==1 ) { -DRM_INFO_ONCE ("Using MTYPE_NC for local memory\n" ); +drm_info_once (adev_to_drm (adev),"Using MTYPE_NC for local memory\n" ); mtype_local =MTYPE_NC ; }else if (amdgpu_mtype_local ==2 ) { -DRM_INFO_ONCE ("Using MTYPE_CC for local memory\n" ); +drm_info_once (adev_to_drm (adev),"Using MTYPE_CC for local memory\n" ); mtype_local =MTYPE_CC ; }else { -DRM_INFO_ONCE ("Using MTYPE_RW for local memory\n" ); +drm_info_once (adev_to_drm (adev),"Using MTYPE_RW for local memory\n" ); } is_local = (!is_vram && (adev->flags &AMD_IS_APU ) && num_possible_nodes() <= 1) ||
@@ -2131,12 +2131,12 @@ static int gmc_v9_0_gart_enable(struct amdgpu_device *adev)if (r)return r; -DRM_INFO ("PCIE GART of %uM enabled.\n" , +drm_info (adev_to_drm (adev),"PCIE GART of %uM enabled.\n" , (unsigned int )(adev->gmc.gart_size >>20 ));if (adev->gmc.pdb0_bo) -DRM_INFO ("PDB0 located at 0x%016llX\n" , +drm_info (adev_to_drm (adev),"PDB0 located at 0x%016llX\n" , (unsigned long long )amdgpu_bo_gpu_offset (adev->gmc.pdb0_bo)); -DRM_INFO ("PTB located at 0x%016llX\n" , +drm_info (adev_to_drm (adev),"PTB located at 0x%016llX\n" , (unsigned long long )amdgpu_bo_gpu_offset (adev->gart.bo));return 0 ;
drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c +1 -1
@@ -240,7 +240,7 @@ static int jpeg_v2_0_disable_power_gating(struct amdgpu_device *adev) UVD_PGFSM_STATUS__UVDJ_PWR_STATUS_MASK);if (r) { -DRM_ERROR ("amdgpu: JPEG disable power gating failed\n" ); +drm_err (adev_to_drm (adev),"failed to disable JPEG power gating\n" );return r; } }
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +1 -1
@@ -660,7 +660,7 @@ static int mes_v11_0_misc_op(struct amdgpu_mes *mes,break ;default : -DRM_ERROR ("unsupported misc op (%d) \n" , input->op); +drm_err (adev_to_drm (mes->adev),"unsupported misc op (%d)\n" , input->op);return -EINVAL ; }
drivers/gpu/drm/amd/amdgpu/mes_v12_0.c +1 -1
@@ -699,7 +699,7 @@ static int mes_v12_0_misc_op(struct amdgpu_mes *mes,break ;default : -DRM_ERROR ("unsupported misc op (%d) \n" , input->op); +DRM_ERROR ("unsupported misc op (%d)\n" , input->op);return -EINVAL ; }
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c +3 -1
@@ -96,7 +96,9 @@ static int xgpu_nv_poll_ack(struct amdgpu_device *adev) timeout -=5 ; }while (timeout >1 ); -dev_err (adev->dev,"Doesn't get TRN_MSG_ACK from pf in %d msec \n" ,NV_MAILBOX_POLL_ACK_TIMEDOUT ); +dev_err (adev->dev, +"Doesn't get TRN_MSG_ACK from pf in %d msec\n" , +NV_MAILBOX_POLL_ACK_TIMEDOUT );return -ETIME ; }
drivers/gpu/drm/amd/amdgpu/psp_v10_0.c +1 -1
@@ -140,7 +140,7 @@ static int psp_v10_0_ring_destroy(struct psp_context *psp,static int psp_v10_0_mode1_reset (struct psp_context *psp) { -DRM_INFO ("psp mode 1 reset not supported now! \n" ); +drm_info (adev_to_drm (psp->adev),"psp mode 1 reset not supported now!\n" );return -EINVAL ; }
drivers/gpu/drm/amd/amdgpu/psp_v11_0.c +1 -1
@@ -412,7 +412,7 @@ static int psp_v11_0_mode1_reset(struct psp_context *psp) MBOX_TOS_READY_MASK, 0);if (ret) { -DRM_INFO ("psp is not working correctly before mode1 reset!\n" ); +drm_info (adev_to_drm (adev),"psp is not working correctly before mode1 reset!\n" );return -EINVAL ; }
drivers/gpu/drm/amd/amdgpu/psp_v12_0.c +3 -3
@@ -225,7 +225,7 @@ static int psp_v12_0_mode1_reset(struct psp_context *psp) MBOX_TOS_READY_MASK, 0);if (ret) { -DRM_INFO ("psp is not working correctly before mode1 reset!\n" ); +drm_info (adev_to_drm (adev),"psp is not working correctly before mode1 reset!\n" );return -EINVAL ; }
@@ -240,11 +240,11 @@ static int psp_v12_0_mode1_reset(struct psp_context *psp) 0);if (ret) { -DRM_INFO ("psp mode 1 reset failed!\n" ); +drm_info (adev_to_drm (adev),"psp mode 1 reset failed!\n" );return -EINVAL ; } -DRM_INFO ("psp mode1 reset succeed \n" ); +drm_info (adev_to_drm (adev),"psp mode1 reset succeed\n" );return 0 ; }
drivers/gpu/drm/amd/amdgpu/psp_v3_1.c +3 -3
@@ -315,7 +315,7 @@ static int psp_v3_1_mode1_reset(struct psp_context *psp) ret =psp_wait_for (psp, offset,0x80000000 ,0x8000FFFF ,0 );if (ret) { -DRM_INFO ("psp is not working correctly before mode1 reset!\n" ); +drm_info (adev_to_drm (adev),"psp is not working correctly before mode1 reset!\n" );return -EINVAL ; }
@@ -329,11 +329,11 @@ static int psp_v3_1_mode1_reset(struct psp_context *psp) ret =psp_wait_for (psp, offset,0x80000000 ,0x80000000 ,0 );if (ret) { -DRM_INFO ("psp mode 1 reset failed!\n" ); +drm_info (adev_to_drm (adev),"psp mode 1 reset failed!\n" );return -EINVAL ; } -DRM_INFO ("psp mode1 reset succeed \n" ); +drm_info (adev_to_drm (adev),"psp mode1 reset succeed\n" );return 0 ; }
drivers/gpu/drm/amd/amdgpu/si.c +4 -4
@@ -2255,16 +2255,16 @@ static void si_pcie_gen3_enable(struct amdgpu_device *adev)PCIE_LC_SPEED_CNTL__LC_CURRENT_DATA_RATE__SHIFT ;if (adev->pm.pcie_gen_mask &CAIL_PCIE_LINK_SPEED_SUPPORT_GEN3 ) {if (current_data_rate ==2 ) { -DRM_INFO ("PCIE gen 3 link speeds already enabled\n" ); +drm_info (adev_to_drm (adev),"PCIE gen 3 link speeds already enabled\n" );return ; } -DRM_INFO ("enabling PCIE gen 3 link speeds, disable with amdgpu.pcie_gen2=0\n" ); +drm_info (adev_to_drm (adev),"enabling PCIE gen 3 link speeds, disable with amdgpu.pcie_gen2=0\n" ); }else if (adev->pm.pcie_gen_mask &CAIL_PCIE_LINK_SPEED_SUPPORT_GEN2 ) {if (current_data_rate ==1 ) { -DRM_INFO ("PCIE gen 2 link speeds already enabled\n" ); +drm_info (adev_to_drm (adev),"PCIE gen 2 link speeds already enabled\n" );return ; } -DRM_INFO ("enabling PCIE gen 2 link speeds, disable with amdgpu.pcie_gen2=0\n" ); +drm_info (adev_to_drm (adev),"enabling PCIE gen 2 link speeds, disable with amdgpu.pcie_gen2=0\n" ); }if (!pci_is_pcie (root) || !pci_is_pcie (adev->pdev))
drivers/gpu/drm/amd/amdgpu/si_dma.c +1 -1
@@ -584,7 +584,7 @@ static int si_dma_wait_for_idle(struct amdgpu_ip_block *ip_block)static int si_dma_soft_reset (struct amdgpu_ip_block *ip_block) { -DRM_INFO ("si_dma_soft_reset --- not implemented !!!!!!!\n" ); +drm_info (adev_to_drm (ip_block->adev),"si_dma_soft_reset --- not implemented !!!!!!!\n" );return 0 ; }
drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c +5 -3
@@ -196,7 +196,9 @@ static uint32_t smu_v11_0_i2c_poll_tx_status(struct i2c_adapter *control)if (REG_GET_FIELD (reg,CKSVII2C_IC_INTR_STAT ,R_TX_ABRT ) ==1 ) { reg_c_tx_abrt_source =RREG32_SOC15 (SMUIO ,0 , mmCKSVII2C_IC_TX_ABRT_SOURCE); -DRM_INFO ("TX was terminated, IC_TX_ABRT_SOURCE val is:%x" , reg_c_tx_abrt_source); +drm_info (adev_to_drm (adev), +"TX was terminated, IC_TX_ABRT_SOURCE val is:%x" , + reg_c_tx_abrt_source);/* Check for stop due to NACK */ if (REG_GET_FIELD(reg_c_tx_abrt_source,
@@ -769,7 +771,7 @@ bool smu_v11_0_i2c_test_bus(struct i2c_adapter *control)uint8_t data[6 ] = {0xf ,0 ,0xde ,0xad ,0xbe ,0xef }; -DRM_INFO ("Begin" ); +drm_info (adev_to_drm (adev),"Begin" );if (!smu_v11_0_i2c_bus_lock (control)) {DRM_ERROR ("Failed to lock the bus!." );
@@ -788,7 +790,7 @@ bool smu_v11_0_i2c_test_bus(struct i2c_adapter *control)smu_v11_0_i2c_bus_unlock (control); -DRM_INFO ("End" ); +drm_info (adev_to_drm (adev),"End" ); return true; }#endif
drivers/gpu/drm/amd/amdgpu/umc_v6_1.c +5 -4
@@ -267,7 +267,8 @@ static void umc_v6_1_query_ras_error_count(struct amdgpu_device *adev,if ((adev->asic_type ==CHIP_ARCTURUS ) &&amdgpu_dpm_set_df_cstate (adev,DF_CSTATE_DISALLOW )) -DRM_WARN ("Fail to disable DF-Cstate.\n" ); +drm_warn (adev_to_drm (adev), +"Fail to disable DF-Cstate.\n" ); LOOP_UMC_INST_AND_CH(umc_inst, ch_inst) { umc_reg_offset = get_umc_6_reg_offset(adev,
@@ -284,7 +285,7 @@ static void umc_v6_1_query_ras_error_count(struct amdgpu_device *adev,if ((adev->asic_type ==CHIP_ARCTURUS ) &&amdgpu_dpm_set_df_cstate (adev,DF_CSTATE_ALLOW )) -DRM_WARN ("Fail to enable DF-Cstate\n" ); +drm_warn (adev_to_drm (adev),"Fail to enable DF-Cstate\n" );if (rsmu_umc_index_state)umc_v6_1_enable_umc_index_mode (adev);
@@ -366,7 +367,7 @@ static void umc_v6_1_query_ras_error_address(struct amdgpu_device *adev,if ((adev->asic_type ==CHIP_ARCTURUS ) &&amdgpu_dpm_set_df_cstate (adev,DF_CSTATE_DISALLOW )) -DRM_WARN ("Fail to disable DF-Cstate.\n" ); +drm_warn (adev_to_drm (adev),"Fail to disable DF-Cstate.\n" ); LOOP_UMC_INST_AND_CH(umc_inst, ch_inst) { umc_reg_offset = get_umc_6_reg_offset(adev,
@@ -382,7 +383,7 @@ static void umc_v6_1_query_ras_error_address(struct amdgpu_device *adev,if ((adev->asic_type ==CHIP_ARCTURUS ) &&amdgpu_dpm_set_df_cstate (adev,DF_CSTATE_ALLOW )) -DRM_WARN ("Fail to enable DF-Cstate\n" ); +drm_warn (adev_to_drm (adev),"Fail to enable DF-Cstate\n" );if (rsmu_umc_index_state)umc_v6_1_enable_umc_index_mode (adev);
drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c +2 -2
@@ -191,7 +191,7 @@ static int uvd_v5_0_hw_init(struct amdgpu_ip_block *ip_block) done:if (!r) -DRM_INFO ("UVD initialized successfully.\n" ); +drm_info (adev_to_drm (adev),"UVD initialized successfully.\n" );return r;
@@ -846,7 +846,7 @@ static void uvd_v5_0_get_clockgating_state(struct amdgpu_ip_block *ip_block, u64if (RREG32_SMC (ixCURRENT_PG_STATUS) &CURRENT_PG_STATUS__UVD_PG_STATUS_MASK ) { -DRM_INFO ("Cannot get clockgating state when UVD is powergated.\n" ); +drm_info (adev_to_drm (adev),"Cannot get clockgating state when UVD is powergated.\n" ); goto out; }
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +7 -7
@@ -408,7 +408,7 @@ static int uvd_v6_0_sw_init(struct amdgpu_ip_block *ip_block) adev->uvd.inst->irq.num_types =1 ; adev->uvd.num_enc_rings =0 ; -DRM_INFO ("UVD ENC is disabled\n" ); +drm_info (adev_to_drm (adev),"UVD ENC is disabled\n" ); } ring = &adev->uvd.inst->ring;
@@ -515,9 +515,9 @@ static int uvd_v6_0_hw_init(struct amdgpu_ip_block *ip_block) done:if (!r) {if (uvd_v6_0_enc_support (adev)) -DRM_INFO ("UVD and UVD ENC initialized successfully.\n" ); +drm_info (adev_to_drm (adev),"UVD and UVD ENC initialized successfully.\n" );else -DRM_INFO ("UVD initialized successfully.\n" ); +drm_info (adev_to_drm (adev),"UVD initialized successfully.\n" ); }return r;
@@ -1513,7 +1513,7 @@ static void uvd_v6_0_get_clockgating_state(struct amdgpu_ip_block *ip_block, u64 data =RREG32_SMC (ixCURRENT_PG_STATUS);if (data &CURRENT_PG_STATUS__UVD_PG_STATUS_MASK ) { -DRM_INFO ("Cannot get clockgating state when UVD is powergated.\n" ); +drm_info (adev_to_drm (adev),"Cannot get clockgating state when UVD is powergated.\n" ); goto out; }
@@ -1633,10 +1633,10 @@ static void uvd_v6_0_set_ring_funcs(struct amdgpu_device *adev) {if (adev->asic_type >=CHIP_POLARIS10 ) { adev->uvd.inst->ring.funcs = &uvd_v6_0_ring_vm_funcs; -DRM_INFO ("UVD is enabled in VM mode\n" ); +drm_info (adev_to_drm (adev),"UVD is enabled in VM mode\n" ); }else { adev->uvd.inst->ring.funcs = &uvd_v6_0_ring_phys_funcs; -DRM_INFO ("UVD is enabled in physical mode\n" ); +drm_info (adev_to_drm (adev),"UVD is enabled in physical mode\n" ); } }
@@ -1647,7 +1647,7 @@ static void uvd_v6_0_set_enc_ring_funcs(struct amdgpu_device *adev)for (i =0 ; i < adev->uvd.num_enc_rings; ++i) adev->uvd.inst->ring_enc[i].funcs = &uvd_v6_0_enc_ring_vm_funcs; -DRM_INFO ("UVD ENC is enabled in VM mode\n" ); +drm_info (adev_to_drm (adev),"UVD ENC is enabled in VM mode\n" ); }static const struct amdgpu_irq_src_funcs uvd_v6_0_irq_funcs = {
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c +4 -4
@@ -438,7 +438,7 @@ static int uvd_v7_0_sw_init(struct amdgpu_ip_block *ip_block) adev->firmware.fw_size +=ALIGN (le32_to_cpu (hdr->ucode_size_bytes),PAGE_SIZE ); } -DRM_INFO ("PSP loading UVD firmware\n" ); +drm_info (adev_to_drm (adev),"PSP loading UVD firmware\n" ); }for (j =0 ; j < adev->uvd.num_uvd_inst; j++) {
@@ -582,7 +582,7 @@ static int uvd_v7_0_hw_init(struct amdgpu_ip_block *ip_block) } done:if (!r) -DRM_INFO ("UVD and UVD ENC initialized successfully.\n" ); +drm_info (adev_to_drm (adev),"UVD and UVD ENC initialized successfully.\n" );return r; }
@@ -1606,7 +1606,7 @@ static void uvd_v7_0_set_ring_funcs(struct amdgpu_device *adev)continue ; adev->uvd.inst[i].ring.funcs = &uvd_v7_0_ring_vm_funcs; adev->uvd.inst[i].ring.me = i; -DRM_INFO ("UVD(%d) is enabled in VM mode\n" , i); +drm_info (adev_to_drm (adev),"UVD(%d) is enabled in VM mode\n" , i); } }
@@ -1622,7 +1622,7 @@ static void uvd_v7_0_set_enc_ring_funcs(struct amdgpu_device *adev) adev->uvd.inst[j].ring_enc[i].me = j; } -DRM_INFO ("UVD(%d) ENC is enabled in VM mode\n" , j); +drm_info (adev_to_drm (adev),"UVD(%d) ENC is enabled in VM mode\n" , j); } }
drivers/gpu/drm/amd/amdgpu/vce_v2_0.c +3 -3
@@ -280,7 +280,7 @@ static int vce_v2_0_stop(struct amdgpu_device *adev)if (vce_v2_0_lmi_clean (adev)) { -DRM_INFO ("VCE is not idle \n" ); +drm_info (adev_to_drm (adev),"VCE is not idle\n" );return 0 ; }
@@ -289,7 +289,7 @@ static int vce_v2_0_stop(struct amdgpu_device *adev)return -EINVAL ;if (vce_v2_0_wait_for_idle (ip_block)) { -DRM_INFO ("VCE is busy, Can't set clock gating" ); +drm_info (adev_to_drm (adev),"VCE is busy, Can't set clock gating" );return 0 ; }
@@ -481,7 +481,7 @@ static int vce_v2_0_hw_init(struct amdgpu_ip_block *ip_block)return r; } -DRM_INFO ("VCE initialized successfully.\n" ); +drm_info (adev_to_drm (adev),"VCE initialized successfully.\n" );return 0 ; }
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +4 -4
@@ -485,7 +485,7 @@ static int vce_v3_0_hw_init(struct amdgpu_ip_block *ip_block)return r; } -DRM_INFO ("VCE initialized successfully.\n" ); +drm_info (adev_to_drm (adev),"VCE initialized successfully.\n" );return 0 ; }
@@ -846,7 +846,7 @@ static void vce_v3_0_get_clockgating_state(struct amdgpu_ip_block *ip_block, u64 data =RREG32_SMC (ixCURRENT_PG_STATUS);if (data &CURRENT_PG_STATUS__VCE_PG_STATUS_MASK ) { -DRM_INFO ("Cannot get clockgating state when VCE is powergated.\n" ); +drm_info (adev_to_drm (adev),"Cannot get clockgating state when VCE is powergated.\n" ); goto out; }
@@ -978,13 +978,13 @@ static void vce_v3_0_set_ring_funcs(struct amdgpu_device *adev) adev->vce.ring[i].funcs = &vce_v3_0_ring_vm_funcs; adev->vce.ring[i].me = i; } -DRM_INFO ("VCE enabled in VM mode\n" ); +drm_info (adev_to_drm (adev),"VCE enabled in VM mode\n" ); }else {for (i =0 ; i < adev->vce.num_rings; i++) { adev->vce.ring[i].funcs = &vce_v3_0_ring_phys_funcs; adev->vce.ring[i].me = i; } -DRM_INFO ("VCE enabled in physical mode\n" ); +drm_info (adev_to_drm (adev),"VCE enabled in physical mode\n" ); } }
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c +3 -3
@@ -460,7 +460,7 @@ static int vce_v4_0_sw_init(struct amdgpu_ip_block *ip_block) adev->firmware.ucode[AMDGPU_UCODE_ID_VCE ].fw = adev->vce.fw; adev->firmware.fw_size +=ALIGN (le32_to_cpu (hdr->ucode_size_bytes),PAGE_SIZE ); -DRM_INFO ("PSP loading VCE firmware\n" ); +drm_info (adev_to_drm (adev),"PSP loading VCE firmware\n" ); }else { r =amdgpu_vce_resume (adev);if (r)
@@ -536,7 +536,7 @@ static int vce_v4_0_hw_init(struct amdgpu_ip_block *ip_block)return r; } -DRM_INFO ("VCE initialized successfully.\n" ); +drm_info (adev_to_drm (adev),"VCE initialized successfully.\n" );return 0 ; }
@@ -864,7 +864,7 @@ static void vce_v4_0_set_ring_funcs(struct amdgpu_device *adev) adev->vce.ring[i].funcs = &vce_v4_0_ring_vm_funcs; adev->vce.ring[i].me = i; } -DRM_INFO ("VCE enabled in VM mode\n" ); +drm_info (adev_to_drm (adev),"VCE enabled in VM mode\n" ); }static const struct amdgpu_irq_src_funcs vce_v4_0_irq_funcs = {
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c +3 -1
@@ -105,7 +105,9 @@ static void update_phy_id_mapping(struct amdgpu_device *adev)continue ;if (idx >=AMDGPU_DM_MAX_CRTC ) { -DRM_WARN ("%s connected connectors exceed max crtc\n" , __func__); +drm_warn (adev_to_drm (adev), +"%s connected connectors exceed max crtc\n" , + __func__);mutex_unlock (&ddev->mode_config.mutex);return ; }
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +1 -1
@@ -95,7 +95,7 @@ static int parse_write_buffer_into_params(char *wr_buf, uint32_t wr_buf_size,return -EFAULT ; } -/* check number of parameters. isspace could not differ space and \n */ +/* check number of parameters. isspace could not differ space and\n */ while ((*wr_buf_ptr !=0xa ) && (wr_buf_count < wr_buf_size)) {/* skip space*/ while (isspace (*wr_buf_ptr) && (wr_buf_count < wr_buf_size)) {
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c +5 -3
@@ -503,7 +503,8 @@ static bool enable_assr(void *handle, struct dc_link *link)struct ta_dtm_shared_memory *dtm_cmd;if (!psp->dtm_context.context.initialized) { -DRM_INFO ("Failed to enable ASSR, DTM TA is not initialized." ); +drm_info (adev_to_drm (psp->adev), +"Failed to enable ASSR, DTM TA is not initialized." );return false; }
@@ -520,7 +521,8 @@ static bool enable_assr(void *handle, struct dc_link *link)psp_dtm_invoke (psp, dtm_cmd->cmd_id);if (dtm_cmd->dtm_status !=TA_DTM_STATUS__SUCCESS ) { -DRM_INFO ("Failed to enable ASSR" ); +drm_info (adev_to_drm (psp->adev), +"Failed to enable ASSR" );return false; }
@@ -813,7 +815,7 @@ struct hdcp_workqueue *hdcp_create_workqueue(struct amdgpu_device *adev,sysfs_bin_attr_init (&hdcp_work[0 ].attr);if (sysfs_create_bin_file (&adev->dev->kobj, &hdcp_work[0 ].attr)) -DRM_WARN ("Failed to create device file hdcp_srm" ); +drm_warn (adev_to_drm (adev),"Failed to create device file hdcp_srm\n" );return hdcp_work;
drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c +4 -5
@@ -96,11 +96,10 @@ void dp_set_panel_mode(struct dc_link *link, enum dp_panel_mode panel_mode) } link->panel_mode = panel_mode; -DC_LOG_DETECTION_DP_CAPS ("Link: %d eDP panel mode supported: %d " -"eDP panel mode enabled: %d \n" , - link->link_index, - link->dpcd_caps.panel_mode_edp, - panel_mode_edp); +DC_LOG_DETECTION_DP_CAPS ("%d eDP panel mode supported: %d, enabled: %d\n" , + link->link_index, + link->dpcd_caps.panel_mode_edp, + panel_mode_edp); }enum dp_panel_mode dp_get_panel_mode (struct dc_link *link)
drivers/gpu/drm/amd/pm/amdgpu_dpm.c +10 -10
@@ -607,8 +607,8 @@ void amdgpu_dpm_enable_uvd(struct amdgpu_device *adev, bool enable) ret =amdgpu_dpm_set_powergating_by_smu (adev,AMD_IP_BLOCK_TYPE_UVD , !enable,0 );if (ret) -DRM_ERROR ("Dpm %s uvd failed, ret = %d. \n" , - enable ?"enable" :"disable" , ret); +drm_err (adev_to_drm (adev),"DPM %s uvd failed, ret = %d.\n" , + enable ?"enable" :"disable" , ret); }void amdgpu_dpm_enable_vcn (struct amdgpu_device *adev,bool enable,int inst)
@@ -617,8 +617,8 @@ void amdgpu_dpm_enable_vcn(struct amdgpu_device *adev, bool enable, int inst) ret =amdgpu_dpm_set_powergating_by_smu (adev,AMD_IP_BLOCK_TYPE_VCN , !enable, inst);if (ret) -DRM_ERROR ("Dpm %s uvd failed, ret = %d. \n" , - enable ?"enable" :"disable" , ret); +drm_err (adev_to_drm (adev),"DPM %s vcn failed, ret = %d.\n" , + enable ?"enable" :"disable" , ret); }void amdgpu_dpm_enable_vce (struct amdgpu_device *adev,bool enable)
@@ -642,8 +642,8 @@ void amdgpu_dpm_enable_vce(struct amdgpu_device *adev, bool enable) ret =amdgpu_dpm_set_powergating_by_smu (adev,AMD_IP_BLOCK_TYPE_VCE , !enable,0 );if (ret) -DRM_ERROR ("Dpm %s vce failed, ret = %d. \n" , - enable ?"enable" :"disable" , ret); +drm_err (adev_to_drm (adev),"DPM %s vce failed, ret = %d.\n" , + enable ?"enable" :"disable" , ret); }void amdgpu_dpm_enable_jpeg (struct amdgpu_device *adev,bool enable)
@@ -652,8 +652,8 @@ void amdgpu_dpm_enable_jpeg(struct amdgpu_device *adev, bool enable) ret =amdgpu_dpm_set_powergating_by_smu (adev,AMD_IP_BLOCK_TYPE_JPEG , !enable,0 );if (ret) -DRM_ERROR ("Dpm %s jpeg failed, ret = %d. \n" , - enable ?"enable" :"disable" , ret); +drm_err (adev_to_drm (adev),"Dpm %s jpeg failed, ret = %d.\n" , + enable ?"enable" :"disable" , ret); }void amdgpu_dpm_enable_vpe (struct amdgpu_device *adev,bool enable)
@@ -662,8 +662,8 @@ void amdgpu_dpm_enable_vpe(struct amdgpu_device *adev, bool enable) ret =amdgpu_dpm_set_powergating_by_smu (adev,AMD_IP_BLOCK_TYPE_VPE , !enable,0 );if (ret) -DRM_ERROR ("Dpm %s vpe failed, ret = %d.\n" , - enable ?"enable" :"disable" , ret); +drm_err (adev_to_drm (adev),"DPM %s vpe failed, ret = %d.\n" , + enable ?"enable" :"disable" , ret); }int amdgpu_pm_load_smu_firmware (struct amdgpu_device *adev,uint32_t *smu_version)
drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c +2 -3
@@ -7800,13 +7800,12 @@ static int si_dpm_sw_init(struct amdgpu_ip_block *ip_block) adev->pm.dpm.current_ps = adev->pm.dpm.requested_ps = adev->pm.dpm.boot_ps;if (amdgpu_dpm ==1 )amdgpu_pm_print_power_states (adev); -DRM_INFO ("amdgpu: dpm initialized\n" ); - +drm_info (adev_to_drm (adev),"si dpm initialized\n" );return 0 ; dpm_failed:si_dpm_fini (adev); -DRM_ERROR ("amdgpu: dpm initialization failed\n" ); +drm_err (adev_to_drm (adev),"dpm initialization failed\n" );return ret; }
drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c +4 -3
@@ -198,7 +198,7 @@ static void pp_reserve_vram_for_smu(struct amdgpu_device *adev) &adev->pm.smu_prv_buffer, &gpu_addr, &cpu_ptr)) { -DRM_ERROR ("amdgpu: failed to create smu prv buffer\n" ); +drm_err (adev_to_drm (adev),"failed to create smu prv buffer\n" );return ; }
@@ -213,7 +213,7 @@ static void pp_reserve_vram_for_smu(struct amdgpu_device *adev)if (r) {amdgpu_bo_free_kernel (&adev->pm.smu_prv_buffer,NULL ,NULL ); adev->pm.smu_prv_buffer =NULL ; -DRM_ERROR ("amdgpu: failed to notify SMU buffer address\n" ); +drm_err (adev_to_drm (adev),"failed to notify SMU buffer address\n" ); } }
@@ -1053,7 +1053,8 @@ static int pp_get_current_clocks(void *handle, &hw_clocks, PHM_PerformanceLevelDesignation_Activity);if (ret) { -pr_debug ("Error in phm_get_clock_info \n" ); +drm_err (adev_to_drm (hwmgr->adev), +"Error in phm_get_clock_info\n" );return -EINVAL ; }
Signature · 1 line
2.43.0
PATCH 6/9 drm/amd/display: Fix DPMS log printing
In reply to Mario Limonciello (AMD)[Why]
Spaces before newline are not necessary. Inserting newlines in multi-line strings are harder to follow when tracing messages.
[How]
Drop extra new lines and split multi-line messages into one print per line.
--- .../gpu/drm/amd/display/dc/link/link_dpms.c | 114 +++++------------- 1 file changed, 29 insertions(+), 85 deletions(-)
drivers/gpu/drm/amd/display/dc/link/link_dpms.c +29 -85
@@ -1330,6 +1330,28 @@ static void remove_stream_from_alloc_table( } } +static void print_mst_streams (struct dc_link *link) +{ +int i; + +DC_LOGGER_INIT (link->ctx->logger); + +DC_LOG_MST ("%s stream_count: %d:\n" , + __func__, + link->mst_stream_alloc_table.stream_count); + +for (i =0 ; i <MAX_CONTROLLER_NUM ; i++) { +DC_LOG_MST ("stream_enc[%d]: %p\n" , i, + (void *) link->mst_stream_alloc_table.stream_allocations[i].stream_enc); +DC_LOG_MST ("stream[%d].hpo_dp_stream_enc: %p\n" , i, + (void *) link->mst_stream_alloc_table.stream_allocations[i].hpo_dp_stream_enc); +DC_LOG_MST ("stream[%d].vcp_id: %d\n" , i, + link->mst_stream_alloc_table.stream_allocations[i].vcp_id); +DC_LOG_MST ("stream[%d].slot_count: %d\n" , i, + link->mst_stream_alloc_table.stream_allocations[i].slot_count); + } +} +static enum dc_status deallocate_mst_payload (struct pipe_ctx *pipe_ctx) {struct dc_stream_state *stream = pipe_ctx->stream;
@@ -1372,9 +1394,7 @@ static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx) pipe_ctx->stream_res.hpo_dp_stream_enc, &proposed_table); else - DC_LOG_WARNING("Failed to update" -"MST allocation table for" -"pipe idx:%d\n" , + DC_LOG_WARNING("Failed to update MST allocation table for idx %d\n", pipe_ctx->pipe_idx); }else {/* when link is no longer in mst mode (mst hub unplugged),
@@ -1384,25 +1404,7 @@ static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx) pipe_ctx->stream_res.hpo_dp_stream_enc); } -DC_LOG_MST ("%s" -"stream_count: %d: " , - __func__, - link->mst_stream_alloc_table.stream_count); - -for (i =0 ; i <MAX_CONTROLLER_NUM ; i++) { -DC_LOG_MST ("stream_enc[%d]: %p " -"stream[%d].hpo_dp_stream_enc: %p " -"stream[%d].vcp_id: %d " -"stream[%d].slot_count: %d\n" , - i, - (void *) link->mst_stream_alloc_table.stream_allocations[i].stream_enc, - i, - (void *) link->mst_stream_alloc_table.stream_allocations[i].hpo_dp_stream_enc, - i, - link->mst_stream_alloc_table.stream_allocations[i].vcp_id, - i, - link->mst_stream_alloc_table.stream_allocations[i].slot_count); - } +print_mst_streams (link);/* update mst stream allocation table hardware state */ if (link_hwss->ext.update_stream_allocation_table == NULL ||
@@ -1459,30 +1461,10 @@ static enum dc_status allocate_mst_payload(struct pipe_ctx *pipe_ctx) pipe_ctx->stream_res.hpo_dp_stream_enc, &proposed_table); else - DC_LOG_WARNING("Failed to update" -"MST allocation table for" -"pipe idx:%d\n" , + DC_LOG_WARNING("Failed to update MST allocation table for idx %d\n", pipe_ctx->pipe_idx); -DC_LOG_MST ("%s " -"stream_count: %d: \n " , - __func__, - link->mst_stream_alloc_table.stream_count); - -for (i =0 ; i <MAX_CONTROLLER_NUM ; i++) { -DC_LOG_MST ("stream_enc[%d]: %p " -"stream[%d].hpo_dp_stream_enc: %p " -"stream[%d].vcp_id: %d " -"stream[%d].slot_count: %d\n" , - i, - (void *) link->mst_stream_alloc_table.stream_allocations[i].stream_enc, - i, - (void *) link->mst_stream_alloc_table.stream_allocations[i].hpo_dp_stream_enc, - i, - link->mst_stream_alloc_table.stream_allocations[i].vcp_id, - i, - link->mst_stream_alloc_table.stream_allocations[i].slot_count); - } +print_mst_streams (link);ASSERT (proposed_table.stream_count >0 );
@@ -1781,31 +1763,11 @@ enum dc_status link_reduce_mst_payload(struct pipe_ctx *pipe_ctx, uint32_t bw_in pipe_ctx->stream_res.hpo_dp_stream_enc, &proposed_table); }else { -DC_LOG_WARNING ("Failed to update" -"MST allocation table for" -"pipe idx:%d\n" , +DC_LOG_WARNING ("Failed to update MST allocation table for idx %d\n" , pipe_ctx->pipe_idx); } -DC_LOG_MST ("%s " -"stream_count: %d: \n " , - __func__, - link->mst_stream_alloc_table.stream_count); - -for (i =0 ; i <MAX_CONTROLLER_NUM ; i++) { -DC_LOG_MST ("stream_enc[%d]: %p " -"stream[%d].hpo_dp_stream_enc: %p " -"stream[%d].vcp_id: %d " -"stream[%d].slot_count: %d\n" , - i, - (void *) link->mst_stream_alloc_table.stream_allocations[i].stream_enc, - i, - (void *) link->mst_stream_alloc_table.stream_allocations[i].hpo_dp_stream_enc, - i, - link->mst_stream_alloc_table.stream_allocations[i].vcp_id, - i, - link->mst_stream_alloc_table.stream_allocations[i].slot_count); - } +print_mst_streams (link);ASSERT (proposed_table.stream_count >0 );
@@ -1854,25 +1816,7 @@ enum dc_status link_increase_mst_payload(struct pipe_ctx *pipe_ctx, uint32_t bw_ &proposed_table); } -DC_LOG_MST ("%s " -"stream_count: %d: \n " , - __func__, - link->mst_stream_alloc_table.stream_count); - -for (i =0 ; i <MAX_CONTROLLER_NUM ; i++) { -DC_LOG_MST ("stream_enc[%d]: %p " -"stream[%d].hpo_dp_stream_enc: %p " -"stream[%d].vcp_id: %d " -"stream[%d].slot_count: %d\n" , - i, - (void *) link->mst_stream_alloc_table.stream_allocations[i].stream_enc, - i, - (void *) link->mst_stream_alloc_table.stream_allocations[i].hpo_dp_stream_enc, - i, - link->mst_stream_alloc_table.stream_allocations[i].vcp_id, - i, - link->mst_stream_alloc_table.stream_allocations[i].slot_count); - } +print_mst_streams (link);ASSERT (proposed_table.stream_count >0 );
Signature · 1 line
2.43.0
PATCH 8/9 drm/amd: Drop amdgpu prefix from message prints
In reply to Mario Limonciello (AMD)Hardcoding the prefix isn't necessary when using drm_* or dev_* message prints.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 10 +++++----- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 10 +++++----- drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 10 +++++----- drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 2 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 ++++-- 31 files changed, 75 insertions(+), 73 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c +1 -1
@@ -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" +dev_info (adev->dev," %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);
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
@@ -5037,7 +5037,7 @@ static void amdgpu_device_unmap_mmio(struct amdgpu_device *adev)*/ void amdgpu_device_fini_hw (struct amdgpu_device *adev) { -dev_info (adev->dev,"amdgpu: finishing device.\n" ); +dev_info (adev->dev,"finishing device.\n" );flush_delayed_work (&adev->delayed_init_work);if (adev->mman.initialized)
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +4 -4
@@ -130,11 +130,11 @@ void amdgpu_gfx_parse_disable_cu(struct amdgpu_device *adev, unsigned int *mask, }if (se < max_se && sh < max_sh && cu <16 ) { -DRM_INFO ("amdgpu: disabling CU %u.%u.%u\n" , se, sh, cu); +drm_info (adev_to_drm (adev),"Disabling CU %u.%u.%u\n" , se, sh, cu); mask[se * max_sh + sh] |=1u << cu; }else { -DRM_ERROR ("amdgpu: disable_cu %u.%u.%u is out of range\n" , - se, sh, cu); +drm_err (adev_to_drm (adev),"disable_cu %u.%u.%u is out of range\n" , + se, sh, cu); } next =strchr (p,',' );
@@ -152,7 +152,7 @@ static bool amdgpu_gfx_is_graphics_multipipe_capable(struct amdgpu_device *adev)static bool amdgpu_gfx_is_compute_multipipe_capable (struct amdgpu_device *adev) {if (amdgpu_compute_multipipe !=-1 ) { -dev_info (adev->dev,"amdgpu: forcing compute pipe policy %d\n" , +dev_info (adev->dev," forcing compute pipe policy %d\n" , amdgpu_compute_multipipe);return amdgpu_compute_multipipe ==1 ; }
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +1 -1
@@ -316,7 +316,7 @@ int amdgpu_irq_init(struct amdgpu_device *adev) adev->irq.irq = irq;adev_to_drm (adev)->max_vblank_count =0x00ffffff ; -dev_dbg (adev->dev,"amdgpu: irq initialized.\n" ); +dev_dbg (adev->dev,"irq initialized.\n" );return 0 ; free_vectors:
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +1 -1
@@ -191,7 +191,7 @@ void amdgpu_ring_commit(struct amdgpu_ring *ring)uint32_t count;if (ring->count_dw <0 ) -DRM_ERROR ("amdgpu: writing more dwords to the ring than expected!\n" ); +drm_err (adev_to_drm (ring->adev),"writing more dwords to the ring than expected!\n" );/* We pad to match fetch size */ count = ring->funcs->align_mask + 1 -
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +3 -3
@@ -2108,7 +2108,7 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)DRM_DEBUG_DRIVER ("Skipped stolen memory reservation\n" ); } -dev_info (adev->dev,"amdgpu: %uM of VRAM memory ready\n" , +dev_info (adev->dev," %uM of VRAM memory ready\n" , (unsigned int )(adev->gmc.real_vram_size / (1024 *1024 )));/* Compute GTT size, either based on TTM limit
@@ -2134,7 +2134,7 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)dev_err (adev->dev,"Failed initializing GTT heap.\n" );return r; } -dev_info (adev->dev,"amdgpu: %uM of GTT memory ready.\n" , +dev_info (adev->dev," %uM of GTT memory ready.\n" , (unsigned int )(gtt_size / (1024 *1024 )));if (adev->flags &AMD_IS_APU ) {
@@ -2257,7 +2257,7 @@ void amdgpu_ttm_fini(struct amdgpu_device *adev)ttm_range_man_fini (&adev->mman.bdev,AMDGPU_PL_MMIO_REMAP );ttm_device_fini (&adev->mman.bdev); adev->mman.initialized = false; -dev_info (adev->dev,"amdgpu: ttm finalized\n" ); +dev_info (adev->dev," ttm finalized\n" ); }/**
drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c +1 -1
@@ -790,7 +790,7 @@ 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); +dev_err (adev->dev,"dma failed to lock ring %d (%d).\n" , ring->idx, ret); goto out; }
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +5 -5
@@ -4041,8 +4041,8 @@ static int gfx_v10_0_ring_test_ring(struct amdgpu_ring *ring)WREG32 (scratch,0xCAFEDEAD ); r =amdgpu_ring_alloc (ring,3 );if (r) { -DRM_ERROR ("amdgpu: cp failed to lock ring %d (%d).\n" , - ring->idx, r); +drm_err (adev_to_drm (adev),"cp failed to lock ring %d (%d).\n" , + ring->idx, r);return r; }
@@ -4090,7 +4090,7 @@ static int gfx_v10_0_ring_test_ib(struct amdgpu_ring *ring, long timeout) r =amdgpu_ib_get (adev,NULL ,20 ,AMDGPU_IB_POOL_DIRECT , &ib);if (r) { -DRM_ERROR ("amdgpu: failed to get ib (%ld).\n" , r); +drm_err (adev_to_drm (adev),"failed to get ib (%ld).\n" , r); goto err1; }
@@ -6379,7 +6379,7 @@ static int gfx_v10_0_cp_gfx_start(struct amdgpu_device *adev) ring = &adev->gfx.gfx_ring[0 ]; r =amdgpu_ring_alloc (ring,gfx_v10_0_get_csb_size (adev) +4 );if (r) { -DRM_ERROR ("amdgpu: cp failed to lock ring (%d).\n" , r); +drm_err (adev_to_drm (adev),"cp failed to lock ring (%d).\n" , r);return r; }
@@ -6429,7 +6429,7 @@ static int gfx_v10_0_cp_gfx_start(struct amdgpu_device *adev) ring = &adev->gfx.gfx_ring[1 ]; r =amdgpu_ring_alloc (ring,2 );if (r) { -DRM_ERROR ("amdgpu: cp failed to lock ring (%d).\n" , r); +drm_err (adev_to_drm (adev),"cp failed to lock ring (%d).\n" , r);return r; }
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +4 -4
@@ -567,7 +567,7 @@ static int gfx_v11_0_ring_test_ring(struct amdgpu_ring *ring)WREG32 (scratch,0xCAFEDEAD ); r =amdgpu_ring_alloc (ring,5 );if (r) { -DRM_ERROR ("amdgpu: cp failed to lock ring %d (%d).\n" , +drm_err (adev_to_drm (adev),"cp failed to lock ring %d (%d).\n" , ring->idx, r);return r; }
@@ -624,7 +624,7 @@ static int gfx_v11_0_ring_test_ib(struct amdgpu_ring *ring, long timeout) r =amdgpu_ib_get (adev,NULL ,20 ,AMDGPU_IB_POOL_DIRECT , &ib);if (r) { -DRM_ERROR ("amdgpu: failed to get ib (%ld).\n" , r); +drm_err (adev_to_drm (adev),"failed to get ib (%ld).\n" , r); goto err1; }
@@ -3623,7 +3623,7 @@ static int gfx_v11_0_cp_gfx_start(struct amdgpu_device *adev) ring = &adev->gfx.gfx_ring[0 ]; r =amdgpu_ring_alloc (ring,gfx_v11_0_get_csb_size (adev));if (r) { -DRM_ERROR ("amdgpu: cp failed to lock ring (%d).\n" , r); +drm_err (&adev->ddev,"cp failed to lock ring (%d).\n" , r);return r; }
@@ -3668,7 +3668,7 @@ static int gfx_v11_0_cp_gfx_start(struct amdgpu_device *adev) ring = &adev->gfx.gfx_ring[1 ]; r =amdgpu_ring_alloc (ring,2 );if (r) { -DRM_ERROR ("amdgpu: cp failed to lock ring (%d).\n" , r); +drm_err (adev_to_drm (adev),"cp failed to lock ring (%d).\n" , r);return r; }
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +3 -3
@@ -460,8 +460,8 @@ static int gfx_v12_0_ring_test_ring(struct amdgpu_ring *ring)WREG32 (scratch,0xCAFEDEAD ); r =amdgpu_ring_alloc (ring,5 );if (r) { -dev_err (adev->dev, -"amdgpu: cp failed to lock ring %d (%d).\n" , +drm_err (adev_to_drm (adev), +"cp failed to lock ring %d (%d).\n" , ring->idx, r);return r; }
@@ -518,7 +518,7 @@ static int gfx_v12_0_ring_test_ib(struct amdgpu_ring *ring, long timeout) r =amdgpu_ib_get (adev,NULL ,16 ,AMDGPU_IB_POOL_DIRECT , &ib);if (r) { -dev_err (adev->dev,"amdgpu: failed to get ib (%ld).\n" , r); +drm_err (adev_to_drm (adev),"failed to get ib (%ld).\n" , r); goto err1; }
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +2 -2
@@ -2010,7 +2010,7 @@ static int gfx_v6_0_cp_gfx_start(struct amdgpu_device *adev) r =amdgpu_ring_alloc (ring,7 +4 );if (r) { -DRM_ERROR ("amdgpu: cp failed to lock ring (%d).\n" , r); +drm_err (adev_to_drm (adev),"cp failed to lock ring (%d).\n" , r);return r; }amdgpu_ring_write (ring,PACKET3 (PACKET3_ME_INITIALIZE ,5 ));
@@ -2031,7 +2031,7 @@ static int gfx_v6_0_cp_gfx_start(struct amdgpu_device *adev) r =amdgpu_ring_alloc (ring,gfx_v6_0_get_csb_size (adev) +10 );if (r) { -DRM_ERROR ("amdgpu: cp failed to lock ring (%d).\n" , r); +drm_err (adev_to_drm (adev),"cp failed to lock ring (%d).\n" , r);return r; }
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +1 -1
@@ -2465,7 +2465,7 @@ static int gfx_v7_0_cp_gfx_start(struct amdgpu_device *adev) r =amdgpu_ring_alloc (ring,gfx_v7_0_get_csb_size (adev) +8 );if (r) { -DRM_ERROR ("amdgpu: cp failed to lock ring (%d).\n" , r); +drm_err (adev_to_drm (adev),"cp failed to lock ring (%d).\n" , r);return r; }
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +4 -4
@@ -1509,7 +1509,7 @@ static int gfx_v8_0_do_edc_gpr_workarounds(struct amdgpu_device *adev) r =amdgpu_ib_get (adev,NULL , total_size,AMDGPU_IB_POOL_DIRECT , &ib);if (r) { -DRM_ERROR ("amdgpu: failed to get ib (%d).\n" , r); +drm_err (adev_to_drm (adev),"failed to get ib (%d).\n" , r);return r; }
@@ -1604,14 +1604,14 @@ static int gfx_v8_0_do_edc_gpr_workarounds(struct amdgpu_device *adev)/* shedule the ib on the ring */ r =amdgpu_ib_schedule (ring,1 , &ib,NULL , &f);if (r) { -DRM_ERROR ("amdgpu: ib submit failed (%d).\n" , r); +drm_err (adev_to_drm (adev),"ib submit failed (%d).\n" , r); goto fail; }/* wait for the GPU to finish processing the IB */ r =dma_fence_wait (f, false);if (r) { -DRM_ERROR ("amdgpu: fence wait failed (%d).\n" , r); +drm_err (adev_to_drm (adev),"fence wait failed (%d).\n" , r); goto fail; }
@@ -4143,7 +4143,7 @@ static int gfx_v8_0_cp_gfx_start(struct amdgpu_device *adev) r =amdgpu_ring_alloc (ring,gfx_v8_0_get_csb_size (adev) +4 );if (r) { -DRM_ERROR ("amdgpu: cp failed to lock ring (%d).\n" , r); +drm_err (adev_to_drm (adev),"cp failed to lock ring (%d).\n" , r);return r; }
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +4 -4
@@ -4582,7 +4582,7 @@ static int gfx_v9_0_do_edc_gds_workarounds(struct amdgpu_device *adev) r =amdgpu_ring_alloc (ring,7 );if (r) { -DRM_ERROR ("amdgpu: GDS workarounds failed to lock ring %s (%d).\n" , +drm_err (adev_to_drm (adev),"GDS workarounds failed to lock ring %s (%d).\n" , ring->name, r);return r; }
@@ -4671,7 +4671,7 @@ static int gfx_v9_0_do_edc_gpr_workarounds(struct amdgpu_device *adev) r =amdgpu_ib_get (adev,NULL , total_size,AMDGPU_IB_POOL_DIRECT , &ib);if (r) { -DRM_ERROR ("amdgpu: failed to get ib (%d).\n" , r); +drm_err (adev_to_drm (adev),"failed to get ib (%d).\n" , r);return r; }
@@ -4772,14 +4772,14 @@ static int gfx_v9_0_do_edc_gpr_workarounds(struct amdgpu_device *adev)/* shedule the ib on the ring */ r =amdgpu_ib_schedule (ring,1 , &ib,NULL , &f);if (r) { -DRM_ERROR ("amdgpu: ib submit failed (%d).\n" , r); +drm_err (adev_to_drm (adev),"ib schedule failed (%d).\n" , r); goto fail; }/* wait for the GPU to finish processing the IB */ r =dma_fence_wait (f, false);if (r) { -DRM_ERROR ("amdgpu: fence wait failed (%d).\n" , r); +drm_err (adev_to_drm (adev),"fence wait failed (%d).\n" , r); goto fail; }
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +1 -1
@@ -850,7 +850,7 @@ static int gmc_v10_0_sw_init(struct amdgpu_ip_block *ip_block) r =dma_set_mask_and_coherent (adev->dev,DMA_BIT_MASK (44 ));if (r) { -dev_warn (adev->dev,"amdgpu: No suitable DMA available.\n" ); +drm_warn (adev_to_drm (adev),"No suitable DMA available.\n" );return r; }
drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c +1 -1
@@ -821,7 +821,7 @@ static int gmc_v11_0_sw_init(struct amdgpu_ip_block *ip_block) r =dma_set_mask_and_coherent (adev->dev,DMA_BIT_MASK (44 ));if (r) { -dev_warn (adev->dev,"amdgpu: No suitable DMA available.\n" ); +drm_warn (adev_to_drm (adev),"No suitable DMA available.\n" );return r; }
drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c +1 -1
@@ -869,7 +869,7 @@ static int gmc_v12_0_sw_init(struct amdgpu_ip_block *ip_block) r =dma_set_mask_and_coherent (adev->dev,DMA_BIT_MASK (44 ));if (r) { -printk (KERN_WARNING "amdgpu: No suitable DMA available.\n" ); +drm_warn (adev_to_drm (adev),"No suitable DMA available.\n" );return r; }
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +1 -1
@@ -1975,7 +1975,7 @@ static int gmc_v9_0_sw_init(struct amdgpu_ip_block *ip_block)44 ; r =dma_set_mask_and_coherent (adev->dev,DMA_BIT_MASK (dma_addr_bits));if (r) { -dev_warn (adev->dev,"amdgpu: No suitable DMA available.\n" ); +drm_warn (adev_to_drm (adev),"No suitable DMA available.\n" );return r; } adev->need_swiotlb =drm_need_swiotlb (dma_addr_bits);
drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c +1 -1
@@ -271,7 +271,7 @@ static int jpeg_v2_0_enable_power_gating(struct amdgpu_device *adev) UVD_PGFSM_STATUS__UVDJ_PWR_STATUS_MASK);if (r) { -DRM_ERROR ("amdgpu: JPEG enable power gating failed\n" ); +drm_err (adev_to_drm (adev),"failed to enable JPEG power gating\n" );return r; } }
drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c +2 -2
@@ -298,7 +298,7 @@ static int jpeg_v3_0_disable_static_power_gating(struct amdgpu_device *adev) UVD_PGFSM_STATUS__UVDJ_PWR_STATUS_MASK);if (r) { -DRM_ERROR ("amdgpu: JPEG disable power gating failed\n" ); +drm_err (adev_to_drm (adev),"failed to disable JPEG power gating\n" );return r; } }
@@ -333,7 +333,7 @@ static int jpeg_v3_0_enable_static_power_gating(struct amdgpu_device *adev) UVD_PGFSM_STATUS__UVDJ_PWR_STATUS_MASK);if (r) { -DRM_ERROR ("amdgpu: JPEG enable power gating failed\n" ); +drm_err (adev_to_drm (adev),"failed to enable JPEG power gating\n" );return r; } }
drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c +2 -2
@@ -335,7 +335,7 @@ static int jpeg_v4_0_disable_static_power_gating(struct amdgpu_device *adev) UVD_PGFSM_STATUS__UVDJ_PWR_STATUS_MASK);if (r) { -DRM_DEV_ERROR (adev->dev,"amdgpu: JPEG disable power gating failed\n" ); +drm_err (adev_to_drm (adev),"failed to disable JPEG power gating\n" );return r; } }
@@ -370,7 +370,7 @@ static int jpeg_v4_0_enable_static_power_gating(struct amdgpu_device *adev) UVD_PGFSM_STATUS__UVDJ_PWR_STATUS_MASK);if (r) { -DRM_DEV_ERROR (adev->dev,"amdgpu: JPEG enable power gating failed\n" ); +drm_err (adev_to_drm (adev),"failed to enable JPEG power gating\n" );return r; } }
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c +4 -4
@@ -1031,7 +1031,7 @@ static int sdma_v5_0_ring_test_ring(struct amdgpu_ring *ring) r =amdgpu_ring_alloc (ring,20 );if (r) { -DRM_ERROR ("amdgpu: dma failed to lock ring %d (%d).\n" , ring->idx, r); +drm_err (adev_to_drm (adev),"dma failed to lock ring %d (%d).\n" , ring->idx, r);amdgpu_device_wb_free (adev, index);return r; }
@@ -1096,7 +1096,7 @@ static int sdma_v5_0_ring_test_ib(struct amdgpu_ring *ring, long timeout) r =amdgpu_ib_get (adev,NULL ,256 ,AMDGPU_IB_POOL_DIRECT , &ib);if (r) { -DRM_ERROR ("amdgpu: failed to get ib (%ld).\n" , r); +drm_err (adev_to_drm (adev),"failed to get ib (%ld).\n" , r); goto err0; }
@@ -1117,11 +1117,11 @@ static int sdma_v5_0_ring_test_ib(struct amdgpu_ring *ring, long timeout) r =dma_fence_wait_timeout (f, false, timeout);if (r ==0 ) { -DRM_ERROR ("amdgpu: IB test timed out\n" ); +drm_err (adev_to_drm (adev),"IB test timed out\n" ); r = -ETIMEDOUT ; goto err1; }else if (r <0 ) { -DRM_ERROR ("amdgpu: fence wait failed (%ld).\n" , r); +drm_err (adev_to_drm (adev),"fence wait failed (%ld).\n" , r); goto err1; }
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +5 -5
@@ -931,7 +931,7 @@ static int sdma_v5_2_ring_test_ring(struct amdgpu_ring *ring) r =amdgpu_ring_alloc (ring,20 );if (r) { -DRM_ERROR ("amdgpu: dma failed to lock ring %d (%d).\n" , ring->idx, r); +drm_err (adev_to_drm (adev),"dma failed to lock ring %d (%d).\n" , ring->idx, r);amdgpu_device_wb_free (adev, index);return r; }
@@ -995,7 +995,7 @@ static int sdma_v5_2_ring_test_ib(struct amdgpu_ring *ring, long timeout) r =amdgpu_ib_get (adev,NULL ,256 ,AMDGPU_IB_POOL_DIRECT , &ib);if (r) { -DRM_ERROR ("amdgpu: failed to get ib (%ld).\n" , r); +drm_err (adev_to_drm (adev),"failed to get ib (%ld).\n" , r); goto err0; }
@@ -1016,11 +1016,11 @@ static int sdma_v5_2_ring_test_ib(struct amdgpu_ring *ring, long timeout) r =dma_fence_wait_timeout (f, false, timeout);if (r ==0 ) { -DRM_ERROR ("amdgpu: IB test timed out\n" ); +drm_err (adev_to_drm (adev),"IB test timed out\n" ); r = -ETIMEDOUT ; goto err1; }else if (r <0 ) { -DRM_ERROR ("amdgpu: fence wait failed (%ld).\n" , r); +drm_err (adev_to_drm (adev),"fence wait failed (%ld).\n" , r); goto err1; }
@@ -1325,7 +1325,7 @@ static int sdma_v5_2_sw_init(struct amdgpu_ip_block *ip_block) ring->use_doorbell = true; ring->me = i; -DRM_INFO ("use_doorbell being set to: [%s]\n" , +drm_info (adev_to_drm (adev),"use_doorbell being set to: [%s]\n" , ring->use_doorbell?"true" :"false" ); ring->doorbell_index =
drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c +4 -4
@@ -937,7 +937,7 @@ static int sdma_v6_0_ring_test_ring(struct amdgpu_ring *ring) r =amdgpu_ring_alloc (ring,5 );if (r) { -DRM_ERROR ("amdgpu: dma failed to lock ring %d (%d).\n" , ring->idx, r); +drm_err (adev_to_drm (adev),"dma failed to lock ring %d (%d).\n" , ring->idx, r);amdgpu_device_wb_free (adev, index);return r; }
@@ -1001,7 +1001,7 @@ static int sdma_v6_0_ring_test_ib(struct amdgpu_ring *ring, long timeout) r =amdgpu_ib_get (adev,NULL ,256 ,AMDGPU_IB_POOL_DIRECT , &ib);if (r) { -DRM_ERROR ("amdgpu: failed to get ib (%ld).\n" , r); +drm_err (adev_to_drm (adev),"failed to get ib (%ld).\n" , r); goto err0; }
@@ -1022,11 +1022,11 @@ static int sdma_v6_0_ring_test_ib(struct amdgpu_ring *ring, long timeout) r =dma_fence_wait_timeout (f, false, timeout);if (r ==0 ) { -DRM_ERROR ("amdgpu: IB test timed out\n" ); +drm_err (adev_to_drm (adev),"IB test timed out\n" ); r = -ETIMEDOUT ; goto err1; }else if (r <0 ) { -DRM_ERROR ("amdgpu: fence wait failed (%ld).\n" , r); +drm_err (adev_to_drm (adev),"fence wait failed (%ld).\n" , r); goto err1; }
drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c +5 -5
@@ -954,7 +954,7 @@ static int sdma_v7_0_ring_test_ring(struct amdgpu_ring *ring) r =amdgpu_ring_alloc (ring,5 );if (r) { -DRM_ERROR ("amdgpu: dma failed to lock ring %d (%d).\n" , ring->idx, r); +drm_err (adev_to_drm (adev),"dma failed to lock ring %d (%d).\n" , ring->idx, r);amdgpu_device_wb_free (adev, index);return r; }
@@ -1018,7 +1018,7 @@ static int sdma_v7_0_ring_test_ib(struct amdgpu_ring *ring, long timeout) r =amdgpu_ib_get (adev,NULL ,256 ,AMDGPU_IB_POOL_DIRECT , &ib);if (r) { -DRM_ERROR ("amdgpu: failed to get ib (%ld).\n" , r); +drm_err (adev_to_drm (adev),"failed to get ib (%ld).\n" , r); goto err0; }
@@ -1039,11 +1039,11 @@ static int sdma_v7_0_ring_test_ib(struct amdgpu_ring *ring, long timeout) r =dma_fence_wait_timeout (f, false, timeout);if (r ==0 ) { -DRM_ERROR ("amdgpu: IB test timed out\n" ); +drm_err (adev_to_drm (adev),"IB test timed out\n" ); r = -ETIMEDOUT ; goto err1; }else if (r <0 ) { -DRM_ERROR ("amdgpu: fence wait failed (%ld).\n" , r); +drm_err (adev_to_drm (adev),"fence wait failed (%ld).\n" , r); goto err1; }
@@ -1504,7 +1504,7 @@ static int sdma_v7_0_ring_preempt_ib(struct amdgpu_ring *ring) ring->trail_seq +=1 ; r =amdgpu_ring_alloc (ring,10 );if (r) { -DRM_ERROR ("ring %d failed to be allocated \n" , ring->idx); +DRM_ERROR ("ring %d failed to be allocated\n" , ring->idx);return r; } sdma_v7_0_ring_emit_fence(ring, ring->trail_fence_gpu_addr,
drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c +4 -4
@@ -660,7 +660,7 @@ static int uvd_v3_1_hw_init(struct amdgpu_ip_block *ip_block) r =uvd_v3_1_fw_validate (adev);if (r) { -DRM_ERROR ("amdgpu: UVD Firmware validate fail (%d).\n" , r); +drm_err (adev_to_drm (adev),"UVD Firmware validate fail (%d).\n" , r);return r; }
@@ -668,13 +668,13 @@ static int uvd_v3_1_hw_init(struct amdgpu_ip_block *ip_block) r =amdgpu_ring_test_helper (ring);if (r) { -DRM_ERROR ("amdgpu: UVD ring test fail (%d).\n" , r); +drm_err (adev_to_drm (adev),"UVD ring test failed (%d).\n" , r); goto done; } r =amdgpu_ring_alloc (ring,10 );if (r) { -DRM_ERROR ("amdgpu: ring failed to lock UVD ring (%d).\n" , r); +drm_err (adev_to_drm (adev),"ring alloc failed (%d).\n" , r); goto done; }
@@ -701,7 +701,7 @@ static int uvd_v3_1_hw_init(struct amdgpu_ip_block *ip_block) done:if (!r) -DRM_INFO ("UVD initialized successfully.\n" ); +drm_info (adev_to_drm (adev),"UVD initialized successfully.\n" );return r; }
drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c +2 -2
@@ -167,7 +167,7 @@ static int uvd_v4_2_hw_init(struct amdgpu_ip_block *ip_block) r =amdgpu_ring_alloc (ring,10 );if (r) { -DRM_ERROR ("amdgpu: ring failed to lock UVD ring (%d).\n" , r); +drm_err (adev_to_drm (adev),"ring alloc failed (%d).\n" , r); goto done; }
@@ -194,7 +194,7 @@ static int uvd_v4_2_hw_init(struct amdgpu_ip_block *ip_block) done:if (!r) -DRM_INFO ("UVD initialized successfully.\n" ); +drm_info (adev_to_drm (adev),"UVD initialized successfully.\n" );return r; }
drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c +1 -1
@@ -164,7 +164,7 @@ static int uvd_v5_0_hw_init(struct amdgpu_ip_block *ip_block) r =amdgpu_ring_alloc (ring,10 );if (r) { -DRM_ERROR ("amdgpu: ring failed to lock UVD ring (%d).\n" , r); +drm_err (adev_to_drm (adev),"ring alloc failed (%d).\n" , r); goto done; }
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +1 -1
@@ -478,7 +478,7 @@ static int uvd_v6_0_hw_init(struct amdgpu_ip_block *ip_block) r =amdgpu_ring_alloc (ring,10 );if (r) { -DRM_ERROR ("amdgpu: ring failed to lock UVD ring (%d).\n" , r); +drm_err (adev_to_drm (adev),"ring alloc failed (%d).\n" , r); goto done; }
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c +1 -1
@@ -542,7 +542,7 @@ static int uvd_v7_0_hw_init(struct amdgpu_ip_block *ip_block) r =amdgpu_ring_alloc (ring,10 );if (r) { -DRM_ERROR ("amdgpu: (%d)ring failed to lock UVD ring (%d).\n" , j, r); +drm_err (adev_to_drm (adev),"ring alloc failed (%d).\n" , r); goto done; }
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4 -2
@@ -2098,7 +2098,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)drm_err (adev_to_drm (adev),"failed to initialize freesync_module.\n" ); }else -drm_dbg_driver (adev_to_drm (adev),"amdgpu: freesync_module init done %p.\n" , +drm_dbg_driver (adev_to_drm (adev),"freesync_module init done %p.\n" , adev->dm.freesync_module);amdgpu_dm_init_color_mod ();
@@ -2120,7 +2120,9 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)if (!adev->dm.hdcp_workqueue)drm_err (adev_to_drm (adev),"failed to initialize hdcp_workqueue.\n" );else -drm_dbg_driver (adev_to_drm (adev),"amdgpu: hdcp_workqueue init done %p.\n" , adev->dm.hdcp_workqueue); +drm_dbg_driver (adev_to_drm (adev), +"hdcp_workqueue init done %p.\n" , + adev->dm.hdcp_workqueue);dc_init_callbacks (adev->dm.dc, &init_params); }
Signature · 1 line
2.43.0
Quoted 94 lines · Mario Limonciello (AMD)
I noticed a lot of inconsistency in message handling.
* sometimes two amdgpu prints in a message
* sometimes no prints in a message
* some messages are device specific, others aren'tThis series improves a lot of the cases that I've found to:
1. print no more than one time
2. include the device whenever possible.Mario Limonciello (AMD) (9):
drm/amd: Drop "amdgpu kernel modesetting enabled" message drm/amdkfd: Correct the topology message for APUs drm/amd: Add correct prefix for VBIOS message drm/amd: Passadevtoamdgpu_gfx_parse_disable_cu()drm/amd: Dropdev_fmtprefix
drm/amd/display: Fix DPMS log printing
drm/amd: Convertamdgpu_displayfrom DRM_* todrm_macros drm/amd: Drop amdgpu prefix from message prints drm/amd: Convert DRM_*() to drm_*()drivers/gpu/drm/amd/amdgpu/amdgpu.h | 6 - drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 9 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 7 +- .../gpu/drm/amd/amdgpu/amdgpu_connectors.c | 34 ++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 12 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 14 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 12 +- .../gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 5 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 40 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5 +- .../drm/amd/amdgpu/amdgpu_fw_attestation.c | 11 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 14 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 10 +- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 9 +- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 7 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c | 2 +- drivers/gpu/drm/amd/amdgpu/atom.c | 2 +- .../gpu/drm/amd/amdgpu/atombios_encoders.c | 6 +- drivers/gpu/drm/amd/amdgpu/cik.c | 8 +- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 16 +-- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 14 +-- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 12 +- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 8 +- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 18 +-- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 25 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 6 +- drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/gmc_v12_0.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 | 4 +- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 14 +-- drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c | 4 +- drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/psp_v12_0.c | 6 +- drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 6 +- drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 8 +- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 10 +- drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 8 +- drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 10 +- drivers/gpu/drm/amd/amdgpu/si.c | 8 +- drivers/gpu/drm/amd/amdgpu/si_dma.c | 2 +- drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c | 8 +- drivers/gpu/drm/amd/amdgpu/umc_v6_1.c | 9 +- drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c | 8 +- drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 4 +- drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 6 +- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 16 +-- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 10 +- drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 6 +- drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 8 +- drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 6 +- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 15 +-- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 4 +-
Quoted 9 lines
.../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 2 +- .../amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 8 +- .../gpu/drm/amd/display/dc/link/link_dpms.c | 114 +++++------------- .../link/protocols/link_edp_panel_control.c | 9 +- drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 20 +-- drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 5 +- .../gpu/drm/amd/pm/powerplay/amd_powerplay.c | 7 +- 81 files changed, 352 insertions(+), 383 deletions(-)