v2: fix formatting and remove superfluous masking (Lucas) Signed-off-by: Gert Wollny <gert.wol...@collabora.com> --- drivers/gpu/drm/etnaviv/etnaviv_buffer.h | 13 +++++++++++++ 1 file changed, 13 insertions(+)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_buffer.h b/drivers/gpu/drm/etnaviv/etnaviv_buffer.h index caf820d91ef5..842a7ca55c44 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_buffer.h +++ b/drivers/gpu/drm/etnaviv/etnaviv_buffer.h @@ -41,6 +41,19 @@ static inline void CMD_LOAD_STATE(struct etnaviv_cmdbuf *buffer, OUT(buffer, value); } +static inline void CMD_LOAD_STATES_START(struct etnaviv_cmdbuf *buffer, + u32 reg, u32 nvalues) +{ + u32 index = reg >> VIV_FE_LOAD_STATE_HEADER_OFFSET__SHR; + + buffer->user_size = ALIGN(buffer->user_size, 8); + + /* write a register via cmd stream */ + OUT(buffer, VIV_FE_LOAD_STATE_HEADER_OP_LOAD_STATE | + VIV_FE_LOAD_STATE_HEADER_OFFSET(index) | + VIV_FE_LOAD_STATE_HEADER_COUNT(nvalues)); +} + static inline void CMD_END(struct etnaviv_cmdbuf *buffer) { buffer->user_size = ALIGN(buffer->user_size, 8); -- 2.49.0