[PATCH 2/7] drm/amdgpu: add init_log param to control logs in exclusive mode

Deucher, Alexander Alexander.Deucher at amd.com
Mon Oct 23 16:34:24 UTC 2017


> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Pixel Ding
> Sent: Monday, October 23, 2017 6:03 AM
> To: amd-gfx at lists.freedesktop.org
> Cc: Sun, Gary; Ding, Pixel; Li, Bingley
> Subject: [PATCH 2/7] drm/amdgpu: add init_log param to control logs in
> exclusive mode
> 
> From: pding <Pixel.Ding at amd.com>
> 
> When this VF stays in exclusive mode for long, other VFs will be
> impacted.
> 
> The redundant messages causes exclusive mode timeout when they're
> redirected. That is a normal use case for cloud service to redirect
> guest log to virtual serial port.
> 
> Introduce init_log param to control logs during exclusive mode. The
> default behavior is not changed. Exclusive time decreases 200ms if log
> direction is enabled with this change.

Let's not add another module parameter.  It's getting to be a mess.  I'd prefer to just make some of these debug only or bare metal only.  I think a few others can be dropped.  See additional comments below.

> 
> Signed-off-by: pding <Pixel.Ding at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu.h           | 13 +++++++++++++
>  drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c  |  8 ++++----
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c    | 20 +++++++++----------
> -
>  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c       |  4 ++++
>  drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c     |  6 +++---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c      |  4 ++--
>  drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c       |  4 ++--
>  drivers/gpu/drm/amd/amdgpu/amdgpu_object.c    | 10 +++++-----
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c       |  8 ++++----
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c       |  2 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c       |  4 ++--
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c        |  6 +++---
>  drivers/gpu/drm/amd/amdgpu/atom.c             |  2 +-
>  drivers/gpu/drm/amd/amdgpu/cik_sdma.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/gmc_v6_0.c         |  6 +++---
>  drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c         |  6 +++---
>  drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c         |  6 +++---
>  drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c         |  6 +++---
>  drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c        |  2 +-
>  drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c        |  2 +-
>  drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c        |  2 +-
>  drivers/gpu/drm/amd/amdgpu/si_dma.c           |  2 +-
>  drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c         |  2 +-
>  drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c         |  2 +-
>  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c         |  4 ++--
>  drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c         |  4 ++--
>  drivers/gpu/drm/amd/powerplay/amd_powerplay.c |  3 ++-
>  31 files changed, 82 insertions(+), 66 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> index 774edc1..f08bb9c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> @@ -126,6 +126,7 @@ extern int amdgpu_param_buf_per_se;
>  extern int amdgpu_job_hang_limit;
>  extern int amdgpu_lbpw;
>  extern int amdgpu_compute_multipipe;
> +extern int amdgpu_init_log;
> 
>  #ifdef CONFIG_DRM_AMDGPU_SI
>  extern int amdgpu_si_support;
> @@ -134,6 +135,18 @@ extern int amdgpu_si_support;
>  extern int amdgpu_cik_support;
>  #endif
> 
> +#define INIT_INFO(fmt, ...)					\
> +	do {							\
> +		if (amdgpu_init_log)				\
> +			DRM_INFO(fmt, ##__VA_ARGS__);		\
> +	} while (0)						\
> +
> +#define INIT_DEV_INFO(dev, fmt, ...)				\
> +	do {							\
> +		if (amdgpu_init_log)				\
> +			dev_info(dev, fmt, ##__VA_ARGS__);	\
> +	} while (0)						\
> +

Rather than using a module parameter here, just disable it for SR-IOV.

>  #define AMDGPU_DEFAULT_GTT_SIZE_MB		3072ULL /* 3GB by
> default */
>  #define AMDGPU_WAIT_IDLE_TIMEOUT_IN_MS	        3000
>  #define AMDGPU_MAX_USEC_TIMEOUT			100000	/* 100
> ms */
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
> index f66d33e..5ff786a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
> @@ -690,12 +690,12 @@ int amdgpu_atombios_get_clock_info(struct
> amdgpu_device *adev)
>  			le32_to_cpu(firmware_info-
> >info_21.ulDefaultDispEngineClkFreq);
>  		/* set a reasonable default for DP */
>  		if (adev->clock.default_dispclk < 53900) {
> -			DRM_INFO("Changing default dispclk from %dMhz to
> 600Mhz\n",
> -				 adev->clock.default_dispclk / 100);
> +			INIT_INFO("Changing default dispclk from %dMhz to
> 600Mhz\n",
> +				  adev->clock.default_dispclk / 100);

You can use DRM_DEBUG here.

>  			adev->clock.default_dispclk = 60000;
>  		} else if (adev->clock.default_dispclk <= 60000) {
> -			DRM_INFO("Changing default dispclk from %dMhz to
> 625Mhz\n",
> -				 adev->clock.default_dispclk / 100);
> +			INIT_INFO("Changing default dispclk from %dMhz to
> 625Mhz\n",
> +				  adev->clock.default_dispclk / 100);
>  			adev->clock.default_dispclk = 62500;
>  		}

Same here.

>  		adev->clock.dp_extclk =
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 286ba3c..3458d46 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -613,9 +613,9 @@ void amdgpu_vram_location(struct amdgpu_device
> *adev, struct amdgpu_mc *mc, u64
>  	mc->vram_end = mc->vram_start + mc->mc_vram_size - 1;
>  	if (limit && limit < mc->real_vram_size)
>  		mc->real_vram_size = limit;
> -	dev_info(adev->dev, "VRAM: %lluM 0x%016llX - 0x%016llX (%lluM
> used)\n",
> -			mc->mc_vram_size >> 20, mc->vram_start,
> -			mc->vram_end, mc->real_vram_size >> 20);
> +	INIT_DEV_INFO(adev->dev, "VRAM: %lluM 0x%016llX - 0x%016llX
> (%lluM used)\n",
> +		      mc->mc_vram_size >> 20, mc->vram_start,
> +		      mc->vram_end, mc->real_vram_size >> 20);

This one is useful.  I'd suggest either dropping this hunk or making it bare metal only.

>  }
> 
>  /**
> @@ -650,8 +650,8 @@ void amdgpu_gart_location(struct amdgpu_device
> *adev, struct amdgpu_mc *mc)
>  		mc->gart_start = mc->vram_end + 1;
>  	}
>  	mc->gart_end = mc->gart_start + mc->gart_size - 1;
> -	dev_info(adev->dev, "GTT: %lluM 0x%016llX - 0x%016llX\n",
> -			mc->gart_size >> 20, mc->gart_start, mc->gart_end);
> +	INIT_DEV_INFO(adev->dev, "GTT: %lluM 0x%016llX - 0x%016llX\n",
> +		      mc->gart_size >> 20, mc->gart_start, mc->gart_end);

Same here.

>  }
> 
>  /*
> @@ -1029,7 +1029,7 @@ static int amdgpu_atombios_init(struct
> amdgpu_device *adev)
>  		atom_card_info->ioreg_read = cail_ioreg_read;
>  		atom_card_info->ioreg_write = cail_ioreg_write;
>  	} else {
> -		DRM_INFO("PCI I/O BAR is not found. Using MMIO to access
> ATOM BIOS\n");
> +		INIT_INFO("PCI I/O BAR is not found. Using MMIO to access
> ATOM BIOS\n");

This can be changed to DRM_DEBUG.

>  		atom_card_info->ioreg_read = cail_reg_read;
>  		atom_card_info->ioreg_write = cail_reg_write;
>  	}
> @@ -1716,10 +1716,8 @@ static int amdgpu_init(struct amdgpu_device
> *adev)
>  		adev->ip_blocks[i].status.hw = true;
>  	}
> 
> -	if (amdgpu_sriov_vf(adev)) {
> -		DRM_INFO("rel_init\n");
> +	if (amdgpu_sriov_vf(adev))
>  		amdgpu_virt_release_full_gpu(adev, true);
> -	}
> 
>  	return 0;
>  }
> @@ -2264,14 +2262,14 @@ int amdgpu_device_init(struct amdgpu_device
> *adev,
>  			r = -EINVAL;
>  			goto failed;
>  		}
> -		DRM_INFO("GPU posting now...\n");
> +		INIT_INFO("GPU posting now...\n");

This is useful.  I'd suggest either dropping this hunk or making it bare metal only.

>  		r = amdgpu_atom_asic_init(adev-
> >mode_info.atom_context);
>  		if (r) {
>  			dev_err(adev->dev, "gpu post error!\n");
>  			goto failed;
>  		}
>  	} else {
> -		DRM_INFO("GPU post is not needed\n");
> +		INIT_INFO("GPU post is not needed\n");

This can be dropped.

>  	}
> 
>  	if (adev->is_atom_fw) {
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index c2f414f..6230adc 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -128,6 +128,7 @@ int amdgpu_param_buf_per_se = 0;
>  int amdgpu_job_hang_limit = 0;
>  int amdgpu_lbpw = -1;
>  int amdgpu_compute_multipipe = -1;
> +int amdgpu_init_log = 1;
> 
>  MODULE_PARM_DESC(vramlimit, "Restrict VRAM for testing, in
> megabytes");
>  module_param_named(vramlimit, amdgpu_vram_limit, int, 0600);
> @@ -280,6 +281,9 @@ module_param_named(lbpw, amdgpu_lbpw, int,
> 0444);
>  MODULE_PARM_DESC(compute_multipipe, "Force compute queues to be
> spread across pipes (1 = enable, 0 = disable, -1 = auto)");
>  module_param_named(compute_multipipe, amdgpu_compute_multipipe,
> int, 0444);
> 
> +MODULE_PARM_DESC(init_log, "log output during initialization (1 = enable,
> 0 = disable)");
> +module_param_named(init_log, amdgpu_init_log, int, 0444);
> +
>  #ifdef CONFIG_DRM_AMDGPU_SI
> 
>  #if defined(CONFIG_DRM_RADEON) ||
> defined(CONFIG_DRM_RADEON_MODULE)
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> index fb9f88ef..6c4c50f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> @@ -390,9 +390,9 @@ int amdgpu_fence_driver_start_ring(struct
> amdgpu_ring *ring,
>  	ring->fence_drv.irq_type = irq_type;
>  	ring->fence_drv.initialized = true;
> 
> -	dev_info(adev->dev, "fence driver on ring %d use gpu addr
> 0x%016llx, "
> -		 "cpu addr 0x%p\n", ring->idx,
> -		 ring->fence_drv.gpu_addr, ring->fence_drv.cpu_addr);
> +	INIT_DEV_INFO(adev->dev, "fence driver on ring %d use gpu addr
> 0x%016llx, "
> +		      "cpu addr 0x%p\n", ring->idx,
> +		      ring->fence_drv.gpu_addr, ring->fence_drv.cpu_addr);

This could be switched to DRM_DEBUG.

>  	return 0;
>  }
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
> index f437008..7ce8105 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
> @@ -370,8 +370,8 @@ int amdgpu_gart_init(struct amdgpu_device *adev)
>  	/* Compute table size */
>  	adev->gart.num_cpu_pages = adev->mc.gart_size / PAGE_SIZE;
>  	adev->gart.num_gpu_pages = adev->mc.gart_size /
> AMDGPU_GPU_PAGE_SIZE;
> -	DRM_INFO("GART: num cpu pages %u, num gpu pages %u\n",
> -		 adev->gart.num_cpu_pages, adev->gart.num_gpu_pages);
> +	INIT_INFO("GART: num cpu pages %u, num gpu pages %u\n",
> +		  adev->gart.num_cpu_pages, adev->gart.num_gpu_pages);

This is also useful.  I'd suggest either dropping this hunk or making it bare metal only.

> 
>  #ifdef CONFIG_DRM_AMDGPU_GART_DEBUGFS
>  	/* Allocate pages table */
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> index 47c5ce9..c2d8255 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> @@ -232,7 +232,7 @@ int amdgpu_irq_init(struct amdgpu_device *adev)
>  		int ret = pci_enable_msi(adev->pdev);
>  		if (!ret) {
>  			adev->irq.msi_enabled = true;
> -			dev_info(adev->dev, "amdgpu: using MSI.\n");
> +			INIT_DEV_INFO(adev->dev, "amdgpu: using
> MSI.\n");

Make this debug only.

>  		}
>  	}
> 
> @@ -262,7 +262,7 @@ int amdgpu_irq_init(struct amdgpu_device *adev)
>  		return r;
>  	}
> 
> -	DRM_INFO("amdgpu: irq initialized.\n");
> +	INIT_INFO("amdgpu: irq initialized.\n");

