<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:10pt;color:#008000;margin:15pt;" align="Left">
[Public]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Tom St Denis <tom.stdenis@amd.com><br>
<b>Sent:</b> Thursday, February 17, 2022 9:41 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> StDenis, Tom <Tom.StDenis@amd.com><br>
<b>Subject:</b> [PATCH] drm/amd/amdgpu: Add APU flag to gca_config debugfs data (v3)</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Needed by umr to detect if ip discovered ASIC is an APU or not.<br>
<br>
(v2): Remove asic type from packet it's not strictly needed<br>
(v3): Correct comment<br>
<br>
Signed-off-by: Tom St Denis <tom.stdenis@amd.com><br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 5 ++++-<br>
1 file changed, 4 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c<br>
index 4b950de9bf66..db8a8710333e 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c<br>
@@ -728,7 +728,7 @@ static ssize_t amdgpu_debugfs_gca_config_read(struct file *f, char __user *buf,<br>
return -ENOMEM;<br>
<br>
/* version, increment each time something is added */<br>
- config[no_regs++] = 3;<br>
+ config[no_regs++] = 4;<br>
config[no_regs++] = adev->gfx.config.max_shader_engines;<br>
config[no_regs++] = adev->gfx.config.max_tile_pipes;<br>
config[no_regs++] = adev->gfx.config.max_cu_per_sh;<br>
@@ -768,6 +768,9 @@ static ssize_t amdgpu_debugfs_gca_config_read(struct file *f, char __user *buf,<br>
config[no_regs++] = adev->pdev->subsystem_device;<br>
config[no_regs++] = adev->pdev->subsystem_vendor;<br>
<br>
+ /* rev==4 APU flag */<br>
+ config[no_regs++] = adev->flags & AMD_IS_APU ? 1 : 0;<br>
+<br>
while (size && (*pos < no_regs * 4)) {<br>
uint32_t value;<br>
<br>
-- <br>
2.32.0<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>