[PATCH libdrm] amdgpu: update the exported always on CU bitmap

Flora Cui Flora.Cui at amd.com
Mon Jun 26 06:12:30 UTC 2017


keep cu_ao_mask unchanged for backward compatibility.

Change-Id: I9f497aadd309977468e246fea333b392c0150276
Signed-off-by: Flora Cui <Flora.Cui at amd.com>
---
This patch should be landed after the kmd patch upsteam. right?
 amdgpu/amdgpu.h          | 2 ++
 amdgpu/amdgpu_gpu_info.c | 1 +
 include/drm/amdgpu_drm.h | 3 +++
 3 files changed, 6 insertions(+)

diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h
index b6779f9..cc80493 100644
--- a/amdgpu/amdgpu.h
+++ b/amdgpu/amdgpu.h
@@ -486,7 +486,9 @@ struct amdgpu_gpu_info {
 	uint32_t pa_sc_raster_cfg1[4];
 	/* CU info */
 	uint32_t cu_active_number;
+	/* NOTE: cu_ao_mask is INVALID, DON'T use it */
 	uint32_t cu_ao_mask;
+	uint32_t cu_ao_bitmap[4][4];
 	uint32_t cu_bitmap[4][4];
 	/* video memory type info*/
 	uint32_t vram_type;
diff --git a/amdgpu/amdgpu_gpu_info.c b/amdgpu/amdgpu_gpu_info.c
index 34f77be..7a5feb9 100644
--- a/amdgpu/amdgpu_gpu_info.c
+++ b/amdgpu/amdgpu_gpu_info.c
@@ -230,6 +230,7 @@ drm_private int amdgpu_query_gpu_info_init(amdgpu_device_handle dev)
 
 	dev->info.cu_active_number = dev->dev_info.cu_active_number;
 	dev->info.cu_ao_mask = dev->dev_info.cu_ao_mask;
+	memcpy(&dev->info.cu_ao_bitmap[0][0], &dev->dev_info.cu_ao_bitmap[0][0], sizeof(dev->info.cu_ao_bitmap));
 	memcpy(&dev->info.cu_bitmap[0][0], &dev->dev_info.cu_bitmap[0][0], sizeof(dev->info.cu_bitmap));
 
 	/* TODO: info->max_quad_shader_pipes is not set */
diff --git a/include/drm/amdgpu_drm.h b/include/drm/amdgpu_drm.h
index df250de..05c4e72 100644
--- a/include/drm/amdgpu_drm.h
+++ b/include/drm/amdgpu_drm.h
@@ -832,6 +832,7 @@ struct drm_amdgpu_info_device {
 	__u64 max_memory_clock;
 	/* cu information */
 	__u32 cu_active_number;
+	/* NOTE: cu_ao_mask is INVALID, DON'T use it */
 	__u32 cu_ao_mask;
 	__u32 cu_bitmap[4][4];
 	/** Render backend pipe mask. One render backend is CB+DB. */
@@ -886,6 +887,8 @@ struct drm_amdgpu_info_device {
 	/* max gs wavefront per vgt*/
 	__u32 max_gs_waves_per_vgt;
 	__u32 _pad1;
+	/* always on cu bitmap */
+	__u32 cu_ao_bitmap[4][4];
 };
 
 struct drm_amdgpu_info_hw_ip {
-- 
2.7.4



More information about the dri-devel mailing list