<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:DengXian;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@DengXian";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<p style="font-family:Arial;font-size:10pt;color:#0000FF;margin:5pt;" align="Left">
[AMD Official Use Only - General]<br>
</p>
<br>
<div>
<div class="WordSection1">
<p class="MsoNormal">OK, thanks!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">-----------------<o:p></o:p></p>
<p class="MsoNormal">Best Regards,<o:p></o:p></p>
<p class="MsoNormal">Thomas<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Christian König <ckoenig.leichtzumerken@gmail.com>
<br>
<b>Sent:</b> Thursday, June 1, 2023 2:25 PM<br>
<b>To:</b> Paneer Selvam, Arunpravin <Arunpravin.PaneerSelvam@amd.com>; Chai, Thomas <YiPeng.Chai@amd.com>; amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Zhou1, Tao <Tao.Zhou1@amd.com>; Yang, Stanley <Stanley.Yang@amd.com>; Chai, Thomas <YiPeng.Chai@amd.com>; Li, Candice <Candice.Li@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>; Zhang, Hawking <Hawking.Zhang@amd.com><br>
<b>Subject:</b> Re: [PATCH] drm/amdgpu: change reserved vram info print<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">If you haven't already pushed it Reviewed-by: Christian König
<a href="mailto:christian.koenig@amd.com"><christian.koenig@amd.com></a> as well.<br>
<br>
You might want to add a CC: stable... tag so that it gets backported.<br>
<br>
Regards,<br>
Christian.<o:p></o:p></p>
<div>
<p class="MsoNormal">Am 01.06.23 um 08:13 schrieb Arunpravin Paneer Selvam:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p style="margin:0in">Reviewed-by: Arunpravin Paneer Selvam <<a href="mailto:Arunpravin.PaneerSelvam@amd.com">Arunpravin.PaneerSelvam@amd.com</a>><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On 5/25/2023 2:20 PM, YiPeng Chai wrote<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre>The link object of mgr->reserved_pages is the blocks<o:p></o:p></pre>
<pre>variable in struct amdgpu_vram_reservation, not the<o:p></o:p></pre>
<pre>link variable in struct drm_buddy_block.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Signed-off-by: YiPeng Chai <a href="mailto:YiPeng.Chai@amd.com"><YiPeng.Chai@amd.com></a><o:p></o:p></pre>
<pre>---<o:p></o:p></pre>
<pre> drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 7 ++++---<o:p></o:p></pre>
<pre> 1 file changed, 4 insertions(+), 3 deletions(-)<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c<o:p></o:p></pre>
<pre>index 89d35d194f2c..c7085a747b03 100644<o:p></o:p></pre>
<pre>--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c<o:p></o:p></pre>
<pre>+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c<o:p></o:p></pre>
<pre>@@ -839,7 +839,7 @@ static void amdgpu_vram_mgr_debug(struct ttm_resource_manager *man,<o:p></o:p></pre>
<pre> {<o:p></o:p></pre>
<pre>   struct amdgpu_vram_mgr *mgr = to_vram_mgr(man);<o:p></o:p></pre>
<pre>   struct drm_buddy *mm = &mgr->mm;<o:p></o:p></pre>
<pre>-  struct drm_buddy_block *block;<o:p></o:p></pre>
<pre>+  struct amdgpu_vram_reservation *rsv;<o:p></o:p></pre>
<pre> <o:p></o:p></pre>
<pre>   drm_printf(printer, "  vis usage:%llu\n",<o:p></o:p></pre>
<pre>              amdgpu_vram_mgr_vis_usage(mgr));<o:p></o:p></pre>
<pre>@@ -851,8 +851,9 @@ static void amdgpu_vram_mgr_debug(struct ttm_resource_manager *man,<o:p></o:p></pre>
<pre>   drm_buddy_print(mm, printer);<o:p></o:p></pre>
<pre> <o:p></o:p></pre>
<pre>   drm_printf(printer, "reserved:\n");<o:p></o:p></pre>
<pre>-  list_for_each_entry(block, &mgr->reserved_pages, link)<o:p></o:p></pre>
<pre>-     drm_buddy_block_print(mm, block, printer);<o:p></o:p></pre>
<pre>+  list_for_each_entry(rsv, &mgr->reserved_pages, blocks)<o:p></o:p></pre>
<pre>+          drm_printf(printer, "%#018llx-%#018llx: %llu\n",<o:p></o:p></pre>
<pre>+                  rsv->start, rsv->start + rsv->size, rsv->size);<o:p></o:p></pre>
<pre>   mutex_unlock(&mgr->lock);<o:p></o:p></pre>
<pre> }<o:p></o:p></pre>
<pre> <o:p></o:p></pre>
</blockquote>
<p class="MsoNormal"><o:p> </o:p></p>
</blockquote>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>