[PATCH 2/8] drm/amdgpu: always bind pinned BOs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 26.10.2017 um 19:55 schrieb Deucher, Alexander:
>> -----Original Message-----
>> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
>> Of Christian König
>> Sent: Thursday, October 26, 2017 12:06 PM
>> To: amd-gfx at lists.freedesktop.org
>> Subject: [PATCH 2/8] drm/amdgpu: always bind pinned BOs
>>
>> From: Christian König <christian.koenig at amd.com>
>>
>> We always need to bind pinned BOs, not just when the caller requested the
>> address.
>>
>> Signed-off-by: Christian König <christian.koenig at amd.com>
> Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
>
> Should this go to stable as well?

Good question. As far as I can see it didn't made a difference so far 
cause all users of pinned GART BOs provided an address as well.

Just the framebuffer code doesn't do this and so I stumbled over it when 
allowing scanout from GART.

Christian.

>
> Alex
>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 14 +++++++-------
>>   1 file changed, 7 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
>> index 76551cd..0b76d83 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
>> @@ -688,15 +688,15 @@ int amdgpu_bo_pin_restricted(struct amdgpu_bo
>> *bo, u32 domain,
>>   		goto error;
>>   	}
>>
>> +	r = amdgpu_ttm_bind(&bo->tbo, &bo->tbo.mem);
>> +	if (unlikely(r)) {
>> +		dev_err(adev->dev, "%p bind failed\n", bo);
>> +		goto error;
>> +	}
>> +
>>   	bo->pin_count = 1;
>> -	if (gpu_addr != NULL) {
>> -		r = amdgpu_ttm_bind(&bo->tbo, &bo->tbo.mem);
>> -		if (unlikely(r)) {
>> -			dev_err(adev->dev, "%p bind failed\n", bo);
>> -			goto error;
>> -		}
>> +	if (gpu_addr != NULL)
>>   		*gpu_addr = amdgpu_bo_gpu_offset(bo);
>> -	}
>>
>>   	domain = amdgpu_mem_type_to_domain(bo-
>>> tbo.mem.mem_type);
>>   	if (domain == AMDGPU_GEM_DOMAIN_VRAM) {
>> --
>> 2.7.4
>>
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux