From: gert.wollny@collabora.com
To: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: Lucas Stach <l.stach@pengutronix.de>,
Russell King <linux+etnaviv@armlinux.org.uk>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
etnaviv@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org,
Gert Wollny <gert.wollny@collabora.com>
Subject: [PATCH v4 3/5] drm/etnaviv: Add a new function to emit a series of states to cmd stream
Date: Mon, 10 Nov 2025 15:37:49 +0100 [thread overview]
Message-ID: <20251110144625.18653-4-gert.wollny@collabora.com> (raw)
In-Reply-To: <20251110144625.18653-1-gert.wollny@collabora.com>
From: Gert Wollny <gert.wollny@collabora.com>
v2: fix formatting and remove superfluous masking (Lucas)
Signed-off-by: Gert Wollny <gert.wollny@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 ae1ba1db6c8a..9388a686edcf 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_buffer.h
+++ b/drivers/gpu/drm/etnaviv/etnaviv_buffer.h
@@ -43,6 +43,19 @@ static inline void CMD_LOAD_STATE(struct etnaviv_cmdbuf *buffer, u32 reg,
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.51.0
next prev parent reply other threads:[~2025-11-10 14:43 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-18 20:43 drm/etnaviv: Add support for running a PPU flop reset Gert Wollny
2025-06-18 20:43 ` [PATCH v2 1/6] drm/etnaviv: Add command stream definitions required for " Gert Wollny
2025-06-18 20:43 ` [PATCH v2 2/6] drm/etnaviv: move some functions to a header to be able to use them externally Gert Wollny
2025-06-18 20:43 ` [PATCH v2 3/6] drm/etnaviv: Add a new function to emit a series of states to cmd stream Gert Wollny
2025-06-18 20:43 ` [PATCH v2 4/6] drm/etnaviv: Identify GPU already when binding Gert Wollny
2025-06-20 20:11 ` Lucas Stach
2025-06-18 20:43 ` [PATCH v2 5/6] drm/etnaviv: Add PPU flop reset Gert Wollny
2025-06-20 20:22 ` Lucas Stach
2025-06-23 12:05 ` Gert Wollny
2025-06-23 12:25 ` Lucas Stach
2025-06-18 20:43 ` [PATCH v2 6/6] drm/etnaviv: Add module parameter to force " Gert Wollny
2025-06-20 20:24 ` Lucas Stach
2025-06-30 20:26 ` [PATCH v3 0/5] drm/etnaviv: Add support for running a " Gert Wollny
2025-06-30 20:26 ` [PATCH v3 1/5] drm/etnaviv: Add command stream definitions required for " Gert Wollny
2025-06-30 20:26 ` [PATCH v3 2/5] drm/etnaviv: move some functions to a header to be able to use them externally Gert Wollny
2025-06-30 20:26 ` [PATCH v3 3/5] drm/etnaviv: Add a new function to emit a series of states to cmd stream Gert Wollny
2025-06-30 20:26 ` [PATCH v3 4/5] drm/etnaviv: Add PPU flop reset Gert Wollny
2025-10-09 21:40 ` Christian Gmeiner
2025-06-30 20:26 ` [PATCH v3 5/5] drm/etnaviv: Add module parameter to force " Gert Wollny
2025-11-10 14:37 ` [PATCH v4 0/5] drm/etnaviv: Add support for running a " gert.wollny
2025-11-10 14:37 ` [PATCH v4 1/5] drm/etnaviv: Add command stream definitions required for " gert.wollny
2025-11-10 15:54 ` Christian Gmeiner
2025-11-10 14:37 ` [PATCH v4 2/5] drm/etnaviv: move some functions to a header to be able to use them externally gert.wollny
2025-11-10 15:53 ` Christian Gmeiner
2025-11-10 14:37 ` gert.wollny [this message]
2025-11-17 8:27 ` [PATCH v4 3/5] drm/etnaviv: Add a new function to emit a series of states to cmd stream Christian Gmeiner
2025-11-10 14:37 ` [PATCH v4 4/5] drm/etnaviv: Add PPU flop reset gert.wollny
2025-11-17 8:57 ` Christian Gmeiner
2025-11-10 14:37 ` [PATCH v4 5/5] drm/etnaviv: Add module parameter to force " gert.wollny
2025-11-19 15:30 ` Christian Gmeiner
2025-11-19 16:45 ` [PATCH v5 0/5] drm/etnaviv: Add support for running a " gert.wollny
2025-11-19 16:45 ` [PATCH v5 1/5] drm/etnaviv: Add command stream definitions required for " gert.wollny
2025-11-19 16:45 ` [PATCH v5 2/5] drm/etnaviv: move some functions to a header to be able to use them externally gert.wollny
2025-11-28 8:56 ` Christian Gmeiner
2025-11-28 13:39 ` Gert Wollny
2025-11-19 16:45 ` [PATCH v5 3/5] drm/etnaviv: Add a new function to emit a series of states to cmd stream gert.wollny
2025-11-19 16:45 ` [PATCH v5 4/5] drm/etnaviv: Add PPU flop reset gert.wollny
2025-11-28 8:53 ` Christian Gmeiner
2025-11-19 16:45 ` [PATCH v5 5/5] drm/etnaviv: Add module parameter to force " gert.wollny
2025-11-21 20:47 ` [PATCH v5 0/5] drm/etnaviv: Add support for running a " Marek Vasut
2026-01-06 15:48 ` Christian Gmeiner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251110144625.18653-4-gert.wollny@collabora.com \
--to=gert.wollny@collabora.com \
--cc=airlied@gmail.com \
--cc=christian.gmeiner@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=etnaviv@lists.freedesktop.org \
--cc=l.stach@pengutronix.de \
--cc=linux+etnaviv@armlinux.org.uk \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®