mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 04:00:52 +07:00
drm/nouveau: fix dma_address check for CPU/GPU sync
[ Upstream commit d330099115597bbc238d6758a4930e72b49ea9ba ] AGP for example doesn't have a dma_address array. Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210614110517.1624-1-christian.koenig@amd.com Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
d191c3d6ad
commit
45ca6df5df
@ -590,7 +590,7 @@ nouveau_bo_sync_for_device(struct nouveau_bo *nvbo)
|
||||
struct ttm_dma_tt *ttm_dma = (struct ttm_dma_tt *)nvbo->bo.ttm;
|
||||
int i;
|
||||
|
||||
if (!ttm_dma)
|
||||
if (!ttm_dma || !ttm_dma->dma_address)
|
||||
return;
|
||||
|
||||
/* Don't waste time looping if the object is coherent */
|
||||
@ -610,7 +610,7 @@ nouveau_bo_sync_for_cpu(struct nouveau_bo *nvbo)
|
||||
struct ttm_dma_tt *ttm_dma = (struct ttm_dma_tt *)nvbo->bo.ttm;
|
||||
int i;
|
||||
|
||||
if (!ttm_dma)
|
||||
if (!ttm_dma || !ttm_dma->dma_address)
|
||||
return;
|
||||
|
||||
/* Don't waste time looping if the object is coherent */
|
||||
|
Loading…
Reference in New Issue
Block a user