gpu: host1x: Generalize host1x_cdma_push_wide()
authorMikko Perttunen <mperttunen@nvidia.com>
Fri, 8 Jul 2022 15:18:02 +0000 (18:18 +0300)
committerThierry Reding <treding@nvidia.com>
Fri, 8 Jul 2022 15:36:26 +0000 (17:36 +0200)
commit8c92243d9e68a93dd282fa2151b67b5c0e31e957
tree58569e3cd9e609c259ea50c00059c58b4431a206
parent5b7239c17ce29b4ffea90a5731d56bd8a3893960
gpu: host1x: Generalize host1x_cdma_push_wide()

host1x_cdma_push_wide() had the assumptions that the last parameter word
was a NOP opcode, and that NOP opcodes could be used in all situations.

Neither are true with the new job opcode sequence, so adjust the
function to not have these assumptions, and instead place an early
RESTART opcode when necessary to jump back to the beginning of the
pushbuffer.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/host1x/cdma.c