Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/etnaviv: Add a new function to emit a series of states to cmd stream

v2: fix formatting and remove superfluous masking (Lucas)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Tested-by: Marek Vasut <marek.vasut@mailbox.org> # STM32MP255C DHCOS DHSBC
Link: https://patch.msgid.link/20251119164624.9297-4-gert.wollny@collabora.com
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>

authored by

Gert Wollny and committed by
Christian Gmeiner
9fcdece1 9934873b

+13
+13
drivers/gpu/drm/etnaviv/etnaviv_buffer.h
··· 36 36 OUT(buffer, value); 37 37 } 38 38 39 + static inline void CMD_LOAD_STATES_START(struct etnaviv_cmdbuf *buffer, u32 reg, 40 + u32 nvalues) 41 + { 42 + u32 index = reg >> VIV_FE_LOAD_STATE_HEADER_OFFSET__SHR; 43 + 44 + buffer->user_size = ALIGN(buffer->user_size, 8); 45 + 46 + /* write a register via cmd stream */ 47 + OUT(buffer, VIV_FE_LOAD_STATE_HEADER_OP_LOAD_STATE | 48 + VIV_FE_LOAD_STATE_HEADER_OFFSET(index) | 49 + VIV_FE_LOAD_STATE_HEADER_COUNT(nvalues)); 50 + } 51 + 39 52 static inline void CMD_END(struct etnaviv_cmdbuf *buffer) 40 53 { 41 54 buffer->user_size = ALIGN(buffer->user_size, 8);