Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <diogo.ivo@tecnico.ulisboa.pt>
Tested-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Fixes: 9b340aeb26d5 ("nouveau/firmware: use dma non-coherent allocator")
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241114004603.3095485-1-airlied@gmail.com

+6 -5
+6 -5
drivers/gpu/drm/nouveau/nvkm/falcon/fw.c
··· 89 89 nvkm_falcon_fw_dtor_sigs(fw); 90 90 } 91 91 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); 97 92 98 93 FLCNFW_DBG(fw, "resetting"); 99 94 fw->func->reset(fw); ··· 99 104 if (ret) 100 105 goto done; 101 106 } 107 + 108 + /* after last write to the img, sync dma mappings */ 109 + dma_sync_single_for_device(fw->fw.device->dev, 110 + fw->fw.phys, 111 + sg_dma_len(&fw->fw.mem.sgl), 112 + DMA_TO_DEVICE); 102 113 103 114 ret = fw->func->load(fw); 104 115 if (ret)