18c2ecf20Sopenharmony_ci#ifndef __NVIF_PUSH507C_H__
28c2ecf20Sopenharmony_ci#define __NVIF_PUSH507C_H__
38c2ecf20Sopenharmony_ci#include <nvif/push.h>
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#include <nvhw/class/cl507c.h>
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci#define PUSH_HDR(p,m,c) do {                                                    \
88c2ecf20Sopenharmony_ci        PUSH_ASSERT(!((m) & ~DRF_SMASK(NV507C_DMA_METHOD_OFFSET)), "mthd");     \
98c2ecf20Sopenharmony_ci        PUSH_ASSERT(!((c) & ~DRF_MASK(NV507C_DMA_METHOD_COUNT)), "size");       \
108c2ecf20Sopenharmony_ci        PUSH_DATA__((p), NVDEF(NV507C, DMA, OPCODE, METHOD) |                   \
118c2ecf20Sopenharmony_ci			 NVVAL(NV507C, DMA, METHOD_COUNT, (c)) |                \
128c2ecf20Sopenharmony_ci			 NVVAL(NV507C, DMA, METHOD_OFFSET, (m) >> 2),           \
138c2ecf20Sopenharmony_ci		    " mthd 0x%04x size %d - %s", (u32)(m), (u32)(c), __func__); \
148c2ecf20Sopenharmony_ci} while(0)
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci#define PUSH_MTHD_HDR(p,s,m,c) PUSH_HDR(p,m,c)
178c2ecf20Sopenharmony_ci#define PUSH_MTHD_INC 4:4
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci#define PUSH_JUMP(p,o) do {                                                 \
208c2ecf20Sopenharmony_ci        PUSH_ASSERT(!((o) & ~DRF_SMASK(NV507C_DMA_JUMP_OFFSET)), "offset"); \
218c2ecf20Sopenharmony_ci	PUSH_DATA__((p), NVDEF(NV507C, DMA, OPCODE, JUMP) |                 \
228c2ecf20Sopenharmony_ci			 NVVAL(NV507C, DMA, JUMP_OFFSET, (o) >> 2),         \
238c2ecf20Sopenharmony_ci		    " jump 0x%08x - %s", (u32)(o), __func__);               \
248c2ecf20Sopenharmony_ci} while(0)
258c2ecf20Sopenharmony_ci#endif
26