<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=iso-8859-2">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:SimSun;
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:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:"\@SimSun";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;
color:black;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;
color:black;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
color:black;}
span.xm-3838486020630618689hoenzb
{mso-style-name:x_m_-3838486020630618689hoenzb;}
span.xm-3838486020630618689m8572536124089128592m4947926278827078055hoenzb
{mso-style-name:x_m_-3838486020630618689m_8572536124089128592m_4947926278827078055hoenzb;}
span.EmailStyle22
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#2F5496;}
span.EmailStyle23
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#2F5496;}
.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;}
/* List Definitions */
@list l0
{mso-list-id:1133061508;
mso-list-type:hybrid;
mso-list-template-ids:-1982298110 -203232636 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-start-at:0;
mso-level-number-format:bullet;
mso-level-text:\F0D8;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;
mso-fareast-font-family:SimSun;
mso-bidi-font-family:"Times New Roman";}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></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 bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2F5496">Also, the change here is only for display buffer, so it is not really a “big” waste.<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2F5496"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2F5496">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2F5496">Samuel Li<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2F5496"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext"> Li, Samuel
<br>
<b>Sent:</b> Tuesday, March 20, 2018 4:38 PM<br>
<b>To:</b> Deucher, Alexander <Alexander.Deucher@amd.com><br>
<b>Cc:</b> Alex Deucher <alexdeucher@gmail.com>; Michel Dänzer <michel@daenzer.net>; amd-gfx list <amd-gfx@lists.freedesktop.org>; Marek Ol¹ák <maraeo@gmail.com>; Koenig, Christian <Christian.Koenig@amd.com><br>
<b>Subject:</b> RE: [PATCH 1/2] drm/amdgpu: Enable scatter gather display support<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p style="margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="font-family:Wingdings"><span style="mso-list:Ignore">Ø<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span style="font-family:"Calibri",sans-serif">I think we can also have the case of systems with similar amounts of carve out and system ram. E.g., on a system with 4 GB of system memory with 1 GB carved out for vram. It would
be a big waste not to use VRAM. We'll probably need a heuristic at some point.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2F5496">Agreed. But for CZ/ST, due to hardware limitation as discussed before, we either use VRAM or GTT, not both. That might be changed for later ASICs, but it is beyond
the scope of this patch.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2F5496"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2F5496"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2F5496">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2F5496">Samuel Li<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2F5496"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext"> Koenig, Christian
<br>
<b>Sent:</b> Tuesday, March 20, 2018 4:17 PM<br>
<b>To:</b> Deucher, Alexander <<a href="mailto:Alexander.Deucher@amd.com">Alexander.Deucher@amd.com</a>>; Marek Ol¹ák <<a href="mailto:maraeo@gmail.com">maraeo@gmail.com</a>><br>
<b>Cc:</b> Alex Deucher <<a href="mailto:alexdeucher@gmail.com">alexdeucher@gmail.com</a>>; Michel Dänzer <<a href="mailto:michel@daenzer.net">michel@daenzer.net</a>>; Li, Samuel <<a href="mailto:Samuel.Li@amd.com">Samuel.Li@amd.com</a>>; amd-gfx list <<a href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a>><br>
<b>Subject:</b> Re: [PATCH 1/2] drm/amdgpu: Enable scatter gather display support<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">That's what I meant with use up the otherwise unused VRAM. I don't see any disadvantage of always setting GTT as second domain on APUs.<br>
<br>
My assumption was that we dropped this in userspace for displayable surfaces, but Marek proved that wrong.<br>
<br>
So what we should do is actually to add GTT as fallback to all BOs on APUs in Mesa and only make sure that the kernel is capable of handling GTT with optimal performance (e.g. have user huge pages etc..).<br>
<br>
Christian.<br>
<br>
Am 20.03.2018 um 21:04 schrieb Deucher, Alexander:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div id="divtagdefaultwrapper">
<p><span style="font-family:"Calibri",sans-serif">I think we can also have the case of systems with similar amounts of carve out and system ram. E.g., on a system with 4 GB of system memory with 1 GB carved out for vram. It would be a big waste not to use
VRAM. We'll probably need a heuristic at some point.<o:p></o:p></span></p>
<p><span style="font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p><span style="font-family:"Calibri",sans-serif">Alex<o:p></o:p></span></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Christian König
<a href="mailto:ckoenig.leichtzumerken@gmail.com"><ckoenig.leichtzumerken@gmail.com></a><br>
<b>Sent:</b> Tuesday, March 20, 2018 2:32:49 PM<br>
<b>To:</b> Marek Ol¹ák; Koenig, Christian<br>
<b>Cc:</b> Alex Deucher; Deucher, Alexander; Michel Dänzer; Li, Samuel; amd-gfx list<br>
<b>Subject:</b> Re: [PATCH 1/2] drm/amdgpu: Enable scatter gather display support</span>
<o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="background:white">I don't think that is a good idea.<br>
<br>
Ideally GTT should now have the same performance as VRAM on APUs and we should use VRAM only for things where we absolutely have to and to actually use up the otherwise unused VRAM.<br>
<br>
Can you run some tests with all BOs forced to GTT and see if there is any performance regression?<br>
<br>
Christian.<br>
<br>
Am 20.03.2018 um 15:51 schrieb Marek Ol¹ák:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<div>
<p class="MsoNormal" style="background:white">On Tue, Mar 20, 2018 at 9:55 AM, Christian König <<a href="mailto:ckoenig.leichtzumerken@gmail.com" target="_blank">ckoenig.leichtzumerken@gmail.com</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal" style="background:white">Yes, exactly. And if I remember correctly Mesa used to always set GTT as fallback on APUs, correct?<o:p></o:p></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal" style="background:white"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt;background:white">"used to" is the key part. Mesa doesn't force GTT on APUs anymore. It expects that the combination of BO priorities and BO move throttling will result in optimal BO placements over time.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white">Marek<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"> <o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal" style="background:white"><br>
The problem seems to be that this fallback isn't set for displayable BOs.<br>
<br>
So what needs to be done is to just enable this fallback for displayable BOs as well if the kernel can handle it.<span style="color:#888888"><br>
<br>
<span class="xm-3838486020630618689hoenzb">Christian.</span></span> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="background:white"><br>
<br>
Am 20.03.2018 um 00:01 schrieb Marek Ol¹ák:<o:p></o:p></p>
</div>
</div>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="background:white">In theory, Mesa doesn't have to do anything. It can continue setting VRAM and if the kernel has to put a display buffer into GTT, it doesn't matter (for Mesa). Whether the VRAM placement is really used is largely
determined by BO priorities.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white">The way I understand scather/gather is that it only allows the GTT placement. It doesn't force the GTT placement. Mesa also doesn't force the GTT placement.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white">Marek<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white">On Mon, Mar 19, 2018 at 5:12 PM, Alex Deucher <<a href="mailto:alexdeucher@gmail.com" target="_blank">alexdeucher@gmail.com</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<p class="MsoNormal" style="background:white">On Mon, Mar 19, 2018 at 4:29 PM, Li, Samuel <<a href="mailto:Samuel.Li@amd.com" target="_blank">Samuel.Li@amd.com</a>> wrote:<br>
>>to my earlier point, there may be cases where it is advantageous to put<br>
>> display buffers in vram even if s/g display is supported<br>
><br>
> Agreed. That is also why the patch has the options to let user select where<br>
> to put display buffers.<br>
><br>
> As whether to put the option in Mesa or kernel, it seems the difference is<br>
> not much. Also, since amdgpufb can request even without mesa, kernel might<br>
> be a better choice. In addition, putting in the kernel can save client’s<br>
> duplicate work(mesa, ogl, vulkan, 2d, kernel…)<br>
<br>
Why do we even expose different memory pools to the UMDs in the first<br>
place ;) Each pool has performance characteristics that may be<br>
relevant for a particular work load. Only the UMDs really know the<br>
finer points of those workloads. In general, you don't want the kernel<br>
dictating policy if you can avoid it. The kernel exposes<br>
functionality and userspace sets the policy. With the location set in<br>
userspace, each app/user can have whatever policy makes sense for<br>
their use case all at the same time without needing to tweak their<br>
kernel for every use case.<br>
<span style="color:#888888"><br>
<span class="xm-3838486020630618689m8572536124089128592m4947926278827078055hoenzb">Alex</span></span><o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt;background:white"><o:p> </o:p></p>
</div>
</div>
<pre style="background:white">_______________________________________________<o:p></o:p></pre>
<pre style="background:white">amd-gfx mailing list<o:p></o:p></pre>
<pre style="background:white"><a href="mailto:amd-gfx@lists.freedesktop.org" target="_blank">amd-gfx@lists.freedesktop.org</a><o:p></o:p></pre>
<pre style="background:white"><a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx" target="_blank">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal" style="background:white"><o:p> </o:p></p>
</div>
</blockquote>
</div>
<p class="MsoNormal" style="background:white"><o:p> </o:p></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt;background:white"><o:p> </o:p></p>
<pre style="background:white">_______________________________________________<o:p></o:p></pre>
<pre style="background:white">amd-gfx mailing list<o:p></o:p></pre>
<pre style="background:white"><a href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><o:p></o:p></pre>
<pre style="background:white"><a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal" style="background:white"><o:p> </o:p></p>
</div>
</blockquote>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</body>
</html>