FAILED: patch "[PATCH] media: omap3isp: use sgtable-based scatterlist wrappers" failed to apply to 5.10-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y
git checkout FETCH_HEAD
git cherry-pick -x 3de572fe2189a4a0bd80295e1f478401e739498e
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2025062043-unaltered-handwoven-3d41@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 3de572fe2189a4a0bd80295e1f478401e739498e Mon Sep 17 00:00:00 2001
From: Marek Szyprowski <[email protected]>
Date: Wed, 7 May 2025 18:09:13 +0200
Subject: [PATCH] media: omap3isp: use sgtable-based scatterlist wrappers
Use common wrappers operating directly on the struct sg_table objects to fix incorrect use of scatterlists sync calls. dma_sync_sg_for_*() functions have to be called with the number of elements originally passed to dma_map_sg_*() function, not the one returned in sgtable's nents.
drivers/media/platform/ti/omap3isp/ispccdc.c +4 -4
@@ -446,8 +446,8 @@ static int ccdc_lsc_config(struct isp_ccdc_device *ccdc,if (ret <0 ) goto done; -dma_sync_sg_for_cpu (isp->dev, req->table.sgt.sgl, - req->table.sgt.nents,DMA_TO_DEVICE ); +dma_sync_sgtable_for_cpu (isp->dev, &req->table.sgt, +DMA_TO_DEVICE );if (copy_from_user (req->table.addr, config->lsc, req->config.size)) {
@@ -455,8 +455,8 @@ static int ccdc_lsc_config(struct isp_ccdc_device *ccdc, goto done; } -dma_sync_sg_for_device (isp->dev, req->table.sgt.sgl, - req->table.sgt.nents,DMA_TO_DEVICE ); +dma_sync_sgtable_for_device (isp->dev, &req->table.sgt, +DMA_TO_DEVICE ); }spin_lock_irqsave (&ccdc->lsc.req_lock, flags);
drivers/media/platform/ti/omap3isp/ispstat.c +2 -4
@@ -161,8 +161,7 @@ static void isp_stat_buf_sync_for_device(struct ispstat *stat,if (ISP_STAT_USES_DMAENGINE (stat))return ; -dma_sync_sg_for_device (stat->isp->dev, buf->sgt.sgl, - buf->sgt.nents,DMA_FROM_DEVICE ); +dma_sync_sgtable_for_device (stat->isp->dev, &buf->sgt,DMA_FROM_DEVICE ); } static void isp_stat_buf_sync_for_cpu(struct ispstat *stat,
@@ -171,8 +170,7 @@ static void isp_stat_buf_sync_for_cpu(struct ispstat *stat,if (ISP_STAT_USES_DMAENGINE (stat))return ; -dma_sync_sg_for_cpu (stat->isp->dev, buf->sgt.sgl, - buf->sgt.nents,DMA_FROM_DEVICE ); +dma_sync_sgtable_for_cpu (stat->isp->dev, &buf->sgt,DMA_FROM_DEVICE ); }static void isp_stat_buf_clear (struct ispstat *stat)