Skip to content

Commit d330099

Browse files
drm/nouveau: fix dma_address check for CPU/GPU sync
AGP for example doesn't have a dma_address array. Signed-off-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 6fd8f32 commit d330099

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/nouveau/nouveau_bo.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ nouveau_bo_sync_for_device(struct nouveau_bo *nvbo)
546546
struct ttm_tt *ttm_dma = (struct ttm_tt *)nvbo->bo.ttm;
547547
int i, j;
548548

549-
if (!ttm_dma)
549+
if (!ttm_dma || !ttm_dma->dma_address)
550550
return;
551551
if (!ttm_dma->pages) {
552552
NV_DEBUG(drm, "ttm_dma 0x%p: pages NULL\n", ttm_dma);
@@ -582,7 +582,7 @@ nouveau_bo_sync_for_cpu(struct nouveau_bo *nvbo)
582582
struct ttm_tt *ttm_dma = (struct ttm_tt *)nvbo->bo.ttm;
583583
int i, j;
584584

585-
if (!ttm_dma)
585+
if (!ttm_dma || !ttm_dma->dma_address)
586586
return;
587587
if (!ttm_dma->pages) {
588588
NV_DEBUG(drm, "ttm_dma 0x%p: pages NULL\n", ttm_dma);

0 commit comments

Comments
 (0)