On 18/08/16 04:41 PM, Christian König wrote: >> Afaiu the prime importing display gpu generates its own gem buffer >> handle (prime_fd_to_handle) from that dmabuf, importing scather-gather >> tables to access the dmabuf in system ram. As far as page flipping is >> concerned, so far those gem buffers / radeon_bo's aren't treated any >> different than native ones. During pageflip setup they get pinned into >> VRAM, which moves (=copies) their content from the RAM dmabuf backing >> store into VRAM. > > Your understanding isn't correct. Buffers imported using prime always > stay in GTT, they can't be moved to VRAM.
That's the theory, but based on Mario's description it's clear that there is at least one bug which either actually allows a shared buffer to be moved to VRAM, or at least doesn't propagate the error correctly, so the page flip operation "succeeds". > It's the DDX which copies the buffer content from the imported prime > handle into a native on which is enabled to scan out. There is no such code which could explain what Mario is seeing. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer