All of lore.kernel.org
 help / color / mirror / Atom feed
* [Nouveau] [PATCH] drm/nouveau: fix dma_address check for CPU/GPU sync
@ 2021-06-14 11:05 ` Christian König
  0 siblings, 0 replies; 8+ messages in thread
From: Christian König @ 2021-06-14 11:05 UTC (permalink / raw)
  To: linux, bskeggs, dri-devel, nouveau

AGP for example doesn't have a dma_address array.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/nouveau/nouveau_bo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 3e09df0472ce..170aba99a110 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -546,7 +546,7 @@ nouveau_bo_sync_for_device(struct nouveau_bo *nvbo)
 	struct ttm_tt *ttm_dma = (struct ttm_tt *)nvbo->bo.ttm;
 	int i, j;
 
-	if (!ttm_dma)
+	if (!ttm_dma || !ttm_dma->dma_address)
 		return;
 	if (!ttm_dma->pages) {
 		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)
 	struct ttm_tt *ttm_dma = (struct ttm_tt *)nvbo->bo.ttm;
 	int i, j;
 
-	if (!ttm_dma)
+	if (!ttm_dma || !ttm_dma->dma_address)
 		return;
 	if (!ttm_dma->pages) {
 		NV_DEBUG(drm, "ttm_dma 0x%p: pages NULL\n", ttm_dma);
-- 
2.25.1

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-06-22 13:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-14 11:05 [Nouveau] [PATCH] drm/nouveau: fix dma_address check for CPU/GPU sync Christian König
2021-06-14 11:05 ` Christian König
2021-06-14 16:40 ` [Nouveau] " Ondrej Zary
2021-06-14 16:40   ` Ondrej Zary
2021-06-22  9:32 ` [Nouveau] " Christian König
2021-06-22  9:32   ` Christian König
2021-06-22 13:27   ` [Nouveau] " Alex Deucher
2021-06-22 13:27     ` Alex Deucher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.