<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/soc/mediatek, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-06-27T10:41:51+00:00</updated>
<entry>
<title>soc: mtk-cmdq: Add cmdq_pkt_logic_command to support math operation</title>
<updated>2024-06-27T10:41:51+00:00</updated>
<author>
<name>Jason-JH.Lin</name>
<email>jason-jh.lin@mediatek.com</email>
</author>
<published>2024-06-25T08:39:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=58de63ddd0ecc84548b8fd24c72deb3739365c78'/>
<id>urn:sha1:58de63ddd0ecc84548b8fd24c72deb3739365c78</id>
<content type='text'>
Add cmdq_pkt_logic_command to support math operation.

cmdq_pkt_logic_command can append logic command to the CMDQ packet,
ask GCE to execute a arithmetic calculate instruction,
such as add, subtract, multiply, AND, OR and NOT, etc.

Note that all arithmetic instructions are unsigned calculations.
If there are any overflows, GCE will sent the invalid IRQ to notify
CMDQ driver.

Signed-off-by: Jason-JH.Lin &lt;jason-jh.lin@mediatek.com&gt;
Signed-off-by: Hsiao Chien Sung &lt;shawn.sung@mediatek.com&gt;
Link: https://lore.kernel.org/r/20240625083957.3540-1-jason-jh.lin@mediatek.com
Signed-off-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
</content>
</entry>
<entry>
<title>soc: mediatek: mtk-cmdq: Add cmdq_pkt_acquire_event() function</title>
<updated>2024-04-23T10:16:55+00:00</updated>
<author>
<name>Jason-JH.Lin</name>
<email>jason-jh.lin@mediatek.com</email>
</author>
<published>2024-03-07T01:34:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=69ff68332dc5005539ac37c5c85444aaaec7c914'/>
<id>urn:sha1:69ff68332dc5005539ac37c5c85444aaaec7c914</id>
<content type='text'>
Add cmdq_pkt_acquire_event() function to support CMDQ user making
an instruction for acquiring event.

CMDQ users can use cmdq_pkt_acquire_event() as `mutex_lock`
and cmdq_pkt_clear_event() as `mutex_unlock` to protect the global
resource modified instructions between them.

cmdq_pkt_acquire_event() would wait for event to be cleared.
After event is cleared by cmdq_pkt_clear_event() in other GCE threads,
cmdq_pkt_acquire_event() would set event and keep executing next
instruction. So the mutex would work like this:

    cmdq_pkt_acquire_event() /* mutex lock */

    /* critical secton instructions that modified global resource */

    cmdq_pkt_clear_event() /* mutex unlock */

Prevent the critical section instructions from being affected by other
GCE threads.

Signed-off-by: Jason-JH.Lin &lt;jason-jh.lin@mediatek.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Link: https://lore.kernel.org/r/20240307013458.23550-5-jason-jh.lin@mediatek.com
Signed-off-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
</content>
</entry>
<entry>
<title>soc: mediatek: mtk-cmdq: Add cmdq_pkt_poll_addr() function</title>
<updated>2024-04-23T10:16:55+00:00</updated>
<author>
<name>Jason-JH.Lin</name>
<email>jason-jh.lin@mediatek.com</email>
</author>
<published>2024-03-07T01:34:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=400e2fa8058e7032974a892c7336b3ea20e24cfd'/>
<id>urn:sha1:400e2fa8058e7032974a892c7336b3ea20e24cfd</id>
<content type='text'>
Add cmdq_pkt_poll_addr function to support CMDQ user making
an instruction for polling a specific address of hardware rigster
to check the value with or without mask.

POLL is a legacy operation in GCE, so it does not support SPR and
CMDQ_CODE_LOGIC. To support polling the register address which doesn't
have the subsys id, CMDQ users need to make an instruction with GPR and
CMDQ_CODE_MASK operation to move the register address to be poll into GPR.
Then users can make an POLL instruction with GPR to poll the register
address assigned in previous instruction.

Signed-off-by: Jason-JH.Lin &lt;jason-jh.lin@mediatek.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Link: https://lore.kernel.org/r/20240307013458.23550-4-jason-jh.lin@mediatek.com
Signed-off-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
</content>
</entry>
<entry>
<title>soc: mediatek: mtk-cmdq: Add cmdq_pkt_mem_move() function</title>
<updated>2024-04-23T10:16:55+00:00</updated>
<author>
<name>Jason-JH.Lin</name>
<email>jason-jh.lin@mediatek.com</email>
</author>
<published>2024-03-07T01:34:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=263801f8e5a159cff2dfbc2a1d9cf9f1afecfa81'/>
<id>urn:sha1:263801f8e5a159cff2dfbc2a1d9cf9f1afecfa81</id>
<content type='text'>
Add cmdq_pkt_mem_move() function to support CMDQ user making
an instruction for moving a value from a source address to a
destination address.

Signed-off-by: Jason-JH.Lin &lt;jason-jh.lin@mediatek.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Link: https://lore.kernel.org/r/20240307013458.23550-3-jason-jh.lin@mediatek.com
Signed-off-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
</content>
</entry>
<entry>
<title>soc: mediatek: mtk-cmdq: Add specific purpose register definitions for GCE</title>
<updated>2024-04-23T10:16:55+00:00</updated>
<author>
<name>Jason-JH.Lin</name>
<email>jason-jh.lin@mediatek.com</email>
</author>
<published>2024-03-07T01:34:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=49ddaa495f8b60c8c4022ebe540024dd870e4dd1'/>
<id>urn:sha1:49ddaa495f8b60c8c4022ebe540024dd870e4dd1</id>
<content type='text'>
Add specific purpose register definitions for GCE, so CMDQ users can
use them as a buffer to store data.

