[PATCH 1/2] drm/nouveau/firmware: Fix SG_DEBUG error with nvkm_firmware_ctor()

Timur Tabi ttabi at nvidia.com
Sun Apr 28 18:19:55 UTC 2024


On Sun, 2024-04-28 at 11:52 -0400, Lyude Paul wrote:
> But we can't get a page pointer from an allocation made by
> dma_alloc_coherent() - but we can from vmalloc(). I'll fix the patch
> explanation in the next version, I have to send out another version
> anyhow since I realized that patch #2 still needs one more check to
> work properly

Glad my confusion was helpful!  You wouldn't happent to know why this
statement is true?

	DMA allocations can never be turned back into a page pointer

I'm guessing DMA allocations are taken from some memory pool that isn't
tracked using page pointers, but I don't understand why.  It seems weird that
you can have a virtual address to the buffer, therefore it is surely mapped on
a page-by-page basis, so why are there no page pointers?



More information about the dri-devel mailing list