Commit d3300991 authored by Christian König's avatar Christian König

drm/nouveau: fix dma_address check for CPU/GPU sync

AGP for example doesn't have a dma_address array.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210614110517.1624-1-christian.koenig@amd.com
parent 6fd8f323
...@@ -546,7 +546,7 @@ nouveau_bo_sync_for_device(struct nouveau_bo *nvbo) ...@@ -546,7 +546,7 @@ nouveau_bo_sync_for_device(struct nouveau_bo *nvbo)
struct ttm_tt *ttm_dma = (struct ttm_tt *)nvbo->bo.ttm; struct ttm_tt *ttm_dma = (struct ttm_tt *)nvbo->bo.ttm;
int i, j; int i, j;
if (!ttm_dma) if (!ttm_dma || !ttm_dma->dma_address)
return; return;
if (!ttm_dma->pages) { if (!ttm_dma->pages) {
NV_DEBUG(drm, "ttm_dma 0x%p: pages NULL\n", ttm_dma); 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) ...@@ -582,7 +582,7 @@ nouveau_bo_sync_for_cpu(struct nouveau_bo *nvbo)
struct ttm_tt *ttm_dma = (struct ttm_tt *)nvbo->bo.ttm; struct ttm_tt *ttm_dma = (struct ttm_tt *)nvbo->bo.ttm;
int i, j; int i, j;
if (!ttm_dma) if (!ttm_dma || !ttm_dma->dma_address)
return; return;
if (!ttm_dma->pages) { if (!ttm_dma->pages) {
NV_DEBUG(drm, "ttm_dma 0x%p: pages NULL\n", ttm_dma); NV_DEBUG(drm, "ttm_dma 0x%p: pages NULL\n", ttm_dma);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment