dev-amdgpu: Add SDMA device translation helper

Adding a helper function to remove duplicate code in the copy packet
methods. Adds more comments on that code to explain what it is doing.
This could in theory also be used in other packets in the future.

Change-Id: Id0ed50c87260a2f12f53cb14e927f8c49bb99072
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62718
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2 files changed