<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;" align="Left">
[AMD Official Use Only]<br>
</p>
<br>
<div>
<div dir="auto" style="direction: ltr; margin: 0px; padding: 0px; font-family: sans-serif; font-size: 11pt; color: black; text-align: left;">
Why? just to evict some inactive vram BOs?</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> Koenig, Christian <Christian.Koenig@amd.com><br>
<b>Sent:</b> Friday, September 17, 2021 3:06:16 PM<br>
<b>To:</b> Pan, Xinhui <Xinhui.Pan@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Deucher, Alexander <Alexander.Deucher@amd.com><br>
<b>Subject:</b> Re: [PATCH] drm/amdgpu: Let BO created in its allowed_domain</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Am 17.09.21 um 09:04 schrieb xinhui pan:<br>
> For any user BO, it is allowed to alloc memory in both GTT and VRAM<br>
> domain. That means one VRAM BO could be eviced to GTT.<br>
><br>
> Now if device is already lack of VRAM, this BO could alloc memory from<br>
> GTT directly without evicting other VRAM BO. In this way we can reduce<br>
> memory evictions.<br>
<br>
NAK, that is intentional pressure on VRAM during allocation of new memory.<br>
<br>
Christian.<br>
<br>
><br>
> Signed-off-by: xinhui pan <xinhui.pan@amd.com><br>
> ---<br>
> drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +-<br>
> 1 file changed, 1 insertion(+), 1 deletion(-)<br>
><br>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c<br>
> index 66bb8a53bb20..9a547bb38cda 100644<br>
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c<br>
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c<br>
> @@ -579,7 +579,7 @@ int amdgpu_bo_create(struct amdgpu_device *adev,<br>
> AMDGPU_GEM_DOMAIN_GDS))<br>
> amdgpu_bo_placement_from_domain(bo, AMDGPU_GEM_DOMAIN_CPU);<br>
> else<br>
> - amdgpu_bo_placement_from_domain(bo, bp->domain);<br>
> + amdgpu_bo_placement_from_domain(bo, bo->allowed_domains);<br>
> if (bp->type == ttm_bo_type_kernel)<br>
> bo->tbo.priority = 1;<br>
> <br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>