* [PATCH libdrm] amdgpu: update always on cu bitmap
[not found] ` <1497946521-21500-1-git-send-email-Flora.Cui-5C7GfCeVMHo@public.gmane.org>
@ 2017-06-20 9:04 ` Flora Cui
[not found] ` <1497949479-22146-1-git-send-email-Flora.Cui-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Flora Cui @ 2017-06-20 9:04 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: Flora Cui
Change-Id: Ie2a812716a6802f7a5a0bc09b1a8db824c5bf2ed
Signed-off-by: Flora Cui <Flora.Cui@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;
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH libdrm] amdgpu: update always on cu bitmap
[not found] ` <1497949479-22146-1-git-send-email-Flora.Cui-5C7GfCeVMHo@public.gmane.org>
@ 2017-06-20 9:49 ` Christian König
[not found] ` <75494a7b-0ee1-b8e4-9b5e-a82bfeb0d1bb-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-06-26 6:12 ` [PATCH libdrm] amdgpu: update the exported always on CU bitmap Flora Cui
1 sibling, 1 reply; 8+ messages in thread
From: Christian König @ 2017-06-20 9:49 UTC (permalink / raw)
To: Flora Cui, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
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@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;
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH libdrm] amdgpu: update always on cu bitmap
[not found] ` <75494a7b-0ee1-b8e4-9b5e-a82bfeb0d1bb-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
@ 2017-06-20 10:13 ` Daniel Vetter
2017-06-21 2:13 ` Flora Cui
1 sibling, 0 replies; 8+ messages in thread
From: Daniel Vetter @ 2017-06-20 10:13 UTC (permalink / raw)
To: Christian König
Cc: Flora Cui, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
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.
The uabi changes should also flow from the kernel first, only then land in
libdrm. See libdrm/include/drm/README.
-Daniel
>
> Regards,
> Christian.
>
> Am 20.06.2017 um 11:04 schrieb Flora Cui:
> > Change-Id: Ie2a812716a6802f7a5a0bc09b1a8db824c5bf2ed
> > Signed-off-by: Flora Cui <Flora.Cui@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;
>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH libdrm] amdgpu: update always on cu bitmap
[not found] ` <75494a7b-0ee1-b8e4-9b5e-a82bfeb0d1bb-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-06-20 10:13 ` Daniel Vetter
@ 2017-06-21 2:13 ` Flora Cui
2017-06-21 7:08 ` Daniel Vetter
1 sibling, 1 reply; 8+ messages in thread
From: Flora Cui @ 2017-06-21 2:13 UTC (permalink / raw)
To: Christian König
Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
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@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;
>
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH libdrm] amdgpu: update always on cu bitmap
2017-06-21 2:13 ` Flora Cui
@ 2017-06-21 7:08 ` Daniel Vetter
0 siblings, 0 replies; 8+ messages in thread
From: Daniel Vetter @ 2017-06-21 7:08 UTC (permalink / raw)
To: Flora Cui
Cc: Christian König, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
On Wed, Jun 21, 2017 at 10:13:54AM +0800, Flora Cui wrote:
> 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.
Please read Documentation/ioctl/botching-up-ioctls.txt
You cannot change ioctl structures like you're proposing here.
Thanks, Daniel
>
> 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@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;
> >
> >
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH libdrm] amdgpu: update the exported always on CU bitmap
[not found] ` <1497949479-22146-1-git-send-email-Flora.Cui-5C7GfCeVMHo@public.gmane.org>
2017-06-20 9:49 ` Christian König
@ 2017-06-26 6:12 ` Flora Cui
2017-06-26 6:52 ` Michel Dänzer
[not found] ` <1498457550-27605-1-git-send-email-Flora.Cui-5C7GfCeVMHo@public.gmane.org>
1 sibling, 2 replies; 8+ messages in thread
From: Flora Cui @ 2017-06-26 6:12 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: Flora Cui
keep cu_ao_mask unchanged for backward compatibility.
Change-Id: I9f497aadd309977468e246fea333b392c0150276
Signed-off-by: Flora Cui <Flora.Cui@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
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH libdrm] amdgpu: update the exported always on CU bitmap
2017-06-26 6:12 ` [PATCH libdrm] amdgpu: update the exported always on CU bitmap Flora Cui
@ 2017-06-26 6:52 ` Michel Dänzer
[not found] ` <1498457550-27605-1-git-send-email-Flora.Cui-5C7GfCeVMHo@public.gmane.org>
1 sibling, 0 replies; 8+ messages in thread
From: Michel Dänzer @ 2017-06-26 6:52 UTC (permalink / raw)
To: Flora Cui; +Cc: dri-devel, amd-gfx
On 26/06/17 03:12 PM, Flora Cui wrote:
> keep cu_ao_mask unchanged for backward compatibility.
>
> Change-Id: I9f497aadd309977468e246fea333b392c0150276
> Signed-off-by: Flora Cui <Flora.Cui@amd.com>
> ---
> This patch should be landed after the kmd patch upsteam. right?
Right. Also, include/drm/amdgpu_drm.h should be updated in a separate
patch, see include/drm/README (in particular the "When and how to
update these files").
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH libdrm] amdgpu: update the exported always on CU bitmap
[not found] ` <1498457550-27605-1-git-send-email-Flora.Cui-5C7GfCeVMHo@public.gmane.org>
@ 2017-06-26 7:15 ` Christian König
0 siblings, 0 replies; 8+ messages in thread
From: Christian König @ 2017-06-26 7:15 UTC (permalink / raw)
To: Flora Cui, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Am 26.06.2017 um 08:12 schrieb Flora Cui:
> keep cu_ao_mask unchanged for backward compatibility.
>
> Change-Id: I9f497aadd309977468e246fea333b392c0150276
> Signed-off-by: Flora Cui <Flora.Cui@amd.com>
> ---
> This patch should be landed after the kmd patch upsteam. right?
In general yes, but this patch is a NAK as well.
> 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];
You can't change the amdgpu_gpu_info structure here for the same reasons
you can't change the kernel interface.
Even worse in oposite to the kernel interface this structure isn't
versionized, so you can't change it at all.
I suggest that we deprecate amdgpu_gpu_info and clients just call the
appropriate info query directly.
Regards,
Christian.
> /* 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 {
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-06-26 7:15 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1497946521-21500-1-git-send-email-Flora.Cui@amd.com>
[not found] ` <1497946521-21500-1-git-send-email-Flora.Cui-5C7GfCeVMHo@public.gmane.org>
2017-06-20 9:04 ` [PATCH libdrm] amdgpu: update always on cu bitmap Flora Cui
[not found] ` <1497949479-22146-1-git-send-email-Flora.Cui-5C7GfCeVMHo@public.gmane.org>
2017-06-20 9:49 ` Christian König
[not found] ` <75494a7b-0ee1-b8e4-9b5e-a82bfeb0d1bb-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-06-20 10:13 ` Daniel Vetter
2017-06-21 2:13 ` Flora Cui
2017-06-21 7:08 ` Daniel Vetter
2017-06-26 6:12 ` [PATCH libdrm] amdgpu: update the exported always on CU bitmap Flora Cui
2017-06-26 6:52 ` Michel Dänzer
[not found] ` <1498457550-27605-1-git-send-email-Flora.Cui-5C7GfCeVMHo@public.gmane.org>
2017-06-26 7:15 ` Christian König
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox