[PATCH 4/4] drm/amdgpu: fix VA hole handling on Vega10

Christian König ckoenig.leichtzumerken at gmail.com
Thu Nov 9 16:15:14 UTC 2017


Am 09.11.2017 um 15:59 schrieb Michel Dänzer:
> On 09/11/17 03:49 PM, Christian König wrote:
>> Similar to the CPU address space the VA on Vega10 has a hole in it.
> [...]
>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> index 4710e51099c2..81c34132fbd5 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> @@ -561,6 +561,17 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
>>   		return -EINVAL;
>>   	}
>>   
>> +	if (args->va_address >= AMDGPU_VA_HOLE_START &&
>> +	    args->va_address < AMDGPU_VA_HOLE_END) {
>> +		dev_err(&dev->pdev->dev,
>> +			"va_address 0x%LX is in VA hole 0x%LX-0x%LX\n",
>> +			args->va_address, AMDGPU_VA_HOLE_START,
>> +			AMDGPU_VA_HOLE_END);
>> +		return -EINVAL;
>> +	}
> This should probably be dev_dbg instead of dev_err, to prevent buggy (or
> malicious) userspace from spamming dmesg.

Good point, and yes we have quite a number of other issues like that one.

Going to fix this in v2 of the patches.

Christian.



More information about the amd-gfx mailing list