FAILED: patch "[PATCH] media: imx-jpeg: Move mxc_jpeg_free_slot_data() ahead" failed to apply to 6.1-stable tree
Subsystems (4)
[email protected]
maintainerThe patch below does not apply to the 6.1-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-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x 46e9c092f850bd7b4d06de92d3d21877f49a3fcb
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2025062043-reemerge-pastel-e344@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 46e9c092f850bd7b4d06de92d3d21877f49a3fcb Mon Sep 17 00:00:00 2001
From: Ming Qian <[email protected]>
Date: Mon, 21 Apr 2025 16:12:52 +0800
Subject: [PATCH] media: imx-jpeg: Move mxc_jpeg_free_slot_data() ahead
Move function mxc_jpeg_free_slot_data() above mxc_jpeg_alloc_slot_data() allowing to call that function during allocation failures. No functional changes are made.
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c +20 -20
@@ -752,6 +752,26 @@ static int mxc_get_free_slot(struct mxc_jpeg_slot_data *slot_data)return -1 ; } +static void mxc_jpeg_free_slot_data (struct mxc_jpeg_dev *jpeg) +{ +/* free descriptor for decoding/encoding phase */ +dma_free_coherent (jpeg->dev,sizeof (struct mxc_jpeg_desc ), + jpeg->slot_data.desc, + jpeg->slot_data.desc_handle); + +/* free descriptor for encoder configuration phase / decoder DHT */ +dma_free_coherent (jpeg->dev,sizeof (struct mxc_jpeg_desc ), + jpeg->slot_data.cfg_desc, + jpeg->slot_data.cfg_desc_handle); + +/* free configuration stream */ +dma_free_coherent (jpeg->dev,MXC_JPEG_MAX_CFG_STREAM , + jpeg->slot_data.cfg_stream_vaddr, + jpeg->slot_data.cfg_stream_handle); + + jpeg->slot_data.used = false; +} +static bool mxc_jpeg_alloc_slot_data (struct mxc_jpeg_dev *jpeg) {struct mxc_jpeg_desc *desc;
@@ -798,26 +818,6 @@ static bool mxc_jpeg_alloc_slot_data(struct mxc_jpeg_dev *jpeg)return false; } -static void mxc_jpeg_free_slot_data (struct mxc_jpeg_dev *jpeg) -{ -/* free descriptor for decoding/encoding phase */ -dma_free_coherent (jpeg->dev,sizeof (struct mxc_jpeg_desc ), - jpeg->slot_data.desc, - jpeg->slot_data.desc_handle); - -/* free descriptor for encoder configuration phase / decoder DHT */ -dma_free_coherent (jpeg->dev,sizeof (struct mxc_jpeg_desc ), - jpeg->slot_data.cfg_desc, - jpeg->slot_data.cfg_desc_handle); - -/* free configuration stream */ -dma_free_coherent (jpeg->dev,MXC_JPEG_MAX_CFG_STREAM , - jpeg->slot_data.cfg_stream_vaddr, - jpeg->slot_data.cfg_stream_handle); - - jpeg->slot_data.used = false; -} -static void mxc_jpeg_check_and_set_last_buffer (struct mxc_jpeg_ctx *ctx,struct vb2_v4l2_buffer *src_buf,struct vb2_v4l2_buffer *dst_buf)