<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<p style="font-family:Arial;font-size:10pt;color:#0000FF;margin:5pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Left">
[AMD Official Use Only - General]<br>
</p>
<br>
<div>
<div>
<div dir="ltr">Ping</div>
</div>
<div id="ms-outlook-mobile-signature">
<div><br>
</div>
Get <a href="https://aka.ms/o0ukef">Outlook for iOS</a></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> Liu, Shaoyun <Shaoyun.Liu@amd.com><br>
<b>Sent:</b> Friday, March 22, 2024 12:49:56 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Liu, Shaoyun <Shaoyun.Liu@amd.com><br>
<b>Subject:</b> [PATCH] drm/amdgpu : Increase the mes log buffer size as per new MES FW version</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">From MES version 0x54, the log entry increased and require the log buffer<br>
size to be increased. The 16k is maximum size agreed<br>
<br>
Signed-off-by: shaoyunl <shaoyun.liu@amd.com><br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 5 ++---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 1 +<br>
2 files changed, 3 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c<br>
index 9ace848e174c..78e4f88f5134 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c<br>
@@ -103,7 +103,7 @@ static int amdgpu_mes_event_log_init(struct amdgpu_device *adev)<br>
if (!amdgpu_mes_log_enable)<br>
return 0;<br>
<br>
- r = amdgpu_bo_create_kernel(adev, PAGE_SIZE, PAGE_SIZE,<br>
+ r = amdgpu_bo_create_kernel(adev, AMDGPU_MES_LOG_BUFFER_SIZE, PAGE_SIZE,<br>
AMDGPU_GEM_DOMAIN_GTT,<br>
&adev->mes.event_log_gpu_obj,<br>
&adev->mes.event_log_gpu_addr,<br>
@@ -1548,12 +1548,11 @@ static int amdgpu_debugfs_mes_event_log_show(struct seq_file *m, void *unused)<br>
uint32_t *mem = (uint32_t *)(adev->mes.event_log_cpu_addr);<br>
<br>
seq_hex_dump(m, "", DUMP_PREFIX_OFFSET, 32, 4,<br>
- mem, PAGE_SIZE, false);<br>
+ mem, AMDGPU_MES_LOG_BUFFER_SIZE, false);<br>
<br>
return 0;<br>
}<br>
<br>
-<br>
DEFINE_SHOW_ATTRIBUTE(amdgpu_debugfs_mes_event_log);<br>
<br>
#endif<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h<br>
index 7d4f93fea937..4c8fc3117ef8 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h<br>
@@ -52,6 +52,7 @@ enum amdgpu_mes_priority_level {<br>
<br>
#define AMDGPU_MES_PROC_CTX_SIZE 0x1000 /* one page area */<br>
#define AMDGPU_MES_GANG_CTX_SIZE 0x1000 /* one page area */<br>
+#define AMDGPU_MES_LOG_BUFFER_SIZE 0x4000 /* Maximu log buffer size for MES */<br>
<br>
struct amdgpu_mes_funcs;<br>
<br>
-- <br>
2.34.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>