From: "Koenig, Christian" <Christian.Koenig-5C7GfCeVMHo@public.gmane.org>
To: "Liu, Shaoyun" <Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org>,
"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH] drm/amdgpu: Set correct context adev for gem object
Date: Tue, 26 Mar 2019 19:35:45 +0000 [thread overview]
Message-ID: <2ee3c346-c1dc-08ef-c9ff-4cbd8667fdd2@amd.com> (raw)
In-Reply-To: <35c54043-3939-4a44-954e-50fc5b6ec637-5C7GfCeVMHo@public.gmane.org>
Am 26.03.19 um 20:33 schrieb Liu, Shaoyun:
> OK , just ignore it . BTW , if you think it's a hack currently used in
> KFD to share the memory among GPUs, what's your plane to use the peer
> GPU through XGMI from GEM point of view ?
We just need to unpack the root bo while doing the XGMI check, e.g. we
have a BO structure in the importing device and use this one while doing
the mapping.
Christian.
>
> Regards
>
> shaoyun.liu
>
> On 2019-03-26 2:56 p.m., Christian König wrote:
>> Am 26.03.19 um 16:51 schrieb Liu, Shaoyun:
>>> The context device pointer could be different of the object been
>>> acctually allocated
>> Actually that is unnecessary, cause the GEM adev is always identical
>> to the file_priv.
>>
>> E.g. we don't support the hack using in the KFD for BO sharing here.
>>
>>> Change-Id: I7b2338858126d75350b65ff04d9bb419e1eae15c
>>> Signed-off-by: shaoyunl <shaoyun.liu@amd.com>
>>> ---
>>> drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 4 ++--
>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>>> index 9ee8d7a..a82c3b1 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>>> @@ -117,8 +117,8 @@ int amdgpu_gem_object_open(struct drm_gem_object
>>> *obj,
>>> struct drm_file *file_priv)
>>> {
>>> struct amdgpu_bo *abo = gem_to_amdgpu_bo(obj);
>>> - struct amdgpu_device *adev = amdgpu_ttm_adev(abo->tbo.bdev);
>>> struct amdgpu_fpriv *fpriv = file_priv->driver_priv;
>>> + struct amdgpu_device *adev = fpriv->ctx_mgr.adev;
>>> struct amdgpu_vm *vm = &fpriv->vm;
>>> struct amdgpu_bo_va *bo_va;
>>> struct mm_struct *mm;
>>> @@ -150,8 +150,8 @@ void amdgpu_gem_object_close(struct
>>> drm_gem_object *obj,
>>> struct drm_file *file_priv)
>>> {
>>> struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
>>> - struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev);
>>> struct amdgpu_fpriv *fpriv = file_priv->driver_priv;
>>> + struct amdgpu_device *adev = fpriv->ctx_mgr.adev;
>>> struct amdgpu_vm *vm = &fpriv->vm;
>>> struct amdgpu_bo_list_entry vm_pd;
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
prev parent reply other threads:[~2019-03-26 19:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-26 15:51 [PATCH] drm/amdgpu: Set correct context adev for gem object Liu, Shaoyun
[not found] ` <1553615471-2633-1-git-send-email-shaoyun.liu-5C7GfCeVMHo@public.gmane.org>
2019-03-26 18:56 ` Christian König
[not found] ` <4bab60f1-5784-d3e4-5e07-3b1d74184f94-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-03-26 19:33 ` Liu, Shaoyun
[not found] ` <35c54043-3939-4a44-954e-50fc5b6ec637-5C7GfCeVMHo@public.gmane.org>
2019-03-26 19:35 ` Koenig, Christian [this message]
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=2ee3c346-c1dc-08ef-c9ff-4cbd8667fdd2@amd.com \
--to=christian.koenig-5c7gfcevmho@public.gmane.org \
--cc=Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
/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