From: Yemike Abhilash Chandra <y-abhilashchandra@ti.com>
To: <mchehab@kernel.org>, <robh@kernel.org>, <krzk+dt@kernel.org>,
<conor+dt@kernel.org>
Cc: <linux@armlinux.org.uk>, <ardb@kernel.org>, <ebiggers@kernel.org>,
<geert+renesas@glider.be>, <claudiu.beznea@tuxon.dev>,
<bparrot@ti.com>, <andre.draszik@linaro.org>,
<kuninori.morimoto.gx@renesas.com>,
<prabhakar.mahadev-lad.rj@bp.renesas.com>,
<heikki.krogerus@linux.intel.com>, <kory.maincent@bootlin.com>,
<florian.fainelli@broadcom.com>, <lumag@kernel.org>,
<dale@farnsworth.org>, <sbellary@baylibre.com>,
<linux-media@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<dagriego@biglakesoftware.com>, <u-kumar1@ti.com>,
<y-abhilashchandra@ti.com>
Subject: [PATCH V2 2/4] Revert "media: platform: ti: Remove unused vpdma_update_dma_addr"
Date: Wed, 16 Jul 2025 16:49:10 +0530 [thread overview]
Message-ID: <20250716111912.235157-3-y-abhilashchandra@ti.com> (raw)
In-Reply-To: <20250716111912.235157-1-y-abhilashchandra@ti.com>
This reverts commit 9314891df119442a6ec1518b3d872c330e2bf1a1.
We're adding support for TI VIP driver, so this is no longer unused.
Signed-off-by: Yemike Abhilash Chandra <y-abhilashchandra@ti.com>
---
drivers/media/platform/ti/vpe/vpdma.c | 32 +++++++++++++++++++++++++++
drivers/media/platform/ti/vpe/vpdma.h | 3 +++
2 files changed, 35 insertions(+)
diff --git a/drivers/media/platform/ti/vpe/vpdma.c b/drivers/media/platform/ti/vpe/vpdma.c
index bb8a8bd7980c..da90d7f03f82 100644
--- a/drivers/media/platform/ti/vpe/vpdma.c
+++ b/drivers/media/platform/ti/vpe/vpdma.c
@@ -552,6 +552,38 @@ EXPORT_SYMBOL(vpdma_submit_descs);
static void dump_dtd(struct vpdma_dtd *dtd);
+void vpdma_update_dma_addr(struct vpdma_data *vpdma,
+ struct vpdma_desc_list *list, dma_addr_t dma_addr,
+ void *write_dtd, int drop, int idx)
+{
+ struct vpdma_dtd *dtd = list->buf.addr;
+ dma_addr_t write_desc_addr;
+ int offset;
+
+ dtd += idx;
+ vpdma_unmap_desc_buf(vpdma, &list->buf);
+
+ dtd->start_addr = dma_addr;
+
+ /* Calculate write address from the offset of write_dtd from start
+ * of the list->buf
+ */
+ offset = (void *)write_dtd - list->buf.addr;
+ write_desc_addr = list->buf.dma_addr + offset;
+
+ if (drop)
+ dtd->desc_write_addr = dtd_desc_write_addr(write_desc_addr,
+ 1, 1, 0);
+ else
+ dtd->desc_write_addr = dtd_desc_write_addr(write_desc_addr,
+ 1, 0, 0);
+
+ vpdma_map_desc_buf(vpdma, &list->buf);
+
+ dump_dtd(dtd);
+}
+EXPORT_SYMBOL(vpdma_update_dma_addr);
+
void vpdma_set_max_size(struct vpdma_data *vpdma, int reg_addr,
u32 width, u32 height)
{
diff --git a/drivers/media/platform/ti/vpe/vpdma.h b/drivers/media/platform/ti/vpe/vpdma.h
index e4d7941c6207..393fcbb3cb40 100644
--- a/drivers/media/platform/ti/vpe/vpdma.h
+++ b/drivers/media/platform/ti/vpe/vpdma.h
@@ -222,6 +222,9 @@ void vpdma_free_desc_list(struct vpdma_desc_list *list);
int vpdma_submit_descs(struct vpdma_data *vpdma, struct vpdma_desc_list *list,
int list_num);
bool vpdma_list_busy(struct vpdma_data *vpdma, int list_num);
+void vpdma_update_dma_addr(struct vpdma_data *vpdma,
+ struct vpdma_desc_list *list, dma_addr_t dma_addr,
+ void *write_dtd, int drop, int idx);
/* VPDMA hardware list funcs */
int vpdma_hwlist_alloc(struct vpdma_data *vpdma, void *priv);
--
2.34.1
next prev parent reply other threads:[~2025-07-16 11:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-16 11:19 [PATCH V2 0/4] Add support for VIP Yemike Abhilash Chandra
2025-07-16 11:19 ` [PATCH V2 1/4] MAINTAINERS: Update maintainers of TI VPE and CAL Yemike Abhilash Chandra
2025-07-16 11:19 ` Yemike Abhilash Chandra [this message]
2025-07-16 14:23 ` [PATCH V2 2/4] Revert "media: platform: ti: Remove unused vpdma_update_dma_addr" Krzysztof Kozlowski
2025-08-26 8:26 ` Yemike Abhilash Chandra
2025-07-16 11:19 ` [PATCH V2 3/4] dt-bindings: media: ti: vpe: Add bindings for Video Input Port Yemike Abhilash Chandra
2025-07-16 12:47 ` Rob Herring (Arm)
2025-07-16 14:05 ` Krzysztof Kozlowski
2025-08-26 8:21 ` Yemike Abhilash Chandra
2025-07-16 11:19 ` [PATCH V2 4/4] media: ti-vpe: Add the VIP driver Yemike Abhilash Chandra
2025-07-16 14:09 ` Krzysztof Kozlowski
2025-08-26 8:29 ` Yemike Abhilash Chandra
2025-07-17 10:49 ` kernel test robot
2025-08-25 14:53 ` Hans Verkuil
2025-08-25 14:34 ` [PATCH V2 0/4] Add support for VIP Hans Verkuil
2025-08-26 8:49 ` Yemike Abhilash Chandra
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=20250716111912.235157-3-y-abhilashchandra@ti.com \
--to=y-abhilashchandra@ti.com \
--cc=andre.draszik@linaro.org \
--cc=ardb@kernel.org \
--cc=bparrot@ti.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=conor+dt@kernel.org \
--cc=dagriego@biglakesoftware.com \
--cc=dale@farnsworth.org \
--cc=devicetree@vger.kernel.org \
--cc=ebiggers@kernel.org \
--cc=florian.fainelli@broadcom.com \
--cc=geert+renesas@glider.be \
--cc=heikki.krogerus@linux.intel.com \
--cc=kory.maincent@bootlin.com \
--cc=krzk+dt@kernel.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=lumag@kernel.org \
--cc=mchehab@kernel.org \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=robh@kernel.org \
--cc=sbellary@baylibre.com \
--cc=u-kumar1@ti.com \
/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;
as well as URLs for NNTP newsgroup(s).