Signed-off-by: Jason-JH.Lin &lt;jason-jh.lin@mediatek.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Link: https://lore.kernel.org/r/20240307013458.23550-2-jason-jh.lin@mediatek.com
Signed-off-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
</content>
</entry>
<entry>
<title>soc: mediatek: cmdq: Refine cmdq_pkt_create() and cmdq_pkt_destroy()</title>
<updated>2024-04-23T10:16:54+00:00</updated>
<author>
<name>Chun-Kuang Hu</name>
<email>chunkuang.hu@kernel.org</email>
</author>
<published>2024-02-22T15:41:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b81b2d5534fc72f70d808c72b19f0e3f9df32a90'/>
<id>urn:sha1:b81b2d5534fc72f70d808c72b19f0e3f9df32a90</id>
<content type='text'>
cmdq_pkt_create() and cmdq_pkt_destroy() is not suitable for
client drivers so each client driver has implement its own
function. This refinement would pass struct cmdq_pkt pointer into
cmdq_pkt_create(). In addition, client driver has the struct
cmdq_client information, so it's not necessary to store this
information in struct cmdq_pkt. After this refinement, client
drivers could use these helper funciton instead of implementing
its own version.

Signed-off-by: Chun-Kuang Hu &lt;chunkuang.hu@kernel.org&gt;
Link: https://lore.kernel.org/r/20240222154120.16959-8-chunkuang.hu@kernel.org
Signed-off-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
</content>
</entry>
<entry>
<title>soc: mediatek: cmdq: Remove cmdq_pkt_flush_async() helper function</title>
<updated>2024-04-23T10:16:54+00:00</updated>
<author>
<name>Chun-Kuang Hu</name>
<email>chunkuang.hu@kernel.org</email>
</author>
<published>2024-02-22T15:41:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9935af96a72735e8e86aaaf06b031b014109ebc1'/>
<id>urn:sha1:9935af96a72735e8e86aaaf06b031b014109ebc1</id>
<content type='text'>
cmdq_pkt_flush_async() is not used by all client drivers (MediaTek
drm driver and MediaTek mdp3 driver), so remove it.

Signed-off-by: Chun-Kuang Hu &lt;chunkuang.hu@kernel.org&gt;
Link: https://lore.kernel.org/r/20240222154120.16959-7-chunkuang.hu@kernel.org
Signed-off-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
</content>
</entry>
<entry>
<title>soc: mediatek: cmdq: Add cmdq_pkt_eoc() helper function</title>
<updated>2024-04-23T10:16:54+00:00</updated>
<author>
<name>Chun-Kuang Hu</name>
<email>chunkuang.hu@kernel.org</email>
</author>
<published>2024-02-22T15:41:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3d86ced95d8c09d11c172f542edd40f58a4098fa'/>
<id>urn:sha1:3d86ced95d8c09d11c172f542edd40f58a4098fa</id>
<content type='text'>
cmdq_pkt_eoc() append eoc command to CMDQ packet. eoc command
would ask GCE to generate IRQ. It's usually appended to the end
of packet to notify all command in the packet is done.

Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Signed-off-by: Chun-Kuang Hu &lt;chunkuang.hu@kernel.org&gt;
Link: https://lore.kernel.org/r/20240222154120.16959-6-chunkuang.hu@kernel.org
Signed-off-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
</content>
</entry>
<entry>
<title>soc: mediatek: cmdq: Add cmdq_pkt_jump_rel() helper function</title>
<updated>2024-04-23T10:16:54+00:00</updated>
<author>
<name>Chun-Kuang Hu</name>
<email>chunkuang.hu@kernel.org</email>
</author>
<published>2024-02-22T15:41:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=698cdcb19579f9de005698f9dfb660ab6ec65d32'/>
<id>urn:sha1:698cdcb19579f9de005698f9dfb660ab6ec65d32</id>
<content type='text'>
cmdq_pkt_jump_rel() append relative jump command to the packet.
Relative jump change PC to the target address with offset from
current PC.

Signed-off-by: Chun-Kuang Hu &lt;chunkuang.hu@kernel.org&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Link: https://lore.kernel.org/r/20240222154120.16959-5-chunkuang.hu@kernel.org
Signed-off-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
</content>
</entry>
<entry>
<title>soc: mediatek: cmdq: Rename cmdq_pkt_jump() to cmdq_pkt_jump_abs()</title>
<updated>2024-04-23T10:16:53+00:00</updated>
<author>
<name>Chun-Kuang Hu</name>
<email>chunkuang.hu@kernel.org</email>
</author>
<published>2024-02-22T15:41:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7218be3b6fcf00d1a3a6867aa1be6b9ab91cce45'/>
<id>urn:sha1:7218be3b6fcf00d1a3a6867aa1be6b9ab91cce45</id>
<content type='text'>
In order to distinguish absolute jump and relative jump,
cmdq_pkt_jump() append absolute jump command, so rename it to
cmdq_pkt_jump_abs().

Signed-off-by: Chun-Kuang Hu &lt;chunkuang.hu@kernel.org&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Link: https://lore.kernel.org/r/20240222154120.16959-4-chunkuang.hu@kernel.org
[Angelo: Added temporary wrapper to avoid build breakage]
Signed-off-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
</content>
</entry>
</feed>
