[PATCH 1/2] drm/amdgpu: use zero as start for dummy resource walks

Christian König ckoenig.leichtzumerken at gmail.com
Wed Mar 24 07:40:23 UTC 2021


Am 24.03.21 um 04:26 schrieb Pan, Xinhui:
> [AMD Official Use Only - Internal Distribution Only]
>
> I don’t think so. Start is offset here. We get the valid physical address from pages_addr[offset] when we update mapping.

Good point, mhm need to take an even closer look at this then.

> Btw, what issue we are seeing?

We see a BUG_ON() backtrace when this is used together with PRT mapping 
in OpenGL and Vulkan because the offset is just nonsense in this case.

Thanks for pointing our the issue,
Christian.

>
> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Christian K?nig
> Sent: 2021年3月23日 22:55
> To: amd-gfx at lists.freedesktop.org
> Cc: Das, Nirmoy <Nirmoy.Das at amd.com>; Chen, Guchun <Guchun.Chen at amd.com>
> Subject: [PATCH 1/2] drm/amdgpu: use zero as start for dummy resource walks
>
> When we don't have a physically backing store we should use zero instead of the virtual start address since that isn't necessary a valid physical one.
>
> Signed-off-by: Christian König <christian.koenig at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h
> index 40f2adf305bc..e94362ccf9d5 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h
> @@ -54,7 +54,7 @@ static inline void amdgpu_res_first(struct ttm_resource *res,
>   struct drm_mm_node *node;
>
>   if (!res || !res->mm_node) {
> -cur->start = start;
> +cur->start = 0;
>   cur->size = size;
>   cur->remaining = size;
>   cur->node = NULL;
> --
> 2.25.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Cxinhui.pan%40amd.com%7C031c743bd7c448e8d91508d8ee0ba402%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637521081053105295%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=lrJ6k3QBXqM9G6GRK25frFlqANkbfR4kAv6A3%2F8myBc%3D&reserved=0



More information about the amd-gfx mailing list