soc: mediatek: cmdq: Remove cmdq_pkt_flush_async() helper function
authorChun-Kuang Hu <chunkuang.hu@kernel.org>
Thu, 22 Feb 2024 15:41:14 +0000 (15:41 +0000)
committerAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tue, 23 Apr 2024 10:16:54 +0000 (12:16 +0200)
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 <chunkuang.hu@kernel.org>
Link: https://lore.kernel.org/r/20240222154120.16959-7-chunkuang.hu@kernel.org
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
drivers/soc/mediatek/mtk-cmdq-helper.c
include/linux/soc/mediatek/mtk-cmdq.h

index 766dbafaef629636282f150963e31ad2e6c4e455..bbe41302210ab2e34cfb0b7dbbf8375a02344883 100644 (file)
@@ -446,19 +446,4 @@ int cmdq_pkt_finalize(struct cmdq_pkt *pkt)
 }
 EXPORT_SYMBOL(cmdq_pkt_finalize);
 
-int cmdq_pkt_flush_async(struct cmdq_pkt *pkt)
-{
-       int err;
-       struct cmdq_client *client = (struct cmdq_client *)pkt->cl;
-
-       err = mbox_send_message(client->chan, pkt);
-       if (err < 0)
-               return err;
-       /* We can send next packet immediately, so just call txdone. */
-       mbox_client_txdone(client->chan, 0);
-
-       return 0;
-}
-EXPORT_SYMBOL(cmdq_pkt_flush_async);
-
 MODULE_LICENSE("GPL v2");
index 921d631361d24b9e112ec5506593154c058bb1bf..e79dc8c4ad41ab41f642ca003438148fff670754 100644 (file)
@@ -303,19 +303,6 @@ int cmdq_pkt_eoc(struct cmdq_pkt *pkt);
  */
 int cmdq_pkt_finalize(struct cmdq_pkt *pkt);
 
-/**
- * cmdq_pkt_flush_async() - trigger CMDQ to asynchronously execute the CMDQ
- *                          packet and call back at the end of done packet
- * @pkt:       the CMDQ packet
- *
- * Return: 0 for success; else the error code is returned
- *
- * Trigger CMDQ to asynchronously execute the CMDQ packet and call back
- * at the end of done packet. Note that this is an ASYNC function. When the
- * function returned, it may or may not be finished.
- */
-int cmdq_pkt_flush_async(struct cmdq_pkt *pkt);
-
 #else /* IS_ENABLED(CONFIG_MTK_CMDQ) */
 
 static inline int cmdq_dev_get_client_reg(struct device *dev,
@@ -436,11 +423,6 @@ static inline int cmdq_pkt_finalize(struct cmdq_pkt *pkt)
        return -EINVAL;
 }
 
-static inline int cmdq_pkt_flush_async(struct cmdq_pkt *pkt)
-{
-       return -EINVAL;
-}
-
 #endif /* IS_ENABLED(CONFIG_MTK_CMDQ) */
 
 #endif /* __MTK_CMDQ_H__ */