Use DRM_DEBUG.

>  	return 0;
>  }
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> index 8b4ed8a..d86805a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> @@ -778,11 +778,11 @@ int amdgpu_bo_init(struct amdgpu_device *adev)
>  	/* Add an MTRR for the VRAM */
>  	adev->mc.vram_mtrr = arch_phys_wc_add(adev->mc.aper_base,
>  					      adev->mc.aper_size);
> -	DRM_INFO("Detected VRAM RAM=%lluM, BAR=%lluM\n",
> -		adev->mc.mc_vram_size >> 20,
> -		(unsigned long long)adev->mc.aper_size >> 20);
> -	DRM_INFO("RAM width %dbits %s\n",
> -		 adev->mc.vram_width, amdgpu_vram_names[adev-
> >mc.vram_type]);
> +	INIT_INFO("Detected VRAM RAM=%lluM, BAR=%lluM\n",
> +		  adev->mc.mc_vram_size >> 20,
> +		  (unsigned long long)adev->mc.aper_size >> 20);
> +	INIT_INFO("RAM width %dbits %s\n",
> +		  adev->mc.vram_width, amdgpu_vram_names[adev-
> >mc.vram_type]);

This is also useful.  I'd suggest either dropping this hunk or making it bare metal only.

>  	return amdgpu_ttm_init(adev);
>  }
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> index dcdfb8d..95a50c3 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> @@ -1348,8 +1348,8 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)
>  				    NULL, NULL);
>  	if (r)
>  		return r;
> -	DRM_INFO("amdgpu: %uM of VRAM memory ready\n",
> -		 (unsigned) (adev->mc.real_vram_size / (1024 * 1024)));
> +	INIT_INFO("amdgpu: %uM of VRAM memory ready\n",
> +		  (unsigned) (adev->mc.real_vram_size / (1024 * 1024)));
> 

This is also useful.  I'd suggest either dropping this hunk or making it bare metal only.

>  	if (amdgpu_gtt_size == -1)
>  		gtt_size = max((AMDGPU_DEFAULT_GTT_SIZE_MB << 20),
> @@ -1361,8 +1361,8 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)
>  		DRM_ERROR("Failed initializing GTT heap.\n");
>  		return r;
>  	}
> -	DRM_INFO("amdgpu: %uM of GTT memory ready.\n",
> -		 (unsigned)(gtt_size / (1024 * 1024)));
> +	INIT_INFO("amdgpu: %uM of GTT memory ready.\n",
> +		  (unsigned)(gtt_size / (1024 * 1024)));
> 

This is also useful.  I'd suggest either dropping this hunk or making it bare metal only.

>  	adev->gds.mem.total_size = adev->gds.mem.total_size <<
> AMDGPU_GDS_SHIFT;
>  	adev->gds.mem.gfx_partition_size = adev-
> >gds.mem.gfx_partition_size << AMDGPU_GDS_SHIFT;
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> index b46280c..940f666 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> @@ -954,7 +954,7 @@ int amdgpu_vce_ring_test_ring(struct amdgpu_ring
> *ring)
>  	}
> 
>  	if (i < timeout) {
> -		DRM_INFO("ring test on %d succeeded in %d usecs\n",
> +		INIT_INFO("ring test on %d succeeded in %d usecs\n",
>  			 ring->idx, i);

DRM_DEBUG.

>  	} else {
>  		DRM_ERROR("amdgpu: ring %d test failed\n",
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> index 041e012..5ca7d4e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> @@ -261,7 +261,7 @@ int amdgpu_vcn_dec_ring_test_ring(struct
> amdgpu_ring *ring)
>  	}
> 
>  	if (i < adev->usec_timeout) {
> -		DRM_INFO("ring test on %d succeeded in %d usecs\n",
> +		INIT_INFO("ring test on %d succeeded in %d usecs\n",
>  			 ring->idx, i);

DRM_DEBUG.

>  	} else {
>  		DRM_ERROR("amdgpu: ring %d test failed (0x%08X)\n",
> @@ -500,7 +500,7 @@ int amdgpu_vcn_enc_ring_test_ring(struct
> amdgpu_ring *ring)
>  	}
> 
>  	if (i < adev->usec_timeout) {
> -		DRM_INFO("ring test on %d succeeded in %d usecs\n",
> +		INIT_INFO("ring test on %d succeeded in %d usecs\n",

DRM_DEBUG.

>  			 ring->idx, i);
>  	} else {
>  		DRM_ERROR("amdgpu: ring %d test failed\n",
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index ef8b7a9..908779b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -2594,9 +2594,9 @@ void amdgpu_vm_adjust_size(struct
> amdgpu_device *adev, uint64_t vm_size,
> 
>  	amdgpu_vm_set_fragment_size(adev, fragment_size_default);
> 
> -	DRM_INFO("vm size is %llu GB, block size is %u-bit, fragment size is
> %u-bit\n",
> -		adev->vm_manager.vm_size, adev-
> >vm_manager.block_size,
> -		adev->vm_manager.fragment_size);
> +	INIT_INFO("vm size is %llu GB, block size is %u-bit, fragment size is
> %u-bit\n",
> +		  adev->vm_manager.vm_size, adev-
> >vm_manager.block_size,
> +		  adev->vm_manager.fragment_size);

This is also useful.  I'd suggest either dropping this hunk or making it bare metal only.

>  }
> 
>  /**
> diff --git a/drivers/gpu/drm/amd/amdgpu/atom.c
> b/drivers/gpu/drm/amd/amdgpu/atom.c
> index 69500a8..bfb308e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/atom.c
> +++ b/drivers/gpu/drm/amd/amdgpu/atom.c
> @@ -1344,7 +1344,7 @@ struct atom_context *amdgpu_atom_parse(struct
> card_info *card, void *bios)
> 
>  	str = CSTR(idx);
>  	if (*str != '\0') {
> -		pr_info("ATOM BIOS: %s\n", str);
> +		INIT_INFO("ATOM BIOS: %s\n", str);

This is also useful.  I'd suggest either dropping this hunk or making it bare metal only.

>  		strlcpy(ctx->vbios_version, str, sizeof(ctx->vbios_version));
>  	}
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
> b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
> index 60cecd1..18268c9 100644
> --- a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
> +++ b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
> @@ -657,7 +657,7 @@ static int cik_sdma_ring_test_ring(struct amdgpu_ring
> *ring)
>  	}
> 
>  	if (i < adev->usec_timeout) {
> -		DRM_INFO("ring test on %d succeeded in %d usecs\n", ring-
> >idx, i);
> +		INIT_INFO("ring test on %d succeeded in %d usecs\n", ring-
> >idx, i);

DRM_DEBUG

>  	} else {
>  		DRM_ERROR("amdgpu: ring %d test failed (0x%08X)\n",
>  			  ring->idx, tmp);
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
> b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
> index dbbe986..a4771a6 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
> @@ -1798,7 +1798,7 @@ static int gfx_v6_0_ring_test_ring(struct
> amdgpu_ring *ring)
>  		DRM_UDELAY(1);
>  	}
>  	if (i < adev->usec_timeout) {
> -		DRM_INFO("ring test on %d succeeded in %d usecs\n", ring-
> >idx, i);
> +		INIT_INFO("ring test on %d succeeded in %d usecs\n", ring-
> >idx, i);

DRM_DEBUG

>  	} else {
>  		DRM_ERROR("amdgpu: ring %d test failed
> (scratch(0x%04X)=0x%08X)\n",
>  			  ring->idx, scratch, tmp);
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
> b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
> index 0086876..7de5d68 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
> @@ -2069,7 +2069,7 @@ static int gfx_v7_0_ring_test_ring(struct
> amdgpu_ring *ring)
>  		DRM_UDELAY(1);
>  	}
>  	if (i < adev->usec_timeout) {
> -		DRM_INFO("ring test on %d succeeded in %d usecs\n", ring-
> >idx, i);
> +		INIT_INFO("ring test on %d succeeded in %d usecs\n", ring-
> >idx, i);

DRM_DEBUG

>  	} else {
>  		DRM_ERROR("amdgpu: ring %d test failed
> (scratch(0x%04X)=0x%08X)\n",
>  			  ring->idx, scratch, tmp);
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> index b8002ac..fd38cb1 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> @@ -804,7 +804,7 @@ static int gfx_v8_0_ring_test_ring(struct amdgpu_ring
> *ring)
>  		DRM_UDELAY(1);
>  	}
>  	if (i < adev->usec_timeout) {
> -		DRM_INFO("ring test on %d succeeded in %d usecs\n",
> +		INIT_INFO("ring test on %d succeeded in %d usecs\n",
>  			 ring->idx, i);

DRM_DEBUG.

>  	} else {
>  		DRM_ERROR("amdgpu: ring %d test failed
> (scratch(0x%04X)=0x%08X)\n",
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> index 8738b13..50124ab 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> @@ -318,7 +318,7 @@ static int gfx_v9_0_ring_test_ring(struct amdgpu_ring
> *ring)
>  		DRM_UDELAY(1);
>  	}
>  	if (i < adev->usec_timeout) {
> -		DRM_INFO("ring test on %d succeeded in %d usecs\n",
> +		INIT_INFO("ring test on %d succeeded in %d usecs\n",
>  			 ring->idx, i);

DRM_DEBUG.

>  	} else {
>  		DRM_ERROR("amdgpu: ring %d test failed
> (scratch(0x%04X)=0x%08X)\n",
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> index f4603a7..3b5f6bb 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> @@ -560,9 +560,9 @@ static int gmc_v6_0_gart_enable(struct
> amdgpu_device *adev)
>  		gmc_v6_0_set_fault_enable_default(adev, true);
> 
>  	gmc_v6_0_gart_flush_gpu_tlb(adev, 0);
> -	dev_info(adev->dev, "PCIE GART of %uM enabled (table at
> 0x%016llX).\n",
> -		 (unsigned)(adev->mc.gart_size >> 20),
> -		 (unsigned long long)adev->gart.table_addr);
> +	INIT_DEV_INFO(adev->dev, "PCIE GART of %uM enabled (table at
> 0x%016llX).\n",
> +		      (unsigned)(adev->mc.gart_size >> 20),
> +		      (unsigned long long)adev->gart.table_addr);

This is also useful.  I'd suggest either dropping this hunk or making it bare metal only.

>  	adev->gart.ready = true;
>  	return 0;
>  }
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
> b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
> index b0528ca..23bf504 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
> @@ -674,9 +674,9 @@ static int gmc_v7_0_gart_enable(struct
> amdgpu_device *adev)
>  	}
> 
>  	gmc_v7_0_gart_flush_gpu_tlb(adev, 0);
> -	DRM_INFO("PCIE GART of %uM enabled (table at 0x%016llX).\n",
> -		 (unsigned)(adev->mc.gart_size >> 20),
> -		 (unsigned long long)adev->gart.table_addr);
> +	INIT_INFO("PCIE GART of %uM enabled (table at 0x%016llX).\n",
> +		  (unsigned)(adev->mc.gart_size >> 20),
> +		  (unsigned long long)adev->gart.table_addr);

This is also useful.  I'd suggest either dropping this hunk or making it bare metal only.

>  	adev->gart.ready = true;
>  	return 0;
>  }
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
> b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
> index f368cfe..84ae01b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
> @@ -890,9 +890,9 @@ static int gmc_v8_0_gart_enable(struct
> amdgpu_device *adev)
>  		gmc_v8_0_set_fault_enable_default(adev, true);
> 
>  	gmc_v8_0_gart_flush_gpu_tlb(adev, 0);
> -	DRM_INFO("PCIE GART of %uM enabled (table at 0x%016llX).\n",
> -		 (unsigned)(adev->mc.gart_size >> 20),
> -		 (unsigned long long)adev->gart.table_addr);
> +	INIT_INFO("PCIE GART of %uM enabled (table at 0x%016llX).\n",
> +		  (unsigned)(adev->mc.gart_size >> 20),
> +		  (unsigned long long)adev->gart.table_addr);

This is also useful.  I'd suggest either dropping this hunk or making it bare metal only.

>  	adev->gart.ready = true;
>  	return 0;
>  }
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> index 6216993..3dac031 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> @@ -756,9 +756,9 @@ static int gmc_v9_0_gart_enable(struct
> amdgpu_device *adev)
>  	mmhub_v1_0_set_fault_enable_default(adev, value);
>  	gmc_v9_0_gart_flush_gpu_tlb(adev, 0);
> 
> -	DRM_INFO("PCIE GART of %uM enabled (table at 0x%016llX).\n",
> -		 (unsigned)(adev->mc.gart_size >> 20),
> -		 (unsigned long long)adev->gart.table_addr);
> +	INIT_INFO("PCIE GART of %uM enabled (table at 0x%016llX).\n",
> +		  (unsigned)(adev->mc.gart_size >> 20),
> +		  (unsigned long long)adev->gart.table_addr);

This is also useful.  I'd suggest either dropping this hunk or making it bare metal only.

>  	adev->gart.ready = true;
>  	return 0;
>  }
> diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
> b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
> index 67f375b..8fd1451 100644
> --- a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
> +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
> @@ -633,7 +633,7 @@ static int sdma_v2_4_ring_test_ring(struct
> amdgpu_ring *ring)
>  	}
> 
>  	if (i < adev->usec_timeout) {
> -		DRM_INFO("ring test on %d succeeded in %d usecs\n", ring-
> >idx, i);
> +		INIT_INFO("ring test on %d succeeded in %d usecs\n", ring-
> >idx, i);

DRM_DEBUG

>  	} else {
>  		DRM_ERROR("amdgpu: ring %d test failed (0x%08X)\n",
>  			  ring->idx, tmp);
> diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
> b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
> index 6d06f8e..540b42a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
> @@ -893,7 +893,7 @@ static int sdma_v3_0_ring_test_ring(struct
> amdgpu_ring *ring)
>  	}
> 
>  	if (i < adev->usec_timeout) {
> -		DRM_INFO("ring test on %d succeeded in %d usecs\n", ring-
> >idx, i);
> +		INIT_INFO("ring test on %d succeeded in %d usecs\n", ring-
> >idx, i);

DRM_DEBUG.

>  	} else {
>  		DRM_ERROR("amdgpu: ring %d test failed (0x%08X)\n",
>  			  ring->idx, tmp);
> diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
> b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
> index 46009db..bf8e06a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
> @@ -919,7 +919,7 @@ static int sdma_v4_0_ring_test_ring(struct
> amdgpu_ring *ring)
>  	}
> 
>  	if (i < adev->usec_timeout) {
> -		DRM_INFO("ring test on %d succeeded in %d usecs\n", ring-
> >idx, i);
> +		INIT_INFO("ring test on %d succeeded in %d usecs\n", ring-
> >idx, i);

DRM_DEBUG.

>  	} else {
>  		DRM_ERROR("amdgpu: ring %d test failed (0x%08X)\n",
>  			  ring->idx, tmp);
> diff --git a/drivers/gpu/drm/amd/amdgpu/si_dma.c
> b/drivers/gpu/drm/amd/amdgpu/si_dma.c
> index 3fa2fbf..c356338 100644
> --- a/drivers/gpu/drm/amd/amdgpu/si_dma.c
> +++ b/drivers/gpu/drm/amd/amdgpu/si_dma.c
> @@ -252,7 +252,7 @@ static int si_dma_ring_test_ring(struct amdgpu_ring
> *ring)
>  	}
> 
>  	if (i < adev->usec_timeout) {
> -		DRM_INFO("ring test on %d succeeded in %d usecs\n", ring-
> >idx, i);
> +		INIT_INFO("ring test on %d succeeded in %d usecs\n", ring-
> >idx, i);

DRM_DEBUG.

>  	} else {
>  		DRM_ERROR("amdgpu: ring %d test failed (0x%08X)\n",
>  			  ring->idx, tmp);
> diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
> b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
> index 8ab0f78..c31f4d7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
> +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
> @@ -521,7 +521,7 @@ static int uvd_v4_2_ring_test_ring(struct
> amdgpu_ring *ring)
>  	}
> 
>  	if (i < adev->usec_timeout) {
> -		DRM_INFO("ring test on %d succeeded in %d usecs\n",
> +		INIT_INFO("ring test on %d succeeded in %d usecs\n",
>  			 ring->idx, i);

DRM_DEBUG.

>  	} else {
>  		DRM_ERROR("amdgpu: ring %d test failed (0x%08X)\n",
> diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
> b/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
> index bb6d46e..a62804b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
> @@ -536,7 +536,7 @@ static int uvd_v5_0_ring_test_ring(struct
> amdgpu_ring *ring)
>  	}
> 
>  	if (i < adev->usec_timeout) {
> -		DRM_INFO("ring test on %d succeeded in %d usecs\n",
> +		INIT_INFO("ring test on %d succeeded in %d usecs\n",
>  			 ring->idx, i);

DRM_DEBUG.

>  	} else {
>  		DRM_ERROR("amdgpu: ring %d test failed (0x%08X)\n",
> diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
> b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
> index 71299c6..1f8093a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
> @@ -184,7 +184,7 @@ static int uvd_v6_0_enc_ring_test_ring(struct
> amdgpu_ring *ring)
>  	}
> 
>  	if (i < adev->usec_timeout) {
> -		DRM_INFO("ring test on %d succeeded in %d usecs\n",
> +		INIT_INFO("ring test on %d succeeded in %d usecs\n",
>  			 ring->idx, i);

DRM_DEBUG.

>  	} else {
>  		DRM_ERROR("amdgpu: ring %d test failed\n",
> @@ -1010,7 +1010,7 @@ static int uvd_v6_0_ring_test_ring(struct
> amdgpu_ring *ring)
>  	}
> 
>  	if (i < adev->usec_timeout) {
> -		DRM_INFO("ring test on %d succeeded in %d usecs\n",
> +		INIT_INFO("ring test on %d succeeded in %d usecs\n",
>  			 ring->idx, i);

DRM_DEBUG.

>  	} else {
>  		DRM_ERROR("amdgpu: ring %d test failed (0x%08X)\n",
> diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
> b/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
> index b8ed8fa..3d73542 100644
> --- a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
> @@ -184,7 +184,7 @@ static int uvd_v7_0_enc_ring_test_ring(struct
> amdgpu_ring *ring)
>  	}
> 
>  	if (i < adev->usec_timeout) {
> -		DRM_INFO("ring test on %d succeeded in %d usecs\n",
> +		INIT_INFO("ring test on %d succeeded in %d usecs\n",
>  			 ring->idx, i);

DRM_DEBUG.

>  	} else {
>  		DRM_ERROR("amdgpu: ring %d test failed\n",
> @@ -1198,7 +1198,7 @@ static int uvd_v7_0_ring_test_ring(struct
> amdgpu_ring *ring)
>  	}
> 
>  	if (i < adev->usec_timeout) {
> -		DRM_INFO("ring test on %d succeeded in %d usecs\n",
> +		INIT_INFO("ring test on %d succeeded in %d usecs\n",
>  			 ring->idx, i);

DRM_DEBUG.

>  	} else {
>  		DRM_ERROR("amdgpu: ring %d test failed (0x%08X)\n",
> diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> index 6b0cf8e..4de4d63 100644
> --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> @@ -29,6 +29,7 @@
>  #include "amd_powerplay.h"
>  #include "pp_instance.h"
>  #include "power_state.h"
> +#include "amdgpu.h"
> 
>  #define PP_DPM_DISABLED 0xCCCC
> 
> @@ -119,7 +120,7 @@ static int pp_sw_init(void *handle)
> 
>  		ret = hwmgr->smumgr_funcs->smu_init(hwmgr);
> 
> -		pr_info("amdgpu: powerplay sw initialized\n");
> +		INIT_INFO("amdgpu: powerplay sw initialized\n");

Debug.

>  	}
>  	return ret;
>  }
> --
> 2.9.5
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list