[PATCH] drm/amdgpu: don't check the default value for vm size

Michel Dänzer michel at daenzer.net
Fri Jun 16 02:36:51 UTC 2017


On 16/06/17 07:21 AM, Alex Deucher wrote:
> Avoids printing spurious messages like this:
> [    3.102059] amdgpu 0000:01:00.0: VM size (-1) must be a power of 2
> 
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 50001bf..ff90f78 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -1074,6 +1074,10 @@ static void amdgpu_check_block_size(struct amdgpu_device *adev)
>  
>  static void amdgpu_check_vm_size(struct amdgpu_device *adev)
>  {
> +	/* no need to check the default value */
> +	if (amdgpu_vm_size == -1)
> +		return;
> +
>  	if (!amdgpu_check_pot_argument(amdgpu_vm_size)) {
>  		dev_warn(adev->dev, "VM size (%d) must be a power of 2\n",
>  			 amdgpu_vm_size);
> 

Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the amd-gfx mailing list