Skip to content

Commit 0c8df34

Browse files
ChristianKoenigAMDalexdeucher
authored andcommitted
drm/radeon: use the dummy page for GART if needed
Imported BOs don't have a pagelist any more. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Fixes: 0575ff3 ("drm/radeon: stop using pages with drm_prime_sg_to_page_addr_arrays v2") CC: stable@vger.kernel.org # 5.12
1 parent 84c63d0 commit 0c8df34

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/gpu/drm/radeon/radeon_gart.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,8 @@ int radeon_gart_bind(struct radeon_device *rdev, unsigned offset,
301301
p = t / (PAGE_SIZE / RADEON_GPU_PAGE_SIZE);
302302

303303
for (i = 0; i < pages; i++, p++) {
304-
rdev->gart.pages[p] = pagelist[i];
304+
rdev->gart.pages[p] = pagelist ? pagelist[i] :
305+
rdev->dummy_page.page;
305306
page_base = dma_addr[i];
306307
for (j = 0; j < (PAGE_SIZE / RADEON_GPU_PAGE_SIZE); j++, t++) {
307308
page_entry = radeon_gart_get_page_entry(page_base, flags);

0 commit comments

Comments
 (0)