Skip to contentSkip to conversation

export gfx double offchip LDS buffers

PATCH Superseded Junwei Zhang 3 participants 6 messages Feb 20, 2017 – Feb 21, 2017 3 messages not in the archive DRM drivers

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

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

#2 lore raw

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
index 84ab688..7a26298 100644
@@ -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
index d801b86..984674e 100644
@@ -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
index 9c3bd18..85bb701 100644
@@ -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

#4 lore raw

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
---
  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
index 84ab688..7a26298 100644

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
index d801b86..984674e 100644
@@ -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
index 9c3bd18..85bb701 100644

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

#6 lore raw

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 info

Am 20.02.2017 um 03:56 schrieb Junwei Zhang:

Quoted 12 lines
---
  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 -0

100644

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_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.

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 -0

d801b86..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 -0
  	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) | diff

Quoted 12 lines

--git a/include/drm/amdgpu_drm.h b/include/drm/amdgpu_drm.h index 9c3bd18..85bb701 100644

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;
  };
 
Quoted 7 lines

include/drm/amdgpu_drm.h struct drm_amdgpu_info_device { · line 774

Quoted 1 line
include/drm/amdgpu_drm.h +0 -0
  struct 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

#7 lore raw

Re: [PATCH 1/2] amdgpu: export gfx double offchip LDS buffers by gpu info

In reply to a message not in the archive
Quoted 5 lines · Junwei Zhang
---
 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
index 84ab688..7a26298 100644
@@ -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
index d801b86..984674e 100644
@@ -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
index 9c3bd18..85bb701 100644

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

#8 lore raw

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
index b5fd700..d930ad8 100644
@@ -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