Skip to contentSkip to conversation

drm/amd/amdgpu: Update debugfs GCA data

PATCH In review Tom St Denis 2 participants 2 messages Apr 8, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/amdgpu: Update debugfs GCA data

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.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +4 -3
index 1db48dc58ae9..13e4d8f9b874 100644
@@ -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)) {
Signature · 1 line
2.32.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · 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.

Maybe add a comment explaining why we jumped to 5. Either way:

Quoted 39 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +4 -4
index 1db48dc58ae9..13e4d8f9b874 100644
@@ -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