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

Christian König ckoenig.leichtzumerken at gmail.com
Tue Mar 23 14:54:57 UTC 2021


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



More information about the amd-gfx mailing list