Skip to content

Commit 21ec425

Browse files
committed
nouveau: fw: sync dma after setup is called.
When this code moved to non-coherent allocator the sync was put too early for some firmwares which called the setup function, move the sync down after the setup function. Reported-by: Diogo Ivo <[email protected]> Tested-by: Diogo Ivo <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Fixes: 9b340ae ("nouveau/firmware: use dma non-coherent allocator") Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 3387e04 commit 21ec425

File tree

1 file changed

+6
-5
lines changed
  • drivers/gpu/drm/nouveau/nvkm/falcon

1 file changed

+6
-5
lines changed

drivers/gpu/drm/nouveau/nvkm/falcon/fw.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,6 @@ nvkm_falcon_fw_boot(struct nvkm_falcon_fw *fw, struct nvkm_subdev *user,
8989
nvkm_falcon_fw_dtor_sigs(fw);
9090
}
9191

92-
/* after last write to the img, sync dma mappings */
93-
dma_sync_single_for_device(fw->fw.device->dev,
94-
fw->fw.phys,
95-
sg_dma_len(&fw->fw.mem.sgl),
96-
DMA_TO_DEVICE);
9792

9893
FLCNFW_DBG(fw, "resetting");
9994
fw->func->reset(fw);
@@ -105,6 +100,12 @@ nvkm_falcon_fw_boot(struct nvkm_falcon_fw *fw, struct nvkm_subdev *user,
105100
goto done;
106101
}
107102

103+
/* after last write to the img, sync dma mappings */
104+
dma_sync_single_for_device(fw->fw.device->dev,
105+
fw->fw.phys,
106+
sg_dma_len(&fw->fw.mem.sgl),
107+
DMA_TO_DEVICE);
108+
108109
ret = fw->func->load(fw);
109110
if (ret)
110111
goto done;

0 commit comments

Comments
 (0)