Re: [PATCH] nouveau/firmware: using dma non-coherent interfaces for fw loading. (v2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 16 Aug 2024 at 06:45, Timur Tabi <ttabi@xxxxxxxxxx> wrote:
>
> On Fri, 2024-08-16 at 06:19 +1000, Dave Airlie wrote:
> > Fix this by using the non-coherent allocator instead, I think there
> > might be a better answer to this, but it involve ripping up some of
> > APIs using sg lists.
>
> Thanks for fixing this, but what is the relationshio between non-coherent
> DMA and sg_set_buf()?   You're still calling sg_init_one() and hitting this
> check:
>
> #ifdef CONFIG_DEBUG_SG
>         BUG_ON(!virt_addr_valid(buf));
> #endif
>
> Does a non-coherent DMA buffer have a different kind of virtual address than
> a coherent DMA buffer?

Yes, it has one that doesn't explode in the check.

We should not be stuffing mapped dma_addr into sg tables at all,
fixing that is a bit messier.

Dave.



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux