drm/amdgpu: export gfx config double offchip LDS buffers (v3)
Subsystems (3)
PATCH v3 1/1 drm/amdgpu: export gfx config double offchip LDS buffers (v3)
v2: move the config struct to drm_amdgpu_info_device
v3: move the config feature to amdgpu_gca_config
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 ++ drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 16 +++++++++++++++- include/uapi/drm/amdgpu_drm.h | 2 ++ 6 files changed, 34 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +3 -0
@@ -856,6 +856,9 @@ struct amdgpu_gca_config {uint32_t macrotile_mode_array[16 ];struct amdgpu_rb_config rb_config[AMDGPU_GFX_MAX_SE ][AMDGPU_GFX_MAX_SH_PER_SE ]; + +/* gfx configure feature */ +uint32_t double_offchip_lds_buf; };struct amdgpu_cu_info {
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +2 -0
@@ -545,6 +545,8 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file dev_info.vram_type = adev->mc.vram_type; dev_info.vram_bit_width = adev->mc.vram_width; dev_info.vce_harvest_config = adev->vce.harvest_config; + dev_info.gc_double_offchip_lds_buf = + adev->gfx.config.double_offchip_lds_buf;return copy_to_user (out, &dev_info,min ((size_t )size,sizeof (dev_info))) ? -EFAULT :0 ;
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +6 -0
@@ -1579,6 +1579,11 @@ static void gfx_v6_0_setup_spi(struct amdgpu_device *adev)mutex_unlock (&adev->grbm_idx_mutex); } +static void gfx_v6_0_config_init (struct amdgpu_device *adev) +{ + adev->gfx.config.double_offchip_lds_buf =1 ; +} +static void gfx_v6_0_gpu_init (struct amdgpu_device *adev) {u32 gb_addr_config =0 ;
@@ -1736,6 +1741,7 @@ static void gfx_v6_0_gpu_init(struct amdgpu_device *adev)gfx_v6_0_setup_spi (adev);gfx_v6_0_get_cu_info (adev); +gfx_v6_0_config_init (adev);WREG32 (mmCP_QUEUE_THRESHOLDS, ((0x16 <<CP_QUEUE_THRESHOLDS__ROQ_IB1_START__SHIFT ) | (0x2b <<CP_QUEUE_THRESHOLDS__ROQ_IB2_START__SHIFT )));
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +6 -0
@@ -1876,6 +1876,11 @@ static void gmc_v7_0_init_compute_vmid(struct amdgpu_device *adev)mutex_unlock (&adev->srbm_mutex); } +static void gfx_v7_0_config_init (struct amdgpu_device *adev) +{ + adev->gfx.config.double_offchip_lds_buf =1 ; +} +/** * gfx_v7_0_gpu_init - setup the 3D engine *
@@ -1900,6 +1905,7 @@ static void gfx_v7_0_gpu_init(struct amdgpu_device *adev)gfx_v7_0_setup_rb (adev);gfx_v7_0_get_cu_info (adev); +gfx_v7_0_config_init (adev);/* set HW defaults for 3D engine */ WREG32(mmCP_MEQ_THRESHOLDS,
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +15 -1
@@ -3846,6 +3846,19 @@ static void gfx_v8_0_init_compute_vmid(struct amdgpu_device *adev)mutex_unlock (&adev->srbm_mutex); } +static void gfx_v8_0_config_init (struct amdgpu_device *adev) +{ +switch (adev->asic_type) { +default : + adev->gfx.config.double_offchip_lds_buf =1 ; +break ; +case CHIP_CARRIZO : +case CHIP_STONEY : + adev->gfx.config.double_offchip_lds_buf =0 ; +break ; + } +} +static void gfx_v8_0_gpu_init (struct amdgpu_device *adev) {u32 tmp, sh_static_mem_cfg;
@@ -3859,6 +3872,7 @@ static void gfx_v8_0_gpu_init(struct amdgpu_device *adev)gfx_v8_0_tiling_mode_table_init (adev);gfx_v8_0_setup_rb (adev);gfx_v8_0_get_cu_info (adev); +gfx_v8_0_config_init (adev);/* XXX SH_MEM regs */ /* where to put LDS, scratch, GPUVM in FSA64 space */
@@ -7389,4 +7403,4 @@ static void gfx_v8_0_compute_mqd_soft_fini(struct amdgpu_device *adev) ring = &adev->gfx.kiq.ring;amdgpu_bo_free_kernel (&ring->mqd_obj, &ring->mqd_gpu_addr, (void **)&ring->mqd_ptr); -} +}
include/uapi/drm/amdgpu_drm.h +2 -0
@@ -790,6 +790,8 @@ struct drm_amdgpu_info_device {__u32 vram_bit_width;/* vce harvesting instance */ __u32 vce_harvest_config; +/* gfx double offchip LDS buffers */ +__u32 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): 1487559054-30974-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org
Hi Christian,
Read the mail again, maybe you'd like to add amdgpu_gfx_config to the amdgpu_gca_config, right? {{{
+struct amdgpu_gfx_config {
+ uint32_t double_offchip_lds_buf;
+};
+
@@ -856,6 +856,9 @@ struct amdgpu_gca_config {
uint32_t macrotile_mode_array[16];
struct amdgpu_rb_config
rb_config[AMDGPU_GFX_MAX_SE][AMDGPU_GFX_MAX_SH_PER_SE];
+
+ /* gfx config */
+ struct amdgpu_gfx_config gc;
};
}}}
Quoted 7 lines
In this case you might want to bump the driver minor number as well to indicate validity of that field.
See we can extend the structures by adding new fields to the end, but old kernels will not set those fields (so they stay zero cleared).
Not sure what the UMD is expecting here.
About the version bump, we can add version in the end of amdgpu_gfx_config?
Vulcan may get to know the enabled features/configs according to the version for a specific release.
Regards,
Jerry (Junwei Zhang)
Linux Base Graphics
SRDC Software Development
_____________________________________
Quoted 160 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Junwei Zhang
Sent: Monday, February 20, 2017 10:51
To: [email protected]
Cc: Zhang, Jerry
Subject: [PATCH v3 1/1] drm/amdgpu: export gfx config double offchip LDS buffers (v3)v2: move the config struct to
drm_amdgpu_info_device
v3: move the config feature toamdgpu_gca_configSigned-off-by Junwei Zhang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 ++ drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 16 +++++++++++++++- include/uapi/drm/amdgpu_drm.h | 2 ++ 6 files changed, 34 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu.h +3
-0@@ -856,6 +856,9 @@ struct amdgpu_gca_config {uint32_t macrotile_mode_array[16 ];struct amdgpu_rb_config rb_config[AMDGPU_GFX_MAX_SE ][AMDGPU_GFX_MAX_SH_PER_SE ]; + +/* gfx configure feature */ +uint32_t double_offchip_lds_buf; };struct
amdgpu_cu_info{drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +2
-0@@ -545,6 +545,8 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file dev_info.vram_type = adev->mc.vram_type; dev_info.vram_bit_width = adev->mc.vram_width; dev_info.vce_harvest_config = adev->vce.harvest_config; + dev_info.gc_double_offchip_lds_buf = + adev->gfx.config.double_offchip_lds_buf; return copy_to_user(out, &dev_info,
min((size_t)size, sizeof(dev_info))) ?-EFAULT:
0; diff --gita/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.cb/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
index 782190d..138e15a 100644drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +4
-0@@ -1579,6 +1579,11 @@ static void gfx_v6_0_setup_spi(struct amdgpu_device *adev)mutex_unlock (&adev->grbm_idx_mutex); } +static void gfx_v6_0_config_init (struct amdgpu_device *adev) { + adev->gfx.config.double_offchip_lds_buf =1 ; } +static void gfx_v6_0_gpu_init (struct amdgpu_device *adev) {u32 gb_addr_config =0 ;@@ -1736,6 +1741,7 @@ static void gfx_v6_0_gpu_init(struct amdgpu_device *adev)gfx_v6_0_setup_spi (adev);gfx_v6_0_get_cu_info (adev); +gfx_v6_0_config_init (adev); WREG32(mmCP_QUEUE_THRESHOLDS, ((0x16 <<
CP_QUEUE_THRESHOLDS__ROQ_IB1_START__SHIFT) |
(0x2b<<CP_QUEUE_THRESHOLDS__ROQ_IB2_START__SHIFT)));drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +4
-0@@ -1876,6 +1876,11 @@ static void gmc_v7_0_init_compute_vmid(struct amdgpu_device *adev) mutex_unlock(&adev->srbm_mutex); } +static void gfx_v7_0_config_init (struct amdgpu_device *adev) { + adev->gfx.config.double_offchip_lds_buf =1 ; } +/** * gfx_v7_0_gpu_init - setup the 3D engine * @@ -1900,6 +1905,7 @@ static void gfx_v7_0_gpu_init(struct amdgpu_device *adev)gfx_v7_0_setup_rb (adev);gfx_v7_0_get_cu_info (adev); +gfx_v7_0_config_init (adev);/* set HW defaults for 3D engine */ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +0
-0WREG32(mmCP_MEQ_THRESHOLDS,drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +13
-0@@ -3846,6 +3846,19 @@ static void gfx_v8_0_init_compute_vmid(struct amdgpu_device *adev) mutex_unlock(&adev->srbm_mutex); } +static void gfx_v8_0_config_init (struct amdgpu_device *adev) { +switch (adev->asic_type) { +default : + adev->gfx.config.double_offchip_lds_buf =1 ; +break ; +case CHIP_CARRIZO : +case CHIP_STONEY : + adev->gfx.config.double_offchip_lds_buf =0 ; +break ; + } +} +static void gfx_v8_0_gpu_init (struct amdgpu_device *adev) {u32 tmp, sh_static_mem_cfg;@@ -3859,6 +3872,7 @@ static void gfx_v8_0_gpu_init(struct amdgpu_device *adev)gfx_v8_0_tiling_mode_table_init (adev);gfx_v8_0_setup_rb (adev);gfx_v8_0_get_cu_info (adev); +gfx_v8_0_config_init (adev);/* XXX SH_MEM regs */ /* where to put LDS, scratch, GPUVM in FSA64 space */ @@ -7389,4
+7403,4 @@ static voidgfx_v8_0_compute_mqd_soft_fini(struct amdgpu_device *adev)drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0
-0ring = &adev->gfx.kiq.ring; amdgpu_bo_free_kernel(&ring->mqd_obj, &ring->mqd_gpu_addr, (void**)&ring->mqd_ptr); -} \ No newline at end of file
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +1
-0+}(quoted diff) +0
-0
b/include/uapi/drm/amdgpu_drm.hindex 64abc9b..0849592 100644include/uapi/drm/amdgpu_drm.h +2
-1@@ -790,6 +790,8 @@ struct drm_amdgpu_info_device {__u32 vram_bit_width;/* vce harvesting instance */ __u32 vce_harvest_config; +/* gfx double offchip LDS buffers */ +__u32 gc_double_offchip_lds_buf; };struct drm_amdgpu_info_hw_ip { --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): DM5PR12MB18181E995F962015A84AF955FF5E0-2J9CzHegvk+QhrfEZJlvtAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Hi Jerry & Christian,
Regarding to the version control, what is the rule of bumping the PACKAGE_VERSION of libdrm?
We may need something, like the size of gpu_info structure or the something like PACKAGE VERSION of the running libdrm_amdgpu.so, to ensure that we did not breach the ABI.
Thanks.
Best Regards,
David
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Zhang, Jerry
Sent: Monday, February 20, 2017 5:04 PM
To: Zhang, Jerry <[email protected]>; [email protected]
Subject: RE: [PATCH v3 1/1] drm/amdgpu: export gfx config double offchip LDS buffers (v3)
Hi Christian,
Read the mail again, maybe you'd like to add amdgpu_gfx_config to the amdgpu_gca_config, right? {{{
+struct amdgpu_gfx_config {
+ uint32_t double_offchip_lds_buf;
+};
+
@@ -856,6 +856,9 @@ struct amdgpu_gca_config {
uint32_t macrotile_mode_array[16];
struct amdgpu_rb_config
rb_config[AMDGPU_GFX_MAX_SE][AMDGPU_GFX_MAX_SH_PER_SE];
+
+ /* gfx config */
+ struct amdgpu_gfx_config gc;
};
}}}
Quoted 7 lines
In this case you might want to bump the driver minor number as well to indicate validity of that field.
See we can extend the structures by adding new fields to the end, but old kernels will not set those fields (so they stay zero cleared).
Not sure what the UMD is expecting here.
About the version bump, we can add version in the end of amdgpu_gfx_config?
Vulcan may get to know the enabled features/configs according to the version for a specific release.
Regards,
Jerry (Junwei Zhang)
Linux Base Graphics
SRDC Software Development
_____________________________________
Quoted 164 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Junwei Zhang
Sent: Monday, February 20, 2017 10:51
To: [email protected]
Cc: Zhang, Jerry
Subject: [PATCH v3 1/1] drm/amdgpu: export gfx config double offchip LDS buffers (v3)v2: move the config struct to
drm_amdgpu_info_device
v3: move the config feature toamdgpu_gca_configSigned-off-by Junwei Zhang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 ++ drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 16 +++++++++++++++- include/uapi/drm/amdgpu_drm.h | 2 ++ 6 files changed, 34 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu.h +3
-0@@ -856,6 +856,9 @@ struct amdgpu_gca_config {uint32_t macrotile_mode_array[16 ];struct amdgpu_rb_config rb_config[AMDGPU_GFX_MAX_SE ][AMDGPU_GFX_MAX_SH_PER_SE ]; + +/* gfx configure feature */ +uint32_t double_offchip_lds_buf; };struct
amdgpu_cu_info{drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +2
-0@@ -545,6 +545,8 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file dev_info.vram_type = adev->mc.vram_type; dev_info.vram_bit_width = adev->mc.vram_width; dev_info.vce_harvest_config = adev->vce.harvest_config; + dev_info.gc_double_offchip_lds_buf = + adev->gfx.config.double_offchip_lds_buf; return copy_to_user(out, &dev_info,
min((size_t)size, sizeof(dev_info))) ?-EFAULT:
0; diff --gita/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.cb/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
index 782190d..138e15a 100644drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +0
-0@@ -1579,6 +1579,11 @@ static void gfx_v6_0_setup_spi(struct
amdgpu_device
*adev)drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +3
-0mutex_unlock (&adev->grbm_idx_mutex); } +static void gfx_v6_0_config_init (struct amdgpu_device *adev) { + adev->gfx.config.double_offchip_lds_buf =1 ; } +static void gfx_v6_0_gpu_init (struct amdgpu_device *adev) {u32 gb_addr_config =0 ;@@ -1736,6 +1741,7 @@ static void gfx_v6_0_gpu_init(struct
amdgpu_device
*adev)drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +1
-0gfx_v6_0_setup_spi (adev);gfx_v6_0_get_cu_info (adev); +gfx_v6_0_config_init (adev); WREG32(mmCP_QUEUE_THRESHOLDS, ((0x16 <<
CP_QUEUE_THRESHOLDS__ROQ_IB1_START__SHIFT) |
(0x2b<<CP_QUEUE_THRESHOLDS__ROQ_IB2_START__SHIFT)));drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +3
-0@@ -1876,6 +1876,11 @@ static void gmc_v7_0_init_compute_vmid(struct amdgpu_device *adev) mutex_unlock(&adev->srbm_mutex); } +static void gfx_v7_0_config_init (struct amdgpu_device *adev) { + adev->gfx.config.double_offchip_lds_buf =1 ; } +/** * gfx_v7_0_gpu_init - setup the 3D engine * @@ -1900,6 +1905,7 @@ static void gfx_v7_0_gpu_init(struct
amdgpu_device
*adev)drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +1
-0gfx_v7_0_setup_rb (adev);gfx_v7_0_get_cu_info (adev); +gfx_v7_0_config_init (adev);/* set HW defaults for 3D engine */ WREG32(mmCP_MEQ_THRESHOLDS,drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +12
-0@@ -3846,6 +3846,19 @@ static void gfx_v8_0_init_compute_vmid(struct amdgpu_device *adev) mutex_unlock(&adev->srbm_mutex); } +static void gfx_v8_0_config_init (struct amdgpu_device *adev) { +switch (adev->asic_type) { +default : + adev->gfx.config.double_offchip_lds_buf =1 ; +break ; +case CHIP_CARRIZO : +case CHIP_STONEY : + adev->gfx.config.double_offchip_lds_buf =0 ; +break ; + } +} +static void gfx_v8_0_gpu_init (struct amdgpu_device *adev) {u32 tmp, sh_static_mem_cfg;@@ -3859,6 +3872,7 @@ static void gfx_v8_0_gpu_init(struct
amdgpu_device
*adev)drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +2
-0gfx_v8_0_tiling_mode_table_init (adev);gfx_v8_0_setup_rb (adev);gfx_v8_0_get_cu_info (adev); +gfx_v8_0_config_init (adev);/* XXX SH_MEM regs */ /* where to put LDS, scratch, GPUVM in FSA64 space */ @@ -7389,4 +7403,4 @@ static void gfx_v8_0_compute_mqd_soft_fini(struct
amdgpu_device*adev)drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0
-0ring = &adev->gfx.kiq.ring; amdgpu_bo_free_kernel(&ring->mqd_obj, &ring->mqd_gpu_addr, (void**)&ring->mqd_ptr); -} \ No newline at end of file
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +1
-0+}(quoted diff) +0
-0
b/include/uapi/drm/amdgpu_drm.hindex 64abc9b..0849592 100644include/uapi/drm/amdgpu_drm.h +2
-1@@ -790,6 +790,8 @@ struct drm_amdgpu_info_device {__u32 vram_bit_width;/* vce harvesting instance */ __u32 vce_harvest_config; +/* gfx double offchip LDS buffers */ +__u32 gc_double_offchip_lds_buf; };struct drm_amdgpu_info_hw_ip { --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
_______________________________________________
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): BN4PR12MB07879854436D0D552919A32BEE5E0-aH9FTdWx9BancvD3hK8fMAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Quoted 4 lines · David
Hi Jerry & Christian,
Regarding to the version control, what is the rule of bumping thePACKAGE_VERSIONof libdrm?
We may need something, like the size ofgpu_infostructure or the something like PACKAGE VERSION of the running libdrm_amdgpu.so, to ensure that we did not breach the ABI.
Please see the RELEASING (and include/drm/README) documents in libdrm.
Thanks
Emil
_______________________________________________
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): CACvgo50WQeRgdrCotSONnzE08DVapv=8K=LNzEeg8dDYe1qWUQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Thanks for the Info, but it seems the PACKAGE_VERSION is not the version i am looking for.
Is there any ways that libdrm.so/libdrm_amdgpu.so can provide in the runtime to indicate the ABI state besides the SO_VERSION? I may want to compile the driver against the latest libdrm but still hope it can co-work with previous version libdrm/libdrm_amdgpu. Is it not supported?
Best Regards,
David
Quoted 11 lines · Emil Velikov
Quoted 4 lines · David
Hi Jerry & Christian,
Regarding to the version control, what is the rule of bumping thePACKAGE_VERSIONof libdrm?
We may need something, like the size ofgpu_infostructure or the something like PACKAGE VERSION of the running libdrm_amdgpu.so, to ensure that we did not breach the ABI.Please see the RELEASING (and
include/drm/README) documents in libdrm.Thanks
Emil
_______________________________________________
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): 41391F3D-9B21-4E3B-AC06-50ABDB919357-5C7GfCeVMHo@public.gmane.org
Quoted 5 lines · David
Thanks for the Info, but it seems the
PACKAGE_VERSIONis not the version i am looking for.
Is there any ways that libdrm.so/libdrm_amdgpu.so can provide in the runtime to indicate the ABI state besides theSO_VERSION? I may want to compile the driver against the latest libdrm but still hope it can co-work with previous version libdrm/libdrm_amdgpu. Is it not supported?
If you want to break the ABI you must bump the SONAME version. Not that bad of idea, but should you _explicitly_ ensure that say no API gets removed.
Before you ask - there's [at least] two components which link against libdrm_amdgpu.so and have unresolved/unsolved symbols. If any symbol gets removed existing, these packages will break.
This is how things broke with nouveau and you don't want to repeat that.
Tl;Dr; I'd opt for Christian's suggestion ;-)
Regards,
Emil
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Am 20.02.2017 um 10:03 schrieb Zhang, Jerry:
Quoted 3 lines
Hi Christian,
Read the mail again, maybe you'd like to add
amdgpu_gfx_configto theamdgpu_gca_config, right?
No, like you did it in the patch is already fine. I don't see much of a reason for two structures here.
But you could rename amdgpu_gca_config to amdgpu_gfx_config if you like.
Quoted 19 lines
{{{
(quoted diff) +7
-0+struct amdgpu_gfx_config { + uint32_t double_offchip_lds_buf; +}; + @@ -856,6 +856,9 @@ struct amdgpu_gca_config { uint32_t macrotile_mode_array[16]; struct amdgpu_rb_config rb_config[AMDGPU_GFX_MAX_SE][AMDGPU_GFX_MAX_SH_PER_SE]; + + /* gfx config */ + struct amdgpu_gfx_config gc; };}}}
Quoted 3 lines
In this case you might want to bump the driver minor number as well to indicate validity of that field.
Quoted 6 lines
Quoted 4 lines
See we can extend the structures by adding new fields to the end, but old kernels will not set those fields (so they stay zero cleared).
Not sure what the UMD is expecting here.
About the version bump, we can add version in the end of
amdgpu_gfx_config?
Vulcan may get to know the enabled features/configs according to the version for a specific release.
No, we can't push that upstream. The documented way of versionizing the IOCTL interface is the DRM version.
Adding a second mechanism is probably a really bad idea and would only lead to confusion.
One alternative you could use in the Vulkan UMD is setting the field to something like 0xffffffff, call the IOCTL and see if the kernel changed the value.
If it isn't changed the kernel doesn't support the interface.
Regards,
Christian.
Quoted 170 lines
Regards,
Jerry (Junwei Zhang)Linux Base Graphics
SRDC Software Development
_____________________________________Quoted 160 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Junwei Zhang
Sent: Monday, February 20, 2017 10:51
To: [email protected]
Cc: Zhang, Jerry
Subject: [PATCH v3 1/1] drm/amdgpu: export gfx config double offchip LDS buffers (v3)v2: move the config struct to
drm_amdgpu_info_device
v3: move the config feature toamdgpu_gca_configSigned-off-by Junwei Zhang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 ++ drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 16 +++++++++++++++- include/uapi/drm/amdgpu_drm.h | 2 ++ 6 files changed, 34 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu.h +3
-0@@ -856,6 +856,9 @@ struct amdgpu_gca_config {uint32_t macrotile_mode_array[16 ];struct amdgpu_rb_config rb_config[AMDGPU_GFX_MAX_SE ][AMDGPU_GFX_MAX_SH_PER_SE ]; + +/* gfx configure feature */ +uint32_t double_offchip_lds_buf; };struct amdgpu_cu_info {drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +2
-0@@ -545,6 +545,8 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file dev_info.vram_type = adev->mc.vram_type; dev_info.vram_bit_width = adev->mc.vram_width; dev_info.vce_harvest_config = adev->vce.harvest_config; + dev_info.gc_double_offchip_lds_buf = + adev->gfx.config.double_offchip_lds_buf; return copy_to_user(out, &dev_info,
min((size_t)size, sizeof(dev_info))) ?-EFAULT:
0; diff --gita/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.cb/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
index 782190d..138e15a 100644drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +4
-0@@ -1579,6 +1579,11 @@ static void gfx_v6_0_setup_spi(struct amdgpu_device *adev)mutex_unlock (&adev->grbm_idx_mutex); } +static void gfx_v6_0_config_init (struct amdgpu_device *adev) { + adev->gfx.config.double_offchip_lds_buf =1 ; } +static void gfx_v6_0_gpu_init (struct amdgpu_device *adev) {u32 gb_addr_config =0 ;@@ -1736,6 +1741,7 @@ static void gfx_v6_0_gpu_init(struct amdgpu_device *adev)gfx_v6_0_setup_spi (adev);gfx_v6_0_get_cu_info (adev); +gfx_v6_0_config_init (adev); WREG32(mmCP_QUEUE_THRESHOLDS, ((0x16 <<
CP_QUEUE_THRESHOLDS__ROQ_IB1_START__SHIFT) |
(0x2b<<CP_QUEUE_THRESHOLDS__ROQ_IB2_START__SHIFT)));drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +4
-0@@ -1876,6 +1876,11 @@ static void gmc_v7_0_init_compute_vmid(struct amdgpu_device *adev) mutex_unlock(&adev->srbm_mutex); } +static void gfx_v7_0_config_init (struct amdgpu_device *adev) { + adev->gfx.config.double_offchip_lds_buf =1 ; } +/** * gfx_v7_0_gpu_init - setup the 3D engine * @@ -1900,6 +1905,7 @@ static void gfx_v7_0_gpu_init(struct amdgpu_device *adev)gfx_v7_0_setup_rb (adev);gfx_v7_0_get_cu_info (adev); +gfx_v7_0_config_init (adev);/* set HW defaults for 3D engine */ WREG32(mmCP_MEQ_THRESHOLDS,
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +13
-0@@ -3846,6 +3846,19 @@ static void gfx_v8_0_init_compute_vmid(struct amdgpu_device *adev) mutex_unlock(&adev->srbm_mutex); } +static void gfx_v8_0_config_init (struct amdgpu_device *adev) { +switch (adev->asic_type) { +default : + adev->gfx.config.double_offchip_lds_buf =1 ; +break ; +case CHIP_CARRIZO : +case CHIP_STONEY : + adev->gfx.config.double_offchip_lds_buf =0 ; +break ; + } +} +static void gfx_v8_0_gpu_init (struct amdgpu_device *adev) {u32 tmp, sh_static_mem_cfg;@@ -3859,6 +3872,7 @@ static void gfx_v8_0_gpu_init(struct amdgpu_device *adev)gfx_v8_0_tiling_mode_table_init (adev);gfx_v8_0_setup_rb (adev);gfx_v8_0_get_cu_info (adev); +gfx_v8_0_config_init (adev);/* XXX SH_MEM regs */ /* where to put LDS, scratch, GPUVM in FSA64 space */ @@ -7389,4
+7403,4 @@ static voidgfx_v8_0_compute_mqd_soft_fini(struct amdgpu_device *adev)ring =
&adev->gfx.kiq.ring; amdgpu_bo_free_kernel(&ring->mqd_obj,&ring->mqd_gpu_addr, (void
**)&ring->mqd_ptr); -} \ No newline at end of filedrivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +1
-0+}(quoted diff) +0
-0
b/include/uapi/drm/amdgpu_drm.hindex 64abc9b..0849592 100644include/uapi/drm/amdgpu_drm.h +2
-1@@ -790,6 +790,8 @@ struct drm_amdgpu_info_device {__u32 vram_bit_width;/* vce harvesting instance */ __u32 vce_harvest_config; +/* gfx double offchip LDS buffers */ +__u32 gc_double_offchip_lds_buf; };struct drm_amdgpu_info_hw_ip { --1.9.1
Quoted 8 lines
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
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Christian König
Reviewed-byAm 20.02.2017 um 03:50 schrieb Junwei Zhang:
Quoted 4 lines
v2: move the config struct to
drm_amdgpu_info_device
v3: move the config feature toamdgpu_gca_configSigned-off-by Junwei Zhang <[email protected]>
Quoted 128 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 ++ drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 16 +++++++++++++++- include/uapi/drm/amdgpu_drm.h | 2 ++ 6 files changed, 34 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu.h +3
-0@@ -856,6 +856,9 @@ struct amdgpu_gca_config {uint32_t macrotile_mode_array[16 ];struct amdgpu_rb_config rb_config[AMDGPU_GFX_MAX_SE ][AMDGPU_GFX_MAX_SH_PER_SE ]; + +/* gfx configure feature */ +uint32_t double_offchip_lds_buf; };struct amdgpu_cu_info {drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +2
-0@@ -545,6 +545,8 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file dev_info.vram_type = adev->mc.vram_type; dev_info.vram_bit_width = adev->mc.vram_width; dev_info.vce_harvest_config = adev->vce.harvest_config; + dev_info.gc_double_offchip_lds_buf = + adev->gfx.config.double_offchip_lds_buf;return copy_to_user (out, &dev_info,min ((size_t )size,sizeof (dev_info))) ? -EFAULT :0 ;drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +6
-0@@ -1579,6 +1579,11 @@ static void gfx_v6_0_setup_spi(struct amdgpu_device *adev)mutex_unlock (&adev->grbm_idx_mutex); } +static void gfx_v6_0_config_init (struct amdgpu_device *adev) +{ + adev->gfx.config.double_offchip_lds_buf =1 ; +} +static void gfx_v6_0_gpu_init (struct amdgpu_device *adev) {u32 gb_addr_config =0 ;@@ -1736,6 +1741,7 @@ static void gfx_v6_0_gpu_init(struct amdgpu_device *adev)gfx_v6_0_setup_spi (adev);gfx_v6_0_get_cu_info (adev); +gfx_v6_0_config_init (adev);WREG32 (mmCP_QUEUE_THRESHOLDS, ((0x16 <<CP_QUEUE_THRESHOLDS__ROQ_IB1_START__SHIFT ) | (0x2b <<CP_QUEUE_THRESHOLDS__ROQ_IB2_START__SHIFT )));drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +6
-0@@ -1876,6 +1876,11 @@ static void gmc_v7_0_init_compute_vmid(struct amdgpu_device *adev)mutex_unlock (&adev->srbm_mutex); } +static void gfx_v7_0_config_init (struct amdgpu_device *adev) +{ + adev->gfx.config.double_offchip_lds_buf =1 ; +} +/** * gfx_v7_0_gpu_init - setup the 3D engine * @@ -1900,6 +1905,7 @@ static void gfx_v7_0_gpu_init(struct amdgpu_device *adev)gfx_v7_0_setup_rb (adev);gfx_v7_0_get_cu_info (adev); +gfx_v7_0_config_init (adev);/* set HW defaults for 3D engine */ WREG32(mmCP_MEQ_THRESHOLDS,drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +15
-1@@ -3846,6 +3846,19 @@ static void gfx_v8_0_init_compute_vmid(struct amdgpu_device *adev)mutex_unlock (&adev->srbm_mutex); } +static void gfx_v8_0_config_init (struct amdgpu_device *adev) +{ +switch (adev->asic_type) { +default : + adev->gfx.config.double_offchip_lds_buf =1 ; +break ; +case CHIP_CARRIZO : +case CHIP_STONEY : + adev->gfx.config.double_offchip_lds_buf =0 ; +break ; + } +} +static void gfx_v8_0_gpu_init (struct amdgpu_device *adev) {u32 tmp, sh_static_mem_cfg;@@ -3859,6 +3872,7 @@ static void gfx_v8_0_gpu_init(struct amdgpu_device *adev)gfx_v8_0_tiling_mode_table_init (adev);gfx_v8_0_setup_rb (adev);gfx_v8_0_get_cu_info (adev); +gfx_v8_0_config_init (adev);/* XXX SH_MEM regs */ /* where to put LDS, scratch, GPUVM in FSA64 space */ @@ -7389,4 +7403,4 @@ static void gfx_v8_0_compute_mqd_soft_fini(struct amdgpu_device *adev) ring = &adev->gfx.kiq.ring;amdgpu_bo_free_kernel (&ring->mqd_obj, &ring->mqd_gpu_addr, (void **)&ring->mqd_ptr); -} +}include/uapi/drm/amdgpu_drm.h +0
-0
include/uapi/drm/amdgpu_drm.h struct drm_amdgpu_info_device { · line 797
Quoted 8 lines
include/uapi/drm/amdgpu_drm.h +2
-0@@ -790,6 +790,8 @@ struct drm_amdgpu_info_device {__u32 vram_bit_width;/* vce harvesting instance */ __u32 vce_harvest_config; +/* gfx double offchip LDS buffers */ +__u32 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
Deucher, Alexander
Reviewed-by Alex DeucherQuoted 9 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Junwei Zhang
Sent: Sunday, February 19, 2017 9:51 PM
To: [email protected]
Cc: Zhang, Jerry
Subject: [PATCH v3 1/1] drm/amdgpu: export gfx config double offchip LDS buffers (v3)
Quoted 4 lines
v2: move the config struct to
drm_amdgpu_info_device
v3: move the config feature toamdgpu_gca_configSigned-off-by Junwei Zhang <[email protected]>
Should bump the drm version as well in amdgpu_drv.c. With that fixed:
Quoted 158 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 ++ drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 16 +++++++++++++++- include/uapi/drm/amdgpu_drm.h | 2 ++ 6 files changed, 34 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu.h +3
-0@@ -856,6 +856,9 @@ struct amdgpu_gca_config {uint32_t macrotile_mode_array[16 ];struct amdgpu_rb_config rb_config[AMDGPU_GFX_MAX_SE ][AMDGPU_GFX_MAX_SH_PER_SE ]; + +/* gfx configure feature */ +uint32_t double_offchip_lds_buf; };struct
amdgpu_cu_info{drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +0
-0@@ -545,6 +545,8 @@ static int amdgpu_info_ioctl(struct drm_device *dev,void *data, struct
drm_filedrivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +2
-0dev_info.vram_type = adev->mc.vram_type; dev_info.vram_bit_width = adev->mc.vram_width; dev_info.vce_harvest_config = adev->vce.harvest_config; + dev_info.gc_double_offchip_lds_buf = + adev->gfx.config.double_offchip_lds_buf;return copy_to_user (out, &dev_info, min((size_t)size, sizeof(dev_info))) ? -EFAULT : 0;
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +5
-0@@ -1579,6 +1579,11 @@ static void gfx_v6_0_setup_spi(struct amdgpu_device *adev) mutex_unlock(&adev->grbm_idx_mutex); } +static void gfx_v6_0_config_init (struct amdgpu_device *adev) +{ + adev->gfx.config.double_offchip_lds_buf =1 ; +} +static void gfx_v6_0_gpu_init (struct amdgpu_device *adev) {drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +1
-0u32 gb_addr_config =0 ;@@ -1736,6 +1741,7 @@ static void gfx_v6_0_gpu_init(struct amdgpu_device *adev)gfx_v6_0_setup_spi (adev );gfx_v6_0_get_cu_info (adev); +gfx_v6_0_config_init (adev); WREG32(mmCP_QUEUE_THRESHOLDS, ((0x16 <<
CP_QUEUE_THRESHOLDS__ROQ_IB1_START__SHIFT) |
(0x2b<<CP_QUEUE_THRESHOLDS__ROQ_IB2_START__SHIFT)));drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +5
-0@@ -1876,6 +1876,11 @@ static void gmc_v7_0_init_compute_vmid(struct amdgpu_device *adev) mutex_unlock(&adev->srbm_mutex); } +static void gfx_v7_0_config_init (struct amdgpu_device *adev) +{ + adev->gfx.config.double_offchip_lds_buf =1 ; +} +/** * gfx_v7_0_gpu_init - setup the 3D engine *
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +1
-0@@ -1900,6 +1905,7 @@ static void gfx_v7_0_gpu_init(struct amdgpu_device *adev)gfx_v7_0_setup_rb (adev );gfx_v7_0_get_cu_info (adev); +gfx_v7_0_config_init (adev);/* set HW defaults for 3D engine */ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +0
-0WREG32(mmCP_MEQ_THRESHOLDS,drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +13
-0@@ -3846,6 +3846,19 @@ static void gfx_v8_0_init_compute_vmid(struct amdgpu_device *adev) mutex_unlock(&adev->srbm_mutex); } +static void gfx_v8_0_config_init (struct amdgpu_device *adev) +{ +switch (adev->asic_type) { +default : + adev->gfx.config.double_offchip_lds_buf =1 ; +break ; +case CHIP_CARRIZO : +case CHIP_STONEY : + adev->gfx.config.double_offchip_lds_buf =0 ; +break ; + } +} +static void gfx_v8_0_gpu_init (struct amdgpu_device *adev) {drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +1
-0u32 tmp, sh_static_mem_cfg;@@ -3859,6 +3872,7 @@ static void gfx_v8_0_gpu_init(struct amdgpu_device *adev)gfx_v8_0_tiling_mode_table_init (adev );gfx_v8_0_setup_rb (adev);gfx_v8_0_get_cu_info (adev); +gfx_v8_0_config_init (adev);/* XXX SH_MEM regs */ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0
-0/* where to put LDS, scratch, GPUVM in FSA64 space */ @@ -7389,4 +7403,4 @@ static void gfx_v8_0_compute_mqd_soft_fini(struct amdgpu_device *adev) ring = &adev->gfx.kiq.ring; amdgpu_bo_free_kernel(&ring->mqd_obj, &ring->mqd_gpu_addr,(void **)&ring->mqd_ptr);
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +1
-1-} +}include/uapi/drm/amdgpu_drm.h +2
-1@@ -790,6 +790,8 @@ struct drm_amdgpu_info_device {__u32 vram_bit_width;/* vce harvesting instance */ __u32 vce_harvest_config; +/* gfx double offchip LDS buffers */ +__u32 gc_double_offchip_lds_buf; };struct drm_amdgpu_info_hw_ip { --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): BN6PR12MB16521B42AE898D7B53764364F7510-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Quoted 17 lines
-----Original Message-----
From: Deucher, Alexander
Sent: Tuesday, February 21, 2017 22:48
To: Zhang, Jerry; [email protected]
Cc: Zhang, Jerry
Subject: RE: [PATCH v3 1/1] drm/amdgpu: export gfx config double offchip LDS buffers (v3)Quoted 9 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Junwei Zhang
Sent: Sunday, February 19, 2017 9:51 PM
To: [email protected]
Cc: Zhang, Jerry
Subject: [PATCH v3 1/1] drm/amdgpu: export gfx config double offchip LDS buffers (v3)
Quoted 7 lines
Quoted 4 lines
v2: move the config struct to
drm_amdgpu_info_device
v3: move the config feature toamdgpu_gca_configSigned-off-by Junwei Zhang <[email protected]>Should bump the drm version as well in
amdgpu_drv.c. With that fixed:Reviewed-by Alex Deucher <[email protected]>
Sorry, I have pushed the patch.
Then prepare another patch to bump the version.
Quoted 145 lines
Quoted 40 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 ++ drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 16 +++++++++++++++- include/uapi/drm/amdgpu_drm.h | 2 ++ 6 files changed, 34 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu.h +3
-0@@ -856,6 +856,9 @@ struct amdgpu_gca_config {uint32_t macrotile_mode_array[16 ];struct amdgpu_rb_config rb_config[AMDGPU_GFX_MAX_SE ][AMDGPU_GFX_MAX_SH_PER_SE ]; + +/* gfx configure feature */ +uint32_t double_offchip_lds_buf; };struct
amdgpu_cu_info{drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +2
-0@@ -545,6 +545,8 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file dev_info.vram_type = adev->mc.vram_type; dev_info.vram_bit_width = adev->mc.vram_width; dev_info.vce_harvest_config = adev->vce.harvest_config; + dev_info.gc_double_offchip_lds_buf = + adev->gfx.config.double_offchip_lds_buf; return copy_to_user(out, &dev_info,Quoted 1 line
min((size_t)size, sizeof(dev_info))) ? - EFAULT :0; diff
Quoted 103 lines
--git
a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.cb/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
index 782190d..138e15a 100644drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +4
-0@@ -1579,6 +1579,11 @@ static void gfx_v6_0_setup_spi(struct amdgpu_device *adev) mutex_unlock(&adev->grbm_idx_mutex); } +static void gfx_v6_0_config_init (struct amdgpu_device *adev) { + adev->gfx.config.double_offchip_lds_buf =1 ; } +static void gfx_v6_0_gpu_init (struct amdgpu_device *adev) {u32 gb_addr_config =0 ;@@ -1736,6 +1741,7 @@ static void gfx_v6_0_gpu_init(struct amdgpu_device *adev)gfx_v6_0_setup_spi (adev );gfx_v6_0_get_cu_info (adev); +gfx_v6_0_config_init (adev); WREG32(mmCP_QUEUE_THRESHOLDS, ((0x16 <<
CP_QUEUE_THRESHOLDS__ROQ_IB1_START__SHIFT) |
(0x2b<<CP_QUEUE_THRESHOLDS__ROQ_IB2_START__SHIFT)));drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +4
-0@@ -1876,6 +1876,11 @@ static void gmc_v7_0_init_compute_vmid(struct amdgpu_device *adev) mutex_unlock(&adev->srbm_mutex); } +static void gfx_v7_0_config_init (struct amdgpu_device *adev) { + adev->gfx.config.double_offchip_lds_buf =1 ; } +/** * gfx_v7_0_gpu_init - setup the 3D engine * @@ -1900,6 +1905,7 @@ static void gfx_v7_0_gpu_init(struct amdgpu_device *adev)gfx_v7_0_setup_rb (adev );gfx_v7_0_get_cu_info (adev); +gfx_v7_0_config_init (adev);/* set HW defaults for 3D engine */ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +0
-0WREG32(mmCP_MEQ_THRESHOLDS,drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +13
-0@@ -3846,6 +3846,19 @@ static void gfx_v8_0_init_compute_vmid(struct amdgpu_device *adev) mutex_unlock(&adev->srbm_mutex); } +static void gfx_v8_0_config_init (struct amdgpu_device *adev) { +switch (adev->asic_type) { +default : + adev->gfx.config.double_offchip_lds_buf =1 ; +break ; +case CHIP_CARRIZO : +case CHIP_STONEY : + adev->gfx.config.double_offchip_lds_buf =0 ; +break ; + } +} +static void gfx_v8_0_gpu_init (struct amdgpu_device *adev) {u32 tmp, sh_static_mem_cfg;@@ -3859,6 +3872,7 @@ static void gfx_v8_0_gpu_init(struct amdgpu_device *adev)gfx_v8_0_tiling_mode_table_init (adev );gfx_v8_0_setup_rb (adev);gfx_v8_0_get_cu_info (adev); +gfx_v8_0_config_init (adev);/* XXX SH_MEM regs */ /* where to put LDS, scratch, GPUVM in FSA64 space */ @@ -7389,4
+7403,4 @@ static voidgfx_v8_0_compute_mqd_soft_fini(struct amdgpu_device *adev)drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0
-0ring = &adev->gfx.kiq.ring; amdgpu_bo_free_kernel(&ring->mqd_obj, &ring->mqd_gpu_addr, (void**)&ring->mqd_ptr); -} \ No newline at end of file
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +1
-0+}(quoted diff) +0
-0
b/include/uapi/drm/amdgpu_drm.hindex 64abc9b..0849592 100644include/uapi/drm/amdgpu_drm.h +2
-0@@ -790,6 +790,8 @@ struct drm_amdgpu_info_device {__u32 vram_bit_width;/* vce harvesting instance */ __u32 vce_harvest_config; +/* gfx double offchip LDS buffers */ +__u32 gc_double_offchip_lds_buf; };
Quoted 8 lines
Quoted 8 lines
include/uapi/drm/amdgpu_drm.h +0
-1struct drm_amdgpu_info_hw_ip { --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
Quoted 45 lines · Junwei Zhang
v2: move the config struct to
drm_amdgpu_info_device
v3: move the config feature toamdgpu_gca_configSigned-off-by Junwei Zhang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 ++ drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 16 +++++++++++++++- include/uapi/drm/amdgpu_drm.h | 2 ++ 6 files changed, 34 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu.h +3
-0@@ -856,6 +856,9 @@ struct amdgpu_gca_config {uint32_t macrotile_mode_array[16 ];struct amdgpu_rb_config rb_config[AMDGPU_GFX_MAX_SE ][AMDGPU_GFX_MAX_SH_PER_SE ]; + +/* gfx configure feature */ +uint32_t double_offchip_lds_buf; };struct amdgpu_cu_info {drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +2
-0@@ -545,6 +545,8 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file dev_info.vram_type = adev->mc.vram_type; dev_info.vram_bit_width = adev->mc.vram_width; dev_info.vce_harvest_config = adev->vce.harvest_config; + dev_info.gc_double_offchip_lds_buf = + adev->gfx.config.double_offchip_lds_buf;return copy_to_user (out, &dev_info,min ((size_t )size,sizeof (dev_info))) ? -EFAULT :0 ;drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +0
-0
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c static void gfx_v6_0_setup_spi(struct amdgpu_device *adev) · line 1584
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +3
-0@@ -1579,6 +1579,11 @@ static void gfx_v6_0_setup_spi(struct amdgpu_device *adev)mutex_unlock (&adev->grbm_idx_mutex); } +static void gfx_v6_0_config_init (struct amdgpu_device *adev) +{ + adev->gfx.config.double_offchip_lds_buf =1 ;
I'm pretty sure GFX6 doesn't have double offchip LDS buffers, so this should be 0.
Marek
_______________________________________________
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): CAAxE2A5CH4gsk0-+ZF=bAO9VxhUtbkdkzo=nfjURP5AWhLGS-A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Hi Marek,
Thanks much for your review.
I thought I got wrong reference code for SI.
I will fix it...
Regards,
Jerry (Junwei Zhang)
Linux Base Graphics
SRDC Software Development
_____________________________________
Quoted 65 lines
-----Original Message-----
From: Marek Olšák [mailto:[email protected]]
Sent: Thursday, February 23, 2017 1:21
To: Zhang, Jerry
Cc: amd-gfx mailing list
Subject: Re: [PATCH v3 1/1] drm/amdgpu: export gfx config double offchip LDS buffers (v3)drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c static int amdgpu_info_ioctl(struct drm_device *dev,
Quoted 35 lines · Junwei Zhang
v2: move the config struct to
drm_amdgpu_info_device
v3: move the config feature toamdgpu_gca_configSigned-off-by Junwei Zhang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 ++ drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 16 +++++++++++++++- include/uapi/drm/amdgpu_drm.h | 2 ++ 6 files changed, 34 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu.h +3
-0@@ -856,6 +856,9 @@ struct amdgpu_gca_config {uint32_t macrotile_mode_array[16 ];struct amdgpu_rb_config rb_config[AMDGPU_GFX_MAX_SE ][AMDGPU_GFX_MAX_SH_PER_SE ]; + +/* gfx configure feature */ +uint32_t double_offchip_lds_buf; };struct
amdgpu_cu_info{drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +0
-0@@ -545,6 +545,8 @@ static int amdgpu_info_ioctl(struct drm_device *dev,void *data, struct
drm_filedrivers/gpu/drm/amd/amdgpu/gfx_v6_0.c static void gfx_v6_0_setup_spi(struct
Quoted 16 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +2
-0dev_info.vram_type = adev->mc.vram_type; dev_info.vram_bit_width = adev->mc.vram_width; dev_info.vce_harvest_config = adev->vce.harvest_config; + dev_info.gc_double_offchip_lds_buf = + adev->gfx.config.double_offchip_lds_buf; return copy_to_user(out, &dev_info,min((size_t)size,
sizeof(dev_info))) ?-EFAULT: 0; diff --gita/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.cb/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
index 782190d..138e15a 100644drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +0
-0@@ -1579,6 +1579,11 @@ static void gfx_v6_0_setup_spi(struct
amdgpu_device*adev)Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +0
-0mutex_unlock (&adev->grbm_idx_mutex); }
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c static void gfx_v6_0_setup_spi(struct · line 1583
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +2
-0+static void gfx_v6_0_config_init (struct amdgpu_device *adev) { + adev->gfx.config.double_offchip_lds_buf =1 ;I'm pretty sure GFX6 doesn't have double offchip LDS buffers, so this should be 0.
Marek
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx