drm/amd/amdgpu: Convert messages in gmc v6 to dev_*()
Subsystems (2)
PATCH 1/1 drm/amd/amdgpu: Convert messages in gmc v6 to dev_*()
Make the kernel log messaging more consistent and use the dev_*() functions instead of a mix of DRM_*() and printk().
--- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +8 -8
@@ -126,7 +126,7 @@ static int gmc_v6_0_init_microcode(struct amdgpu_device *adev) out:if (err) { -printk (KERN_ERR +dev_err (adev->dev,"si_mc: Failed to load firmware \"%s\"\n" , fw_name);release_firmware (adev->mc.fw);
@@ -452,7 +452,7 @@ static int gmc_v6_0_gart_enable(struct amdgpu_device *adev) WRITE_PROTECTION_FAULT_ENABLE_DEFAULT);gmc_v6_0_gart_flush_gpu_tlb (adev,0 ); -DRM_INFO ("PCIE GART of %uM enabled (table at 0x%016llX).\n" , +dev_info (adev->dev,"PCIE GART of %uM enabled (table at 0x%016llX).\n" , (unsigned )(adev->mc.gtt_size >>20 ), (unsigned long long )adev->gart.table_addr); adev->gart.ready = true;
@@ -464,7 +464,7 @@ static int gmc_v6_0_gart_init(struct amdgpu_device *adev)int r;if (adev->gart.robj) { -WARN (1 ,"gmc_v6_0 PCIE GART already initialized\n" ); +dev_warn (adev->dev,"gmc_v6_0 PCIE GART already initialized\n" );return 0 ; } r =amdgpu_gart_init (adev);
@@ -549,7 +549,7 @@ static void gmc_v6_0_vm_decode_fault(struct amdgpu_device *adev, mc_id =REG_GET_FIELD (status, mmVM_CONTEXT1_PROTECTION_FAULT_STATUS, xxMEMORY_CLIENT_ID); - printk("VM fault (0x%02x, vmid %d) at page %u, %s from '%s' (0x%08x) (%d)\n", + dev_err(adev->dev, "VM fault (0x%02x, vmid %d) at page %u, %s from '%s' (0x%08x) (%d)\n", protections, vmid, addr, REG_GET_FIELD(status, mmVM_CONTEXT1_PROTECTION_FAULT_STATUS, xxMEMORY_CLIENT_RW) ?
@@ -752,17 +752,17 @@ static int gmc_v6_0_sw_init(void *handle)if (r) { adev->need_dma32 = true; dma_bits =32 ; -printk (KERN_WARNING "amdgpu: No suitable DMA available.\n" ); +dev_warn (adev->dev,"amdgpu: No suitable DMA available.\n" ); } r =pci_set_consistent_dma_mask (adev->pdev,DMA_BIT_MASK (dma_bits));if (r) {pci_set_consistent_dma_mask (adev->pdev,DMA_BIT_MASK (32 )); -printk (KERN_WARNING "amdgpu: No coherent DMA available.\n" ); +dev_warn (adev->dev,"amdgpu: No coherent DMA available.\n" ); } r =gmc_v6_0_init_microcode (adev);if (r) { -DRM_ERROR ("Failed to load mc firmware!\n" ); +dev_warn (adev->dev,"Failed to load mc firmware!\n" );return r; }
@@ -820,7 +820,7 @@ static int gmc_v6_0_hw_init(void *handle)if (!(adev->flags &AMD_IS_APU )) { r =gmc_v6_0_mc_load_microcode (adev);if (r) { -DRM_ERROR ("Failed to load MC firmware!\n" ); +dev_err (adev->dev,"Failed to load MC firmware!\n" );return r; } }
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): [email protected]
Deucher, Alexander
Reviewed-by Alex DeucherQuoted 8 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Tom St Denis
Sent: Wednesday, September 07, 2016 8:15 AM
To: [email protected]
Cc: StDenis, Tom
Subject: [PATCH] drm/amd/amdgpu: Convert messages in gmc v6 to dev_*()
Quoted 4 lines
Make the kernel log messaging more consistent and use the dev_*() functions instead of a mix of DRM_*() and
printk().Signed-off-by Tom St Denis <[email protected]>
Quoted 96 lines
--- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +1
-1@@ -126,7 +126,7 @@ static int gmc_v6_0_init_microcode(struct amdgpu_device *adev) out: if (err) { -printk (KERN_ERR +dev_err (adev->dev,"si_mc: Failed to load firmware \"%s\"\n" , fw_name);drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +1
-1release_firmware (adev->mc.fw);@@ -452,7 +452,7 @@ static int gmc_v6_0_gart_enable(struct amdgpu_device *adev) WRITE_PROTECTION_FAULT_ENABLE_DEFAULT);gmc_v6_0_gart_flush_gpu_tlb (adev,0 ); -DRM_INFO ("PCIE GART of %uM enabled (table at 0x%016llX).\n" , + dev_info(adev->dev, "PCIE GART of %uM enabled (table at 0x%016llX).\n",drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +1
-1(unsigned )(adev->mc.gtt_size >>20 ), (unsigned long long)adev->gart.table_addr); adev->gart.ready = true;@@ -464,7 +464,7 @@ static int gmc_v6_0_gart_init(struct amdgpu_device *adev)int r;if (adev->gart.robj) { -WARN (1 ,"gmc_v6_0 PCIE GART already initialized\n" ); +dev_warn (adev->dev,"gmc_v6_0 PCIE GART already initialized\n");return 0 ;drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +1
-1} r =amdgpu_gart_init (adev);@@ -549,7 +549,7 @@ static void gmc_v6_0_vm_decode_fault(structamdgpu_device *adev, mc_id =REG_GET_FIELD (status, mmVM_CONTEXT1_PROTECTION_FAULT_STATUS, xxMEMORY_CLIENT_ID); - printk("VM fault (0x%02x, vmid %d) at page %u, %s from '%s' (0x%08x) (%d)\n", + dev_err(adev->dev, "VM fault (0x%02x, vmid %d) at page %u, %sfrom '%s' (0x%08x) (%d)\n",
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +0
-0protections, vmid, addr, REG_GET_FIELD(status,
mmVM_CONTEXT1_PROTECTION_FAULT_STATUS,drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +2
-2xxMEMORY_CLIENT_RW) ?@@ -752,17 +752,17 @@ static int gmc_v6_0_sw_init(void *handle)if (r) { adev->need_dma32 = true; dma_bits =32 ; - printk(KERN_WARNING "amdgpu: No suitable DMA available.\n"); + dev_warn(adev->dev, "amdgpu: No suitable DMA available.\n"); } r =pci_set_consistent_dma_mask (adev->pdev,DMA_BIT_MASK (dma_bits));if (r) {pci_set_consistent_dma_mask (adev->pdev,DMA_BIT_MASK (32 )); - printk(KERN_WARNING "amdgpu: No coherent DMA available.\n"); + dev_warn(adev->dev, "amdgpu: No coherent DMA available.\n"); }drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +2
-2r =gmc_v6_0_init_microcode (adev);if (r) { -DRM_ERROR ("Failed to load mc firmware!\n" ); +dev_warn (adev->dev,"Failed to load mc firmware!\n" );return r; }@@ -820,7 +820,7 @@ static int gmc_v6_0_hw_init(void *handle)if (!(adev->flags &AMD_IS_APU )) { r =gmc_v6_0_mc_load_microcode (adev);if (r) { -DRM_ERROR ("Failed to load MC firmware!\n" ); +dev_err (adev->dev,"Failed to load MC firmware!\n");return r; }}
--
2.9.3
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx