a3efd13a2f
Users can import device memory without specifying the target node. DMA buf imports return a Thunk handle that's not useful for gpu mapping calls. Fix this by using the import node information to re-import and map with the correct target GPU. Also fix IPC detach calls by deregistering the Thunk handle import immediately during attach instead of failing to do it later on detach since Thunk handles aren't placed into ROCr allocation map. Finally refactor the IPC attach function for cleaner logic flow. Change-Id: Ib2bf178110b2be98bd6917c765f724e4e613f5f2