linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv3 1/4] media: imx: Remove unused functions
@ 2021-10-19 12:13 Dorota Czaplejewicz
  2021-10-19 12:13 ` [PATCHv3 2/4] media: imx: Store the type of hardware implementation Dorota Czaplejewicz
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Dorota Czaplejewicz @ 2021-10-19 12:13 UTC (permalink / raw)
  To: Steve Longerbeam, Philipp Zabel, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	linux-media, linux-staging, linux-arm-kernel, linux-kernel,
	kernel, phone-devel

[-- Attachment #1: Type: text/plain, Size: 3477 bytes --]

Neither imx_media_mbus_fmt_to_ipu_image nor imx_media_ipu_image_to_mbus_fmt
were used anywhere.

Signed-off-by: Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm>
---
Hello,

In this revision, the big change is in the 4th patch, where I followed Philipp Zabel's suggestions for i.MX7/8. The biggest change comes from the use of `v4l2_fill_pixfmt` to fill out the pixel format. Thanks to that, I could simplify the logic to select between 8-pixel- and 4-pixel-divisible line lengths. Thanks Philipp for pointing out this function, this is closer to what I originally hoped to do.

The use of `v4l2_fill_pixfmt` comes with the downside of breaking 10-bit Bayer formats, or at least until my other series gets accepted (Subject: "media: Add 16-bit Bayer formats". Sorry, I don't have the message id.).

Regards,
Dorota Czaplejewicz


 drivers/staging/media/imx/imx-media-utils.c | 42 ---------------------
 drivers/staging/media/imx/imx-media.h       |  4 --
 2 files changed, 46 deletions(-)

diff --git a/drivers/staging/media/imx/imx-media-utils.c b/drivers/staging/media/imx/imx-media-utils.c
index 5128915a5d6f..afa96e05ea7f 100644
--- a/drivers/staging/media/imx/imx-media-utils.c
+++ b/drivers/staging/media/imx/imx-media-utils.c
@@ -569,48 +569,6 @@ int imx_media_mbus_fmt_to_pix_fmt(struct v4l2_pix_format *pix,
 }
 EXPORT_SYMBOL_GPL(imx_media_mbus_fmt_to_pix_fmt);
 
-int imx_media_mbus_fmt_to_ipu_image(struct ipu_image *image,
-				    const struct v4l2_mbus_framefmt *mbus)
-{
-	int ret;
-
-	memset(image, 0, sizeof(*image));
-
-	ret = imx_media_mbus_fmt_to_pix_fmt(&image->pix, mbus, NULL);
-	if (ret)
-		return ret;
-
-	image->rect.width = mbus->width;
-	image->rect.height = mbus->height;
-
-	return 0;
-}
-EXPORT_SYMBOL_GPL(imx_media_mbus_fmt_to_ipu_image);
-
-int imx_media_ipu_image_to_mbus_fmt(struct v4l2_mbus_framefmt *mbus,
-				    const struct ipu_image *image)
-{
-	const struct imx_media_pixfmt *fmt;
-
-	fmt = imx_media_find_pixel_format(image->pix.pixelformat,
-					  PIXFMT_SEL_ANY);
-	if (!fmt || !fmt->codes || !fmt->codes[0])
-		return -EINVAL;
-
-	memset(mbus, 0, sizeof(*mbus));
-	mbus->width = image->pix.width;
-	mbus->height = image->pix.height;
-	mbus->code = fmt->codes[0];
-	mbus->field = image->pix.field;
-	mbus->colorspace = image->pix.colorspace;
-	mbus->xfer_func = image->pix.xfer_func;
-	mbus->ycbcr_enc = image->pix.ycbcr_enc;
-	mbus->quantization = image->pix.quantization;
-
-	return 0;
-}
-EXPORT_SYMBOL_GPL(imx_media_ipu_image_to_mbus_fmt);
-
 void imx_media_free_dma_buf(struct device *dev,
 			    struct imx_media_dma_buf *buf)
 {
diff --git a/drivers/staging/media/imx/imx-media.h b/drivers/staging/media/imx/imx-media.h
index 492d9a64e704..d2a150aac6cd 100644
--- a/drivers/staging/media/imx/imx-media.h
+++ b/drivers/staging/media/imx/imx-media.h
@@ -199,10 +199,6 @@ void imx_media_try_colorimetry(struct v4l2_mbus_framefmt *tryfmt,
 int imx_media_mbus_fmt_to_pix_fmt(struct v4l2_pix_format *pix,
 				  const struct v4l2_mbus_framefmt *mbus,
 				  const struct imx_media_pixfmt *cc);
-int imx_media_mbus_fmt_to_ipu_image(struct ipu_image *image,
-				    const struct v4l2_mbus_framefmt *mbus);
-int imx_media_ipu_image_to_mbus_fmt(struct v4l2_mbus_framefmt *mbus,
-				    const struct ipu_image *image);
 void imx_media_grp_id_to_sd_name(char *sd_name, int sz,
 				 u32 grp_id, int ipu_id);
 struct v4l2_subdev *
-- 
2.31.1


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-01-28 10:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-19 12:13 [PATCHv3 1/4] media: imx: Remove unused functions Dorota Czaplejewicz
2021-10-19 12:13 ` [PATCHv3 2/4] media: imx: Store the type of hardware implementation Dorota Czaplejewicz
2021-10-19 12:14 ` [PATCHv3 3/4] media: imx: Forward " Dorota Czaplejewicz
2021-10-19 12:14 ` [PATCHv3 4/4] media: imx: Use dedicated format handler for i.MX7/8 Dorota Czaplejewicz
2021-11-03 12:32   ` Philipp Zabel
2021-11-04  9:54     ` Rui Miguel Silva
2022-01-28 10:57   ` Hans Verkuil
2021-11-03 12:32 ` [PATCHv3 1/4] media: imx: Remove unused functions Philipp Zabel

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).