[PATCH libdrm] amdgpu: update always on cu bitmap

Flora Cui flora.cui at amd.com
Wed Jun 21 02:13:54 UTC 2017


each SE take 16 bit in cu_ao_mask. For ASICs with 4 SE, cu_ao_mask
has invalid value. so I change cu_ao_mask to cu_ao_bitmap[4][4] and increase
kmd driver version.

On Tue, Jun 20, 2017 at 11:49:23AM +0200, Christian König wrote:
> I'm not 100% sure what this is all about, but it clearly won't work like
> this.
> 
> >diff --git a/include/drm/amdgpu_drm.h b/include/drm/amdgpu_drm.h
> >index df250de..dcbe22c 100644
> >--- a/include/drm/amdgpu_drm.h
> >+++ b/include/drm/amdgpu_drm.h
> >@@ -832,7 +832,7 @@ struct drm_amdgpu_info_device {
> >  	__u64 max_memory_clock;
> >  	/* cu information */
> >  	__u32 cu_active_number;
> >-	__u32 cu_ao_mask;
> >+	__u32 cu_ao_bitmap[4][4];
> >  	__u32 cu_bitmap[4][4];
> >  	/** Render backend pipe mask. One render backend is CB+DB. */
> >  	__u32 enabled_rb_pipes_mask;
> That is a non-backward compatible change to the kernel interface and as such
> forbidden.
> 
> Regards,
> Christian.
> 
> Am 20.06.2017 um 11:04 schrieb Flora Cui:
> >Change-Id: Ie2a812716a6802f7a5a0bc09b1a8db824c5bf2ed
> >Signed-off-by: Flora Cui <Flora.Cui at amd.com>
> >---
> >  amdgpu/amdgpu.h          | 2 +-
> >  amdgpu/amdgpu_gpu_info.c | 2 +-
> >  include/drm/amdgpu_drm.h | 2 +-
> >  3 files changed, 3 insertions(+), 3 deletions(-)
> >
> >diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h
> >index b6779f9..34ca5f1 100644
> >--- a/amdgpu/amdgpu.h
> >+++ b/amdgpu/amdgpu.h
> >@@ -486,7 +486,7 @@ struct amdgpu_gpu_info {
> >  	uint32_t pa_sc_raster_cfg1[4];
> >  	/* CU info */
> >  	uint32_t cu_active_number;
> >-	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..acfd700 100644
> >--- a/amdgpu/amdgpu_gpu_info.c
> >+++ b/amdgpu/amdgpu_gpu_info.c
> >@@ -229,7 +229,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..dcbe22c 100644
> >--- a/include/drm/amdgpu_drm.h
> >+++ b/include/drm/amdgpu_drm.h
> >@@ -832,7 +832,7 @@ struct drm_amdgpu_info_device {
> >  	__u64 max_memory_clock;
> >  	/* cu information */
> >  	__u32 cu_active_number;
> >-	__u32 cu_ao_mask;
> >+	__u32 cu_ao_bitmap[4][4];
> >  	__u32 cu_bitmap[4][4];
> >  	/** Render backend pipe mask. One render backend is CB+DB. */
> >  	__u32 enabled_rb_pipes_mask;
> 
> 


More information about the dri-devel mailing list