[PATCH 1/2] drm/amdgpu: fix CPU based VM updates

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

 



The series is Ached-by: Chunming Zhou <david1.zhou at amd.com>


On 2018å¹´01æ??17æ?¥ 01:05, Felix Kuehling wrote:
> Thanks for taking care of this. Patch 2 is a nice simplification that
> should reduce the chances of breaking CPU updates in the future. The
> series is Reviewed-by: Felix Kuehling <Felix.Kuehling at amd.com>
>
> Regards,
>    Felix
>
>
> On 2018-01-16 10:56 AM, Christian König wrote:
>> That got accidentially removed.
>>
>> Signed-off-by: Christian König <christian.koenig at amd.com>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 14 +++++++++-----
>>   1 file changed, 9 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> index d75637f02ef4..155e6f915964 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> @@ -969,12 +969,16 @@ static void amdgpu_vm_handle_huge_pages(struct amdgpu_pte_update_params *p,
>>   	entry->huge = true;
>>   	amdgpu_gmc_get_vm_pde(p->adev, AMDGPU_VM_PDB0, &dst, &flags);
>>   
>> -	if (parent->base.bo->shadow) {
>> -		pd_addr = amdgpu_bo_gpu_offset(parent->base.bo->shadow);
>> -		pde = pd_addr + (entry - parent->entries) * 8;
>> -		p->func(p, pde, dst, 1, 0, flags);
>> +	if (p->func == amdgpu_vm_cpu_set_ptes) {
>> +		pd_addr = (unsigned long)amdgpu_bo_kptr(parent->base.bo);
>> +	} else {
>> +		if (parent->base.bo->shadow) {
>> +			pd_addr = amdgpu_bo_gpu_offset(parent->base.bo->shadow);
>> +			pde = pd_addr + (entry - parent->entries) * 8;
>> +			p->func(p, pde, dst, 1, 0, flags);
>> +		}
>> +		pd_addr = amdgpu_bo_gpu_offset(parent->base.bo);
>>   	}
>> -	pd_addr = amdgpu_bo_gpu_offset(parent->base.bo);
>>   	pde = pd_addr + (entry - parent->entries) * 8;
>>   	p->func(p, pde, dst, 1, 0, flags);
>>   }
> _______________________________________________
> 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