AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nirmoy <nirmodas@amd.com>
To: Felix Kuehling <felix.kuehling@amd.com>,
	Nirmoy Das <nirmoy.das@amd.com>,
	 Christian.Koenig@amd.com
Cc: amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/5] drm/amdgpu: initialize vm->is_compute_context properly
Date: Thu, 22 Apr 2021 16:17:04 +0200	[thread overview]
Message-ID: <deea0dfd-3112-95bd-23f9-bbd0d11067f9@amd.com> (raw)
In-Reply-To: <cf1b7b58-d2f0-e7bb-ea59-ae0525b5653f@amd.com>


On 4/22/21 3:56 PM, Felix Kuehling wrote:
> Am 2021-04-22 um 8:35 a.m. schrieb Nirmoy Das:
>> Fix vm->is_compute_context initialization in amdgpu_vm_init().
>>
>> Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> index f95bcda8463f..6f0a6011cb3d 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> @@ -2815,9 +2815,9 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm,
>>   		goto error_free_immediate;
>>   
>>   	vm->pte_support_ats = false;
>> -	vm->is_compute_context = false;
>> +	vm->is_compute_context = vm_context == AMDGPU_VM_CONTEXT_COMPUTE;
>>   
>> -	if (vm_context == AMDGPU_VM_CONTEXT_COMPUTE) {
>> +	if (vm->is_compute_context) {
> A weak ago or so, I submitted a patch that removed the last call to
> amdgpu_vm_init with vm_context == AMDGPU_VM_CONTEXT_COMPUTE. We could
> probably clean this up now and remove the vm_context parameter and the
> AMDGPU_VM_CONTEXT* definitions. The only way to get a compute VM now is
> through amdgpu_vm_make_compute.


I was wondering about that. I will remove vm_context.


Thanks,

Nirmoy


> Regards,
>    Felix
>
>
>>   		vm->use_cpu_for_update = !!(adev->vm_manager.vm_update_mode &
>>   						AMDGPU_VM_USE_CPU_FOR_COMPUTE);
>>   
>> @@ -2844,7 +2844,7 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm,
>>   	vm->evicting = false;
>>   
>>   	amdgpu_vm_bo_param(adev, vm, adev->vm_manager.root_level, false, &bp);
>> -	if (vm_context == AMDGPU_VM_CONTEXT_COMPUTE)
>> +	if (vm->is_compute_context)
>>   		bp.flags &= ~AMDGPU_GEM_CREATE_SHADOW;
>>   	r = amdgpu_bo_create(adev, &bp, &root);
>>   	if (r)
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  reply	other threads:[~2021-04-22 14:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-22 12:35 [PATCH 1/5] drm/amdgpu: expose amdgpu_bo_create_shadow() Nirmoy Das
2021-04-22 12:35 ` [PATCH 2/5] drm/amdgpu: initialize vm->is_compute_context properly Nirmoy Das
2021-04-22 13:56   ` Felix Kuehling
2021-04-22 14:17     ` Nirmoy [this message]
2021-04-22 12:35 ` [PATCH 3/5] drm/amdgpu: create shadow bo using amdgpu_bo_create_shadow() Nirmoy Das
2021-04-22 12:48   ` Christian König
2021-04-22 13:45     ` Nirmoy
2021-04-22 12:35 ` [PATCH 4/5] drm/amdgpu: cleanup amdgpu_bo_create() Nirmoy Das
2021-04-22 12:49   ` Christian König
2021-04-22 12:35 ` [PATCH 5/5] drm/amdgpu: remove AMDGPU_GEM_CREATE_SHADOW flag Nirmoy Das

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=deea0dfd-3112-95bd-23f9-bbd0d11067f9@amd.com \
    --to=nirmodas@amd.com \
    --cc=Christian.Koenig@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=felix.kuehling@amd.com \
    --cc=nirmoy.das@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox