All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
To: "Liu, Monk" <Monk.Liu-5C7GfCeVMHo@public.gmane.org>,
	"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH 1/3] drm/amdgpu:new field members for SRIOV
Date: Wed, 11 Jan 2017 16:46:41 +0100	[thread overview]
Message-ID: <2cc7f9ba-5166-716f-5312-410d744b6535@vodafone.de> (raw)
In-Reply-To: <BY2PR1201MB11106625F28ACE98D9AF99E984660-O28G1zQ8oGliQkyLPkmea2rFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>

> [ML] do you mean If some where want to use  vmid0_gds_address I should just use vmid0_csa_addr + 4096 ?
Yes.

> Can I get your RB after above two place modified in patch ?
Yeah, with that fixed the patch is Reviewed-by: Christian König 
<christian.koenig@amd.com>.

Regards,
Christian.

Am 11.01.2017 um 15:49 schrieb Liu, Monk:
>> Similar to the GDS address inside the VMs I think the code actually using it should calculate it from the BO address.
> [ML] do you mean If some where want to use  vmid0_gds_address I should just use vmid0_csa_addr + 4096 ?
>
>> The validate buffer is only temporarily used during mapping the CSA into the VM.
> So please put that one the stack in that function.
>
> [ML] okay
>
>
> Can I get your RB after above two place modified in patch ?
>
> BR Monk
>
> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf Of Christian K?nig
> Sent: Wednesday, January 11, 2017 8:46 PM
> To: Liu, Monk <Monk.Liu@amd.com>; amd-gfx@lists.freedesktop.org
> Subject: Re: [PATCH 1/3] drm/amdgpu:new field members for SRIOV
>
> Am 11.01.2017 um 11:43 schrieb Monk Liu:
>> and implement CSA functions in this file
>>
>> Change-Id: Ife0eff7b13b8b5946f005a39f6ecb8db1cb72c38
>> Signed-off-by: Monk Liu <Monk.Liu@amd.com>
>> ---
>>    drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 8 ++++++++
>>    drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h   | 3 +++
>>    2 files changed, 11 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
>> index 0d821d9..b65bedc 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
>> @@ -28,11 +28,19 @@
>>    #define AMDGPU_SRIOV_CAPS_ENABLE_IOV   (1 << 1) /* sr-iov is enabled on this GPU */
>>    #define AMDGPU_SRIOV_CAPS_IS_VF        (1 << 2) /* this GPU is a virtual function */
>>    #define AMDGPU_PASSTHROUGH_MODE        (1 << 3) /* thw whole GPU is pass through for VM */
>> +
>>    /* GPU virtualization */
>>    struct amdgpu_virt {
>>    	uint32_t caps;
>> +	uint32_t csa_size;
>> +	struct amdgpu_bo *csa_obj;
>> +	uint64_t csa_vmid0_addr;
>> +	uint64_t gds_vmid0_addr;
> Similar to the GDS address inside the VMs I think the code actually using it should calculate it from the BO address.
>
>>    };
>>    
>> +#define AMDGPU_CSA_SIZE    (8 * 1024)
>> +#define AMDGPU_CSA_VADDR   (AMDGPU_VA_RESERVED_SIZE - AMDGPU_CSA_SIZE)
>> +
>>    #define amdgpu_sriov_enabled(adev) \
>>    ((adev)->virt.caps & AMDGPU_SRIOV_CAPS_ENABLE_IOV)
>>    
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
>> index 42a629b..42f1ec1 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
>> @@ -111,6 +111,9 @@ struct amdgpu_vm {
>>    
>>    	/* client id */
>>    	u64                     client_id;
>> +	/* each VM will map on CSA */
>> +	struct ttm_validate_buffer csa_tv;
> The validate buffer is only temporarily used during mapping the CSA into the VM.
>
> So please put that one the stack in that function.
>
> Apart from that the patch looks good to me, Christian.
>
>> +	struct amdgpu_bo_va *csa_bo_va;
>>    };
>>    
>>    struct amdgpu_vm_id {
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2017-01-11 15:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-11 10:43 [PATCH 0/3] CSA patch v3 Monk Liu
     [not found] ` <1484131406-19893-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-01-11 10:43   ` [PATCH 1/3] drm/amdgpu:new field members for SRIOV Monk Liu
     [not found]     ` <1484131406-19893-2-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-01-11 12:46       ` Christian König
     [not found]         ` <1560cfc2-f700-fedd-c557-0b121c2f3cca-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-01-11 14:49           ` Liu, Monk
     [not found]             ` <BY2PR1201MB11106625F28ACE98D9AF99E984660-O28G1zQ8oGliQkyLPkmea2rFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-01-11 15:46               ` Christian König [this message]
2017-01-11 10:43   ` [PATCH 2/3] drm/amdgpu:add new file " Monk Liu
     [not found]     ` <1484131406-19893-3-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-01-11 12:49       ` Christian König
2017-01-11 10:43   ` [PATCH 3/3] drm/amdgpu:invoke CSA functions Monk Liu
     [not found]     ` <1484131406-19893-4-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-01-11 12:54       ` Christian König
  -- strict thread matches above, loose matches on Subject: below --
2017-01-11  2:53 [PATCH 0/3] CSA patches Monk Liu
     [not found] ` <1484103205-5789-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-01-11  2:53   ` [PATCH 1/3] drm/amdgpu:new field members for SRIOV Monk Liu
2017-01-10 10:33 [PATCH 0/3] static CSA patches Monk Liu
     [not found] ` <1484044422-2898-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-01-10 10:33   ` [PATCH 1/3] drm/amdgpu:new field members for SRIOV Monk Liu

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=2cc7f9ba-5166-716f-5312-410d744b6535@vodafone.de \
    --to=deathsimple-antagkrnahcb1svskn2v4q@public.gmane.org \
    --cc=Monk.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.