<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<div>I'm not sue if it's properly, and have no strong opinion, Alex or others can have a look.<br>
<br>
<p dir="ltr" style="display:inline"><span style="color:#888888"><span style="font-size:0.81em">发自坚果 Pro</span></span></p>
<style type="text/css">
<!--
* body
{padding:0 16px 30px!important;
margin:0!important;
background-color:#ffffff;
line-height:1.4;
word-wrap:break-word;
word-break:normal}
div
{word-wrap:break-word;
word-break:normal}
p
{word-wrap:break-word;
word-break:normal;
text-indent:0pt!important}
span
{word-wrap:break-word;
word-break:normal}
a
{word-wrap:break-word;
word-break:normal}
td
{word-wrap:break-word;
word-break:break-all}
-->
</style>
<div class="x_quote">
<div style="margin:0 0px; font-size:105%"><font color="#629140" style="line-height:1.4"><span>Christian K鰊ig <ckoenig.leichtzumerken@gmail.com> 于 2017年11月2日 下午8:19写道:</span></font></div>
<br type="attribution">
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Ping? Any objects or can I push this?<br>
<br>
Asking because the next patch is desperately needed upstream.<br>
<br>
Christian.<br>
<br>
Am 27.10.2017 um 16:43 schrieb Christian König:<br>
> From: Christian König <christian.koenig@amd.com><br>
><br>
> We actually don't bind here, but rather allocate GART space if necessary.<br>
><br>
> Signed-off-by: Christian König <christian.koenig@amd.com><br>
> ---<br>
> drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++--<br>
> drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +-<br>
> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 ++--<br>
> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 2 +-<br>
> 4 files changed, 6 insertions(+), 6 deletions(-)<br>
><br>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c<br>
> index 67fb15f..354c874 100644<br>
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c<br>
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c<br>
> @@ -681,7 +681,7 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p,<br>
> if (!r && p->uf_entry.robj) {<br>
> struct amdgpu_bo *uf = p->uf_entry.robj;<br>
> <br>
> - r = amdgpu_ttm_bind(&uf->tbo);<br>
> + r = amdgpu_ttm_alloc_gart(&uf->tbo);<br>
> p->job->uf_addr += amdgpu_bo_gpu_offset(uf);<br>
> }<br>
> <br>
> @@ -1596,5 +1596,5 @@ int amdgpu_cs_find_mapping(struct amdgpu_cs_parser *parser,<br>
> return r;<br>
> }<br>
> <br>
> - return amdgpu_ttm_bind(&(*bo)->tbo);<br>
> + return amdgpu_ttm_alloc_gart(&(*bo)->tbo);<br>
> }<br>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c<br>
> index e44b880..7d03398 100644<br>
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c<br>
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c<br>
> @@ -688,7 +688,7 @@ int amdgpu_bo_pin_restricted(struct amdgpu_bo *bo, u32 domain,<br>
> goto error;<br>
> }<br>
> <br>
> - r = amdgpu_ttm_bind(&bo->tbo);<br>
> + r = amdgpu_ttm_alloc_gart(&bo->tbo);<br>
> if (unlikely(r)) {<br>
> dev_err(adev->dev, "%p bind failed\n", bo);<br>
> goto error;<br>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c<br>
> index c7ccd6f..eead348 100644<br>
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c<br>
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c<br>
> @@ -875,7 +875,7 @@ static int amdgpu_ttm_backend_bind(struct ttm_tt *ttm,<br>
> return r;<br>
> }<br>
> <br>
> -int amdgpu_ttm_bind(struct ttm_buffer_object *bo)<br>
> +int amdgpu_ttm_alloc_gart(struct ttm_buffer_object *bo)<br>
> {<br>
> struct amdgpu_device *adev = amdgpu_ttm_adev(bo->bdev);<br>
> struct ttm_mem_reg tmp;<br>
> @@ -1605,7 +1605,7 @@ int amdgpu_fill_buffer(struct amdgpu_bo *bo,<br>
> }<br>
> <br>
> if (bo->tbo.mem.mem_type == TTM_PL_TT) {<br>
> - r = amdgpu_ttm_bind(&bo->tbo);<br>
> + r = amdgpu_ttm_alloc_gart(&bo->tbo);<br>
> if (r)<br>
> return r;<br>
> }<br>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h<br>
> index d2985de..4f9433e 100644<br>
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h<br>
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h<br>
> @@ -91,7 +91,7 @@ int amdgpu_fill_buffer(struct amdgpu_bo *bo,<br>
> struct dma_fence **fence);<br>
> <br>
> int amdgpu_mmap(struct file *filp, struct vm_area_struct *vma);<br>
> -int amdgpu_ttm_bind(struct ttm_buffer_object *bo);<br>
> +int amdgpu_ttm_alloc_gart(struct ttm_buffer_object *bo);<br>
> int amdgpu_ttm_recover_gart(struct ttm_buffer_object *tbo);<br>
> <br>
> int amdgpu_ttm_tt_get_user_pages(struct ttm_tt *ttm, struct page **pages);<br>
<br>
<br>
</div>
</span></font>
</body>
</html>