export gfx double offchip LDS buffers
cover export gfx double offchip LDS buffers
Junwei Zhang (2):
amdgpu: export gfx double offchip LDS buffers by gpu info amdgpu/tests: show gfx config double offchip LDS buffers in gpu info
amdgpu/amdgpu.h | 2 ++ amdgpu/amdgpu_gpu_info.c | 2 ++ include/drm/amdgpu_drm.h | 2 ++ tests/amdgpu/basic_tests.c | 2 ++ 4 files changed, 8 insertions(+)
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): 1487559392-31157-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org
PATCH 1/2 amdgpu: export gfx double offchip LDS buffers by gpu info
--- amdgpu/amdgpu.h | 2 ++ amdgpu/amdgpu_gpu_info.c | 2 ++ include/drm/amdgpu_drm.h | 2 ++ 3 files changed, 6 insertions(+)
amdgpu/amdgpu.h +2 -0
@@ -487,6 +487,8 @@ struct amdgpu_gpu_info {uint32_t vce_harvest_config;/* PCI revision ID */ uint32_t pci_rev_id; +/* gfx double offchip LDS buffers */ +uint32_t gc_double_offchip_lds_buf; };
amdgpu/amdgpu_gpu_info.c +2 -0
@@ -175,6 +175,8 @@ drm_private int amdgpu_query_gpu_info_init(amdgpu_device_handle dev) dev->info.ce_ram_size = dev->dev_info.ce_ram_size; dev->info.vce_harvest_config = dev->dev_info.vce_harvest_config; dev->info.pci_rev_id = dev->dev_info.pci_rev; + dev->info.gc_double_offchip_lds_buf = + dev->dev_info.gc_double_offchip_lds_buf;for (i =0 ; i < (int )dev->info.num_shader_engines; i++) { unsigned instance = (i << AMDGPU_INFO_MMR_SE_INDEX_SHIFT) |
include/drm/amdgpu_drm.h +2 -0
@@ -767,6 +767,8 @@ struct drm_amdgpu_info_device {uint32_t vram_bit_width;/* vce harvesting instance */ uint32_t vce_harvest_config; +/* gfx double offchip LDS buffers */ +uint32_t gc_double_offchip_lds_buf; };struct drm_amdgpu_info_hw_ip {
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): 1487559392-31157-2-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org
Re: [PATCH 1/2] amdgpu: export gfx double offchip LDS buffers by gpu info
Am 20.02.2017 um 03:56 schrieb Junwei Zhang:
Quoted 12 lines
Signed-off-by Junwei Zhang <[email protected]>--- amdgpu/amdgpu.h | 2 ++ amdgpu/amdgpu_gpu_info.c | 2 ++ include/drm/amdgpu_drm.h | 2 ++ 3 files changed, 6 insertions(+)amdgpu/amdgpu.h +0
-0
amdgpu/amdgpu.h struct amdgpu_gpu_info { · line 491
Quoted 5 lines
amdgpu/amdgpu.h +2
-0@@ -487,6 +487,8 @@ struct amdgpu_gpu_info {uint32_t vce_harvest_config;/* PCI revision ID */ uint32_t pci_rev_id; +/* gfx double offchip LDS buffers */ +uint32_t gc_double_offchip_lds_buf;
That won't work. The kernel IOCTL structures have a size attached to them, but the libdrm interface doesn't have that.
It clearly was a bad idea to munch in an extra layer of abstraction here. I would say we should just deprecate that interface sooner or later.
Please use the following code in the UMD to query the info directly from the kernel:
struct drm_amdgpu_info_device dev_info;
r = amdgpu_query_info(dev, AMDGPU_INFO_DEV_INFO, sizeof(dev_info), &dev_info);
This way you also only need to make the two line change include/drm/amdgpu_drm.h.
Regards,
Christian.
Quoted 21 lines
amdgpu/amdgpu.h +0
-0};amdgpu/amdgpu_gpu_info.c +2
-0@@ -175,6 +175,8 @@ drm_private int amdgpu_query_gpu_info_init(amdgpu_device_handle dev) dev->info.ce_ram_size = dev->dev_info.ce_ram_size; dev->info.vce_harvest_config = dev->dev_info.vce_harvest_config; dev->info.pci_rev_id = dev->dev_info.pci_rev; + dev->info.gc_double_offchip_lds_buf = + dev->dev_info.gc_double_offchip_lds_buf;for (i =0 ; i < (int )dev->info.num_shader_engines; i++) { unsigned instance = (i << AMDGPU_INFO_MMR_SE_INDEX_SHIFT) |include/drm/amdgpu_drm.h +0
-0
include/drm/amdgpu_drm.h struct drm_amdgpu_info_device { · line 774
Quoted 8 lines
include/drm/amdgpu_drm.h +2
-0@@ -767,6 +767,8 @@ struct drm_amdgpu_info_device {uint32_t vram_bit_width;/* vce harvesting instance */ uint32_t vce_harvest_config; +/* gfx double offchip LDS buffers */ +uint32_t gc_double_offchip_lds_buf; };struct drm_amdgpu_info_hw_ip {
_______________________________________________
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): 6b6a772d-fd77-2084-adf9-efa9480fa0eb-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org
RE: [PATCH 1/2] amdgpu: export gfx double offchip LDS buffers by gpu info
Quoted 30 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Christian K?nig
Sent: Monday, February 20, 2017 17:33
To: Zhang, Jerry; [email protected]
Subject: Re: [PATCH 1/2] amdgpu: export gfx double offchip LDS buffers by gpu infoAm 20.02.2017 um 03:56 schrieb Junwei Zhang:
Quoted 12 lines
Signed-off-by Junwei Zhang <[email protected]>--- amdgpu/amdgpu.h | 2 ++ amdgpu/amdgpu_gpu_info.c | 2 ++ include/drm/amdgpu_drm.h | 2 ++ 3 files changed, 6 insertions(+)amdgpu/amdgpu.h index 84ab688..7a26298 renamed from amdgpu/amdgpu.h +0
-0100644
amdgpu/amdgpu.h struct amdgpu_gpu_info { · line 491
Quoted 5 lines
amdgpu/amdgpu.h +2
-0@@ -487,6 +487,8 @@ struct amdgpu_gpu_info {uint32_t vce_harvest_config;/* PCI revision ID */ uint32_t pci_rev_id; +/* gfx double offchip LDS buffers */ +uint32_t gc_double_offchip_lds_buf;That won't work. The kernel IOCTL structures have a size attached to them, but the libdrm interface doesn't have that.
Quoted 2 lines
It clearly was a bad idea to munch in an extra layer of abstraction here. I would say we should just deprecate that interface sooner or later.
Thanks for your explanation.
Before that we may make sure all UMD drivers use amdgpu_query_info() instead of amdgpu_query_gpu_info() Then I have prepared another patch, help to review it.
Quoted 11 lines
Please use the following code in the UMD to query the info directly from the kernel:
struct
drm_amdgpu_info_devicedev_info;r =
amdgpu_query_info(dev, AMDGPU_INFO_DEV_INFO, sizeof(dev_info), &dev_info);This way you also only need to make the two line change
include/drm/amdgpu_drm.h.
Thanks for your reminder.
I will info Vulkan to use it like that.
Regards,
Jerry
Quoted 34 lines
Regards,
Christian.amdgpu/amdgpu_gpu_info.c drm_private int
Quoted 8 lines
amdgpu/amdgpu.h +0
-0};amdgpu/amdgpu_gpu_info.c index renamed from amdgpu/amdgpu_gpu_info.c +0
-0d801b86..984674e 100644
amdgpu/amdgpu_gpu_info.c +0
-0@@ -175,6 +175,8 @@ drm_private int
amdgpu_query_gpu_info_init(amdgpu_device_handle dev)amdgpu/amdgpu_gpu_info.c drm_private int amdgpu_query_gpu_info_init(amdgpu_device_handle dev)
Quoted 8 lines
amdgpu/amdgpu_gpu_info.c +2
-0dev->info.ce_ram_size = dev->dev_info.ce_ram_size; dev->info.vce_harvest_config = dev->dev_info.vce_harvest_config; dev->info.pci_rev_id = dev->dev_info.pci_rev; + dev->info.gc_double_offchip_lds_buf = + dev->dev_info.gc_double_offchip_lds_buf;for (i =0 ; i < (int )dev->info.num_shader_engines; i++) { unsigned instance = (i <<
AMDGPU_INFO_MMR_SE_INDEX_SHIFT) | diffQuoted 12 lines
--git
a/include/drm/amdgpu_drm.hb/include/drm/amdgpu_drm.hindex 9c3bd18..85bb701 100644include/drm/amdgpu_drm.h +2
-0@@ -767,6 +767,8 @@ struct drm_amdgpu_info_device {uint32_t vram_bit_width;/* vce harvesting instance */ uint32_t vce_harvest_config; +/* gfx double offchip LDS buffers */ +uint32_t gc_double_offchip_lds_buf; };
Quoted 7 lines
include/drm/amdgpu_drm.h struct drm_amdgpu_info_device { · line 774
Quoted 1 line
include/drm/amdgpu_drm.h +0
-0struct drm_amdgpu_info_hw_ip {_______________________________________________
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
Re: [PATCH 1/2] amdgpu: export gfx double offchip LDS buffers by gpu info
In reply to a message not in the archiveQuoted 5 lines · Junwei Zhang
Signed-off-by Junwei Zhang <[email protected]>--- amdgpu/amdgpu.h | 2 ++ amdgpu/amdgpu_gpu_info.c | 2 ++ include/drm/amdgpu_drm.h | 2 ++
The file include/drm/amdgpu_drm.h should be updated according to the explanation in include/drm/README, section "When and how to update these files".
Thanks,
Nicolai
Quoted 34 lines
3 files changed, 6 insertions(+)amdgpu/amdgpu.h +2
-0@@ -487,6 +487,8 @@ struct amdgpu_gpu_info {uint32_t vce_harvest_config;/* PCI revision ID */ uint32_t pci_rev_id; +/* gfx double offchip LDS buffers */ +uint32_t gc_double_offchip_lds_buf; };amdgpu/amdgpu_gpu_info.c +2
-0@@ -175,6 +175,8 @@ drm_private int amdgpu_query_gpu_info_init(amdgpu_device_handle dev) dev->info.ce_ram_size = dev->dev_info.ce_ram_size; dev->info.vce_harvest_config = dev->dev_info.vce_harvest_config; dev->info.pci_rev_id = dev->dev_info.pci_rev; + dev->info.gc_double_offchip_lds_buf = + dev->dev_info.gc_double_offchip_lds_buf;for (i =0 ; i < (int )dev->info.num_shader_engines; i++) { unsigned instance = (i << AMDGPU_INFO_MMR_SE_INDEX_SHIFT) |include/drm/amdgpu_drm.h +0
-0
include/drm/amdgpu_drm.h struct drm_amdgpu_info_device { · line 774
Quoted 8 lines
include/drm/amdgpu_drm.h +2
-0@@ -767,6 +767,8 @@ struct drm_amdgpu_info_device {uint32_t vram_bit_width;/* vce harvesting instance */ uint32_t vce_harvest_config; +/* gfx double offchip LDS buffers */ +uint32_t gc_double_offchip_lds_buf; };struct drm_amdgpu_info_hw_ip {
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/2 amdgpu/tests: show gfx config double offchip LDS buffers in gpu info
In reply to a message not in the archive--- tests/amdgpu/basic_tests.c | 2 ++ 1 file changed, 2 insertions(+)
tests/amdgpu/basic_tests.c +2 -0
@@ -361,6 +361,8 @@ static void amdgpu_query_gpu_info_test()amdgpu_vprintf ("0x%x\n" , gpu_info.vce_harvest_config);amdgpu_vprintf (" PCI revision ID:" );amdgpu_vprintf ("0x%x\n" , gpu_info.pci_rev_id); +amdgpu_vprintf (" gfx config double offchip LDS buffers:" ); +amdgpu_vprintf ("0x%x\n" , gpu_info.gc_double_offchip_lds_buf); }static void amdgpu_query_firmware_info_test (void )
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx