All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amd/amdgpu: Update debugfs GCA data
@ 2022-04-08 13:21 Tom St Denis
  2022-04-08 14:55 ` Alex Deucher
  0 siblings, 1 reply; 2+ messages in thread
From: Tom St Denis @ 2022-04-08 13:21 UTC (permalink / raw)
  To: amd-gfx; +Cc: Tom St Denis

The revision was not changed to 5 from 4.  Also since
this was missed I took the opportunity to add future
upper 64-bits of PG flags as well so we don't need to
bump it again when that comes.

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
index 1db48dc58ae9..13e4d8f9b874 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
@@ -730,7 +730,7 @@ static ssize_t amdgpu_debugfs_gca_config_read(struct file *f, char __user *buf,
 		return -ENOMEM;
 
 	/* version, increment each time something is added */
-	config[no_regs++] = 4;
+	config[no_regs++] = 5;
 	config[no_regs++] = adev->gfx.config.max_shader_engines;
 	config[no_regs++] = adev->gfx.config.max_tile_pipes;
 	config[no_regs++] = adev->gfx.config.max_cu_per_sh;
@@ -757,7 +757,7 @@ static ssize_t amdgpu_debugfs_gca_config_read(struct file *f, char __user *buf,
 
 	/* rev==1 */
 	config[no_regs++] = adev->rev_id;
-	config[no_regs++] = adev->pg_flags;
+	config[no_regs++] = lower_32_bits(adev->pg_flags);
 	config[no_regs++] = lower_32_bits(adev->cg_flags);
 
 	/* rev==2 */
@@ -773,7 +773,8 @@ static ssize_t amdgpu_debugfs_gca_config_read(struct file *f, char __user *buf,
 	/* rev==4 APU flag */
 	config[no_regs++] = adev->flags & AMD_IS_APU ? 1 : 0;
 
-	/* rev==5 CG flag upper 32bit */
+	/* rev==5 PG/CG flag upper 32bit */
+	config[no_regs++] = upper_32_bits(adev->pg_flags);
 	config[no_regs++] = upper_32_bits(adev->cg_flags);
 
 	while (size && (*pos < no_regs * 4)) {
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/amd/amdgpu: Update debugfs GCA data
  2022-04-08 13:21 [PATCH] drm/amd/amdgpu: Update debugfs GCA data Tom St Denis
@ 2022-04-08 14:55 ` Alex Deucher
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2022-04-08 14:55 UTC (permalink / raw)
  To: Tom St Denis; +Cc: amd-gfx list

On Fri, Apr 8, 2022 at 9:21 AM Tom St Denis <tom.stdenis@amd.com> wrote:
>
> The revision was not changed to 5 from 4.  Also since
> this was missed I took the opportunity to add future
> upper 64-bits of PG flags as well so we don't need to
> bump it again when that comes.
>
> Signed-off-by: Tom St Denis <tom.stdenis@amd.com>

Maybe add a comment explaining why we jumped to 5.  Either way:
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> index 1db48dc58ae9..13e4d8f9b874 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> @@ -730,7 +730,7 @@ static ssize_t amdgpu_debugfs_gca_config_read(struct file *f, char __user *buf,
>                 return -ENOMEM;
>
>         /* version, increment each time something is added */
> -       config[no_regs++] = 4;
> +       config[no_regs++] = 5;
>         config[no_regs++] = adev->gfx.config.max_shader_engines;
>         config[no_regs++] = adev->gfx.config.max_tile_pipes;
>         config[no_regs++] = adev->gfx.config.max_cu_per_sh;
> @@ -757,7 +757,7 @@ static ssize_t amdgpu_debugfs_gca_config_read(struct file *f, char __user *buf,
>
>         /* rev==1 */
>         config[no_regs++] = adev->rev_id;
> -       config[no_regs++] = adev->pg_flags;
> +       config[no_regs++] = lower_32_bits(adev->pg_flags);
>         config[no_regs++] = lower_32_bits(adev->cg_flags);
>
>         /* rev==2 */
> @@ -773,7 +773,8 @@ static ssize_t amdgpu_debugfs_gca_config_read(struct file *f, char __user *buf,
>         /* rev==4 APU flag */
>         config[no_regs++] = adev->flags & AMD_IS_APU ? 1 : 0;
>
> -       /* rev==5 CG flag upper 32bit */
> +       /* rev==5 PG/CG flag upper 32bit */
> +       config[no_regs++] = upper_32_bits(adev->pg_flags);
>         config[no_regs++] = upper_32_bits(adev->cg_flags);
>
>         while (size && (*pos < no_regs * 4)) {
> --
> 2.32.0
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-08 14:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-08 13:21 [PATCH] drm/amd/amdgpu: Update debugfs GCA data Tom St Denis
2022-04-08 14:55 ` Alex Deucher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.