[RFC HACKY] ttm don't allow multihop moves

Dave Airlie airlied at gmail.com
Tue Oct 20 04:16:05 UTC 2020


This is an RFC for a hacky idea I had to at least move the converation forward.

The branch with this in it is:
https://github.com/airlied/linux/tree/ttm-bounce

it won't apply to any other tree as it's based on all those patches I posted and some other refactorings.

The basic idea is if the driver gets a move request from the TTM core that requires it to bounce the buffer
through another domain, it returns -EMULTIHOP and puts the domain details into the mem_type, the core
code then just does the mem space for the new temp placment, and retries the final placement again.

I've tested on nouveau that the code gets executed (a printk prints at least), and it all doesn't burn
down, but it's very lightly tested.

It does allow getting rid of a lot of driver code to handle bouncing moves.

I'm sure this could be prettier or done in a very different way more effectively, but hey this was
my chance to misuse an errno value.

Dave.




More information about the dri-devel mailing list