support PRT and replace interface
cover support PRT and replace interface
* add PRT flag and new VA op
* fix flag setting for current VA op function
* Why don't we set flag for current VA op function?
* [RFC] implement new VA fun to support NULL bo
Junwei Zhang (4):
amdgpu: add new VA operations CLEAR and REPLACE
amdgpu: set va flag with input parameter
amdgpu: add PRT page attribute
amdgpu: add a new bo va function to support NULL bo
amdgpu/amdgpu.h | 7 +++++++ amdgpu/amdgpu_bo.c | 42 ++++++++++++++++++++++++++++++++++++++++-- include/drm/amdgpu_drm.h | 4 ++++ 3 files changed, 51 insertions(+), 2 deletions(-)
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1489636601-31486-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org
PATCH 1/4 amdgpu: add new VA operations CLEAR and REPLACE
--- include/drm/amdgpu_drm.h | 2 ++ 1 file changed, 2 insertions(+)
include/drm/amdgpu_drm.h +2 -0
@@ -410,6 +410,8 @@ struct drm_amdgpu_gem_op {#define AMDGPU_VA_OP_MAP 1#define AMDGPU_VA_OP_UNMAP 2 +#define AMDGPU_VA_OP_CLEAR 3 +#define AMDGPU_VA_OP_REPLACE 4/* Delay the page table update till the next CS */ #define AMDGPU_VM_DELAY_UPDATE (1 << 0)
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1489636601-31486-2-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org
Re: [PATCH 1/4] amdgpu: add new VA operations CLEAR and REPLACE
Hi Christian,
May I get a RB for this patch?
Regards,
Jerry(Junwei Zhang)
________________________________________
From: amd-gfx <[email protected]> on behalf of Junwei Zhang <[email protected]>
Sent: Thursday, March 16, 2017 11:56
To: [email protected]
Cc: Zhang, Jerry
Subject: [PATCH 1/4] amdgpu: add new VA operations CLEAR and REPLACE
--- include/drm/amdgpu_drm.h | 2 ++ 1 file changed, 2 insertions(+)
include/drm/amdgpu_drm.h +2 -0
@@ -410,6 +410,8 @@ struct drm_amdgpu_gem_op {#define AMDGPU_VA_OP_MAP 1#define AMDGPU_VA_OP_UNMAP 2 +#define AMDGPU_VA_OP_CLEAR 3 +#define AMDGPU_VA_OP_REPLACE 4/* Delay the page table update till the next CS */ #define AMDGPU_VM_DELAY_UPDATE (1 << 0)
--
1.9.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): DM5PR12MB18189A8887495F5EB83831FEFF260-2J9CzHegvk+QhrfEZJlvtAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Re: [PATCH 1/4] amdgpu: add new VA operations CLEAR and REPLACE
Hi Jerry,
fell free to use this patch internally, but the upstream copy of include/drm/amdgpu_drm.h should be updated when the kernel change land.
Emil usually points out how to do this correctly whenever we try to add changes manually.
Christian.
Am 16.03.2017 um 15:05 schrieb Zhang, Jerry:
Quoted 35 lines
Hi Christian,
May I get a RB for this patch?
Regards,
Jerry(Junwei Zhang)________________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Junwei Zhang <[email protected]>
Sent: Thursday, March 16, 2017 11:56
To: [email protected]
Cc: Zhang, Jerry
Subject: [PATCH 1/4] amdgpu: add new VA operations CLEAR and REPLACESigned-off-by Junwei Zhang <[email protected]>--- include/drm/amdgpu_drm.h | 2 ++ 1 file changed, 2 insertions(+)include/drm/amdgpu_drm.h +2
-1@@ -410,6 +410,8 @@ struct drm_amdgpu_gem_op {#define AMDGPU_VA_OP_MAP 1#define AMDGPU_VA_OP_UNMAP 2 +#define AMDGPU_VA_OP_CLEAR 3 +#define AMDGPU_VA_OP_REPLACE 4/* Delay the page table update till the next CS */ #define AMDGPU_VM_DELAY_UPDATE (1 << 0) --1.9.1
Quoted 4 lines
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 6c9dce66-bc31-cd9a-8ea5-c3a2439d1cc6-5C7GfCeVMHo@public.gmane.org
RE: [PATCH 1/4] amdgpu: add new VA operations CLEAR and REPLACE
Hi Christian,
Thanks for your reminder.
I always keep it in mind.
Regards,
Jerry (Junwei Zhang)
Linux Base Graphics
SRDC Software Development
_____________________________________
From: Koenig, Christian
Sent: Thursday, March 16, 2017 22:21
To: Zhang, Jerry; [email protected]
Subject: Re: [PATCH 1/4] amdgpu: add new VA operations CLEAR and REPLACE
Hi Jerry,
fell free to use this patch internally, but the upstream copy of include/drm/amdgpu_drm.h should be updated when the kernel change land.
Emil usually points out how to do this correctly whenever we try to add changes manually.
Christian.
Am 16.03.2017 um 15:05 schrieb Zhang, Jerry:
Hi Christian,
May I get a RB for this patch?
Regards,
Jerry(Junwei Zhang)
________________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org><mailto:[email protected]> on behalf of Junwei Zhang <[email protected]><mailto:[email protected]>
Sent: Thursday, March 16, 2017 11:56
To: [email protected]<mailto:[email protected]>
Cc: Zhang, Jerry
Subject: [PATCH 1/4] amdgpu: add new VA operations CLEAR and REPLACE
--- include/drm/amdgpu_drm.h | 2 ++ 1 file changed, 2 insertions(+)
include/drm/amdgpu_drm.h +2 -0
@@ -410,6 +410,8 @@ struct drm_amdgpu_gem_op {#define AMDGPU_VA_OP_MAP 1#define AMDGPU_VA_OP_UNMAP 2 +#define AMDGPU_VA_OP_CLEAR 3 +#define AMDGPU_VA_OP_REPLACE 4/* Delay the page table update till the next CS */ #define AMDGPU_VM_DELAY_UPDATE (1 << 0)
--
1.9.1
_______________________________________________
amd-gfx mailing list [email protected]<mailto:[email protected]>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): DM5PR12MB1818F81AB6393F9A0C9E3D0EFF390-2J9CzHegvk+QhrfEZJlvtAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Re: [PATCH 1/4] amdgpu: add new VA operations CLEAR and REPLACE
Quoted 4 lines · Jerry
Thanks for your reminder.
I always keep it in mind.
[...]
Quoted 7 lines
*From:*Koenig, Christian
Quoted 5 lines
fell free to use this patch internally, but the upstream copy of
include/drm/amdgpu_drm.hshould be updated when the kernel change land.Emil usually points out how to do this correctly whenever we try to add changes manually.
See include/drm/README in the libdrm tree.
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/4 amdgpu: set va flag with input parameter
In reply to a message not in the archive--- amdgpu/amdgpu_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
amdgpu/amdgpu_bo.c +1 -1
@@ -941,7 +941,7 @@ int amdgpu_bo_va_op(amdgpu_bo_handle bo,memset (&va,0 ,sizeof (va)); va.handle = bo->handle; va.operation = ops; - va.flags =AMDGPU_VM_PAGE_READABLE | + va.flags = flags |AMDGPU_VM_PAGE_READABLE |AMDGPU_VM_PAGE_WRITEABLE |AMDGPU_VM_PAGE_EXECUTABLE ; va.va_address = addr;
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/4 amdgpu: add PRT page attribute
In reply to a message not in the archive--- include/drm/amdgpu_drm.h | 2 ++ 1 file changed, 2 insertions(+)
include/drm/amdgpu_drm.h +2 -0
@@ -423,6 +423,8 @@ struct drm_amdgpu_gem_op {#define AMDGPU_VM_PAGE_WRITEABLE (1 << 2)/* executable mapping, new for VI */ #define AMDGPU_VM_PAGE_EXECUTABLE (1 << 3) +/* partially resident texture */ +#define AMDGPU_VM_PAGE_PRT (1 << 4)struct drm_amdgpu_gem_va {/** GEM object handle */
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/4 amdgpu: add a new bo va function to support NULL bo
In reply to a message not in the archive--- amdgpu/amdgpu.h | 7 +++++++ amdgpu/amdgpu_bo.c | 40 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 46 insertions(+), 1 deletion(-)
amdgpu/amdgpu.h +7 -0
@@ -1429,6 +1429,13 @@ int amdgpu_bo_va_op(amdgpu_bo_handle bo,uint64_t flags, uint32_t ops); +int amdgpu_bo_va_op2 (amdgpu_device_handle dev, +amdgpu_bo_handle bo, +uint64_t offset, +uint64_t size, +uint64_t addr, +uint64_t flags, +uint32_t ops);/** * VA mapping/unmapping for the buffer object *
amdgpu/amdgpu_bo.c +39 -1
@@ -924,13 +924,51 @@ int amdgpu_bo_list_update(amdgpu_bo_list_handle handle,return r; } -int amdgpu_bo_va_op (amdgpu_bo_handle bo, +int amdgpu_bo_va_op2 (amdgpu_device_handle dev, +amdgpu_bo_handle bo,uint64_t offset,uint64_t size,uint64_t addr,uint64_t flags,uint32_t ops) { +struct drm_amdgpu_gem_va va; +int r; + +if (ops !=AMDGPU_VA_OP_MAP && ops !=AMDGPU_VA_OP_UNMAP && + ops !=AMDGPU_VA_OP_REPLACE && + ops !=AMDGPU_VA_OP_CLEAR ) +return -EINVAL ; + +memset (&va,0 ,sizeof (va)); +if (bo) + va.handle = bo->handle; +else + va.handle =NULL ; +if (flags &AMDGPU_VM_PAGE_PRT ) + flags &=AMDGPU_VM_PAGE_PRT ; +else + flags |=AMDGPU_VM_PAGE_READABLE |AMDGPU_VM_PAGE_WRITEABLE | +AMDGPU_VM_PAGE_EXECUTABLE ; + + va.operation = ops; + va.flags = flags; + va.va_address = addr; + va.offset_in_bo = offset; + va.map_size =ALIGN (size,getpagesize ()); + + r =drmCommandWriteRead (dev->fd,DRM_AMDGPU_GEM_VA , &va,sizeof (va)); + +return r; +} + +int amdgpu_bo_va_op (amdgpu_bo_handle bo, +uint64_t offset, +uint64_t size, +uint64_t addr, +uint64_t flags, +uint32_t ops) +{amdgpu_device_handle dev = bo->dev;struct drm_amdgpu_gem_va va;int r;
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Nicolai already proposed patches for PRT support in libdrm (except the CLEAR/REPLACE addition).
They look a bit cleaner and where posted first, I think we should use them instead.
Christian.
Am 16.03.2017 um 04:56 schrieb Junwei Zhang:
Quoted 11 lines
* add PRT flag and new VA op
* fix flag setting for current VA op function
* Why don't we set flag for current VA op function?
* [RFC] implement new VA fun to support NULL boJunwei Zhang (4):
amdgpu: add new VA operations CLEAR and REPLACE
amdgpu: set va flag with input parameter
amdgpu: add PRT page attribute
amdgpu: add a new bo va function to support NULL bo
Quoted 5 lines
amdgpu/amdgpu.h | 7 +++++++ amdgpu/amdgpu_bo.c | 42 ++++++++++++++++++++++++++++++++++++++++-- include/drm/amdgpu_drm.h | 4 ++++ 3 files changed, 51 insertions(+), 2 deletions(-)
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 2a70a1b2-dbe9-a3ee-99ea-2d0af4c3baf7-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org
Hi Christian,
Thanks for your info.
Sorry to miss them...
Actually this a serial of messed function patch, I should send them separately next time.
If we support PRT with bo=NULL, we may need a new VA op. So please take a look at patch 4:
* [PATCH 4/4] amdgpu: add a new bo va function to support NULL bo
I also have a question about current VA op func, why we didn't use the input flags? So I prepare the patch 2 to use the input flags:
* [PATCH 2/4] amdgpu: set va flag with input parameter
Regards,
Jerry (Junwei Zhang)
Linux Base Graphics
SRDC Software Development
_____________________________________
Quoted 26 lines
-----Original Message-----
From: Christian König [mailto:[email protected]]
Sent: Thursday, March 16, 2017 17:00
To: Zhang, Jerry; [email protected]
Subject: Re: [PATCH 0/4] [libdrm] support PRT and replace interfaceNicolai already proposed patches for PRT support in libdrm (except the CLEAR/REPLACE addition).
They look a bit cleaner and where posted first, I think we should use them instead.
Christian.
Am 16.03.2017 um 04:56 schrieb Junwei Zhang:
Quoted 11 lines
* add PRT flag and new VA op
* fix flag setting for current VA op function
* Why don't we set flag for current VA op function?
* [RFC] implement new VA fun to support NULL boJunwei Zhang (4):
amdgpu: add new VA operations CLEAR and REPLACE
amdgpu: set va flag with input parameter
amdgpu: add PRT page attribute
amdgpu: add a new bo va function to support NULL bo
Quoted 6 lines
Quoted 2 lines
amdgpu/amdgpu.h | 7 +++++++ amdgpu/amdgpu_bo.c | 42++++++++++++++++++++++++++++++++++++++++--
Quoted 3 lines
include/drm/amdgpu_drm.h | 4 ++++ 3 files changed, 51 insertions(+), 2 deletions(-)
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): DM5PR12MB1818645A40DE984A08DD20B2FF260-2J9CzHegvk+QhrfEZJlvtAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Am 16.03.2017 um 10:14 schrieb Zhang, Jerry:
Quoted 5 lines
Hi Christian,
Thanks for your info.
Sorry to miss them...
Quoted 7 lines
Actually this a serial of messed function patch, I should send them separately next time.
If we support PRT with bo=NULL, we may need a new VA op. So please take a look at patch 4:
* [PATCH 4/4] amdgpu: add a new bo va function to support NULL boI also have a question about current VA op func, why we didn't use the input flags?
I have no idea.
Quoted 2 lines
So I prepare the patch 2 to use the input flags:
* [PATCH 2/4] amdgpu: set va flag with input parameter
Nicolai handled both issues by creating a new function where the BO is optional and the flags taken into account.
Please take a look at his patches, they are on the mailing list.
Christian.
Quoted 42 lines
Regards,
Jerry (Junwei Zhang)Linux Base Graphics
SRDC Software Development
_____________________________________Quoted 32 lines
-----Original Message-----
From: Christian König [mailto:[email protected]]
Sent: Thursday, March 16, 2017 17:00
To: Zhang, Jerry; [email protected]
Subject: Re: [PATCH 0/4] [libdrm] support PRT and replace interfaceNicolai already proposed patches for PRT support in libdrm (except the CLEAR/REPLACE addition).
They look a bit cleaner and where posted first, I think we should use them instead.
Christian.
Am 16.03.2017 um 04:56 schrieb Junwei Zhang:
Quoted 5 lines
* add PRT flag and new VA op
* fix flag setting for current VA op function
* Why don't we set flag for current VA op function?
* [RFC] implement new VA fun to support NULL boQuoted 8 lines
Junwei Zhang (4):
amdgpu: add new VA operations CLEAR and REPLACE
amdgpu: set va flag with input parameter
amdgpu: add PRT page attribute
amdgpu: add a new bo va function to support NULL boamdgpu/amdgpu.h | 7 +++++++ amdgpu/amdgpu_bo.c | 42++++++++++++++++++++++++++++++++++++++++--
Quoted 3 lines
include/drm/amdgpu_drm.h | 4 ++++ 3 files changed, 51 insertions(+), 2 deletions(-)
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 84eaf027-5fb3-4fa8-c0fc-88281f7e61d7-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org
Quoted 9 lines · Christian König
Am 16.03.2017 um 10:14 schrieb Zhang, Jerry:
Quoted 3 lines
So I prepare the patch 2 to use the input flags:
* [PATCH 2/4] amdgpu: set va flag with input parameterNicolai handled both issues by creating a new function where the BO is optional and the flags taken into account.
Please take a look at his patches, they are on the mailing list.
Or on Patchwork:
https://patchwork.freedesktop.org/project/amd-xorg-ddx/patches/?submitter=15673
Speaking of Patchwork, it's accumulating a lot of stale patches. Everybody submitting patches, please at least periodically go through your patches and change their state as appropriate.
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): f24666c5-ee24-7b72-1706-16da59260379-otUistvHUpPR7s880joybQ@public.gmane.org
Hi Michel,
that's really help me :)
thanks.
Regards,
Jerry(Junwei Zhang)
________________________________________
From: Michel Dänzer <[email protected]>
Sent: Thursday, March 16, 2017 5:42:53 PM
To: Christian König; Zhang, Jerry
Cc: [email protected]
Subject: Re: [PATCH 0/4] [libdrm] support PRT and replace interface
Quoted 9 lines · Christian König
Am 16.03.2017 um 10:14 schrieb Zhang, Jerry:
Quoted 3 lines
So I prepare the patch 2 to use the input flags:
* [PATCH 2/4] amdgpu: set va flag with input parameterNicolai handled both issues by creating a new function where the BO is optional and the flags taken into account.
Please take a look at his patches, they are on the mailing list.
Or on Patchwork:
https://patchwork.freedesktop.org/project/amd-xorg-ddx/patches/?submitter=15673
Speaking of Patchwork, it's accumulating a lot of stale patches. Everybody submitting patches, please at least periodically go through your patches and change their state as appropriate.
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Hi Christian,
Thanks for your info.
I missed them completely :(
the va op raw func looks similar as my va op2.
I will re-use them in hybrid libdrm and provide for UMD development.
Regards,
Jerry(Junwei Zhang)
________________________________________
From: Christian König <[email protected]>
Sent: Thursday, March 16, 2017 5:28:21 PM
To: Zhang, Jerry; [email protected]
Subject: Re: [PATCH 0/4] [libdrm] support PRT and replace interface
Am 16.03.2017 um 10:14 schrieb Zhang, Jerry:
Quoted 5 lines
Hi Christian,
Thanks for your info.
Sorry to miss them...
Quoted 7 lines
Actually this a serial of messed function patch, I should send them separately next time.
If we support PRT with bo=NULL, we may need a new VA op. So please take a look at patch 4:
* [PATCH 4/4] amdgpu: add a new bo va function to support NULL boI also have a question about current VA op func, why we didn't use the input flags?
I have no idea.
Quoted 2 lines
So I prepare the patch 2 to use the input flags:
* [PATCH 2/4] amdgpu: set va flag with input parameter
Nicolai handled both issues by creating a new function where the BO is optional and the flags taken into account.
Please take a look at his patches, they are on the mailing list.
Christian.
Quoted 42 lines
Regards,
Jerry (Junwei Zhang)Linux Base Graphics
SRDC Software Development
_____________________________________Quoted 32 lines
-----Original Message-----
From: Christian König [mailto:[email protected]]
Sent: Thursday, March 16, 2017 17:00
To: Zhang, Jerry; [email protected]
Subject: Re: [PATCH 0/4] [libdrm] support PRT and replace interfaceNicolai already proposed patches for PRT support in libdrm (except the CLEAR/REPLACE addition).
They look a bit cleaner and where posted first, I think we should use them instead.
Christian.
Am 16.03.2017 um 04:56 schrieb Junwei Zhang:
Quoted 5 lines
* add PRT flag and new VA op
* fix flag setting for current VA op function
* Why don't we set flag for current VA op function?
* [RFC] implement new VA fun to support NULL boQuoted 8 lines
Junwei Zhang (4):
amdgpu: add new VA operations CLEAR and REPLACE
amdgpu: set va flag with input parameter
amdgpu: add PRT page attribute
amdgpu: add a new bo va function to support NULL boamdgpu/amdgpu.h | 7 +++++++ amdgpu/amdgpu_bo.c | 42++++++++++++++++++++++++++++++++++++++++--
Quoted 3 lines
include/drm/amdgpu_drm.h | 4 ++++ 3 files changed, 51 insertions(+), 2 deletions(-)
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx