| 69ff6833 | 07-Mar-2024 |
Jason-JH.Lin <[email protected]> |
soc: mediatek: mtk-cmdq: Add cmdq_pkt_acquire_event() function
Add cmdq_pkt_acquire_event() function to support CMDQ user making an instruction for acquiring event.
CMDQ users can use cmdq_pkt_acqu
soc: mediatek: mtk-cmdq: Add cmdq_pkt_acquire_event() function
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 <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
show more ...
|
| 400e2fa8 | 07-Mar-2024 |
Jason-JH.Lin <[email protected]> |
soc: mediatek: mtk-cmdq: Add cmdq_pkt_poll_addr() function
Add cmdq_pkt_poll_addr function to support CMDQ user making an instruction for polling a specific address of hardware rigster to check the
soc: mediatek: mtk-cmdq: Add cmdq_pkt_poll_addr() function
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 <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
show more ...
|
| 49ddaa49 | 07-Mar-2024 |
Jason-JH.Lin <[email protected]> |
soc: mediatek: mtk-cmdq: Add specific purpose register definitions for GCE
Add specific purpose register definitions for GCE, so CMDQ users can use them as a buffer to store data.
Signed-off-by: Ja
soc: mediatek: mtk-cmdq: Add specific purpose register definitions for GCE
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 <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
show more ...
|
| b81b2d55 | 22-Feb-2024 |
Chun-Kuang Hu <[email protected]> |
soc: mediatek: cmdq: Refine cmdq_pkt_create() and cmdq_pkt_destroy()
cmdq_pkt_create() and cmdq_pkt_destroy() is not suitable for client drivers so each client driver has implement its own function.
soc: mediatek: cmdq: Refine cmdq_pkt_create() and cmdq_pkt_destroy()
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
show more ...
|
| 9935af96 | 22-Feb-2024 |
Chun-Kuang Hu <[email protected]> |
soc: mediatek: cmdq: Remove cmdq_pkt_flush_async() helper function
cmdq_pkt_flush_async() is not used by all client drivers (MediaTek drm driver and MediaTek mdp3 driver), so remove it.
Signed-off-
soc: mediatek: cmdq: Remove cmdq_pkt_flush_async() helper function
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
show more ...
|
| 7218be3b | 22-Feb-2024 |
Chun-Kuang Hu <[email protected]> |
soc: mediatek: cmdq: Rename cmdq_pkt_jump() to cmdq_pkt_jump_abs()
In order to distinguish absolute jump and relative jump, cmdq_pkt_jump() append absolute jump command, so rename it to cmdq_pkt_jum
soc: mediatek: cmdq: Rename cmdq_pkt_jump() to cmdq_pkt_jump_abs()
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 <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] [Angelo: Added temporary wrapper to avoid build breakage] Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
show more ...
|
| eb0d8623 | 22-Feb-2023 |
AngeloGioacchino Del Regno <[email protected]> |
soc: mediatek: cmdq: Add inline functions for !CONFIG_MTK_CMDQ
In preparation for a cleanup of ifdef instances of IS_REACHABLE() for the CONFIG_MTK_CMDQ configuration option, add inline functions th
soc: mediatek: cmdq: Add inline functions for !CONFIG_MTK_CMDQ
In preparation for a cleanup of ifdef instances of IS_REACHABLE() for the CONFIG_MTK_CMDQ configuration option, add inline functions that will either return a failure or, for void functions, do nothing.
Signed-off-by: AngeloGioacchino Del Regno <[email protected]> Reviewed-by: Chen-Yu Tsai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Matthias Brugger <[email protected]>
show more ...
|