public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Debjeet Banerjee <debjeetbanerjee48@gmail.com>
To: sakari.ailus@linux.intel.com
Cc: andy.shevchenko@gmail.com, andy@kernel.org,
	debjeetbanerjee48@gmail.com, gregkh@linuxfoundation.org,
	hansg@kernel.org, linux-kernel@vger.kernel.org,
	linux-media@vger.kernel.org, linux-staging@lists.linux.dev,
	mchehab@kernel.org
Subject: [PATCH v6] media: atomisp: Remove unimplemented DPCM decompression
Date: Fri, 24 Apr 2026 18:34:28 +0530	[thread overview]
Message-ID: <20260424130428.27019-1-debjeetbanerjee48@gmail.com> (raw)
In-Reply-To: <aeqJt8gI0I8KnMVB@kekkonen.localdomain>

The CSI2 source pad format was set by blindly copying the sink pad
format, regardless of whether the sink pad is receiving a DPCM-compressed
mbus code. The rest of the driver does not support DPCM decompression,
so remove all DPCM-related dead code:

- Remove the FIXME comment in atomisp_csi2.c
- Remove atomisp_subdev_uncompressed_code() function
- Remove atomisp_subdev_is_compressed() function
- Remove atomisp_find_in_fmt_conv_compressed() declaration
- Remove compressed_codes[] array from atomisp_subdev.c

Signed-off-by: Debjeet Banerjee <debjeetbanerjee48@gmail.com>
---
v6:
- Squashed into a single patch and removed comment in atomisp_csi2.c

v5:
- Rebased onto linuxtv.org/sailus/media_tree.git

v4:
- Complete removal of DPCM decompression attempt
- Keep source pad simply copying sink pad format without unmapping
- Replace detailed comment with explicit "DPCM is not supported" statement

v3:
- Drop "staging:" prefix in subject

v2:
- Rebased onto latest media tree (fix CI apply failure)
- Fix missing linux-staging recipient (typo in v1)
- Fix indentation
---
 .../staging/media/atomisp/pci/atomisp_csi2.c  |  1 -
 .../media/atomisp/pci/atomisp_subdev.c        | 33 -------------------
 .../media/atomisp/pci/atomisp_subdev.h        |  3 --
 3 files changed, 37 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/atomisp_csi2.c b/drivers/staging/media/atomisp/pci/atomisp_csi2.c
index 95b9113d75e9..d15e607784e5 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_csi2.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_csi2.c
@@ -107,7 +107,6 @@ int atomisp_csi2_set_ffmt(struct v4l2_subdev *sd,
 					     &tmp_ffmt);
 	}
 
-	/* FIXME: DPCM decompression */
 	*actual_ffmt = *ffmt = *__csi2_get_format(csi2, sd_state, which,
 						  CSI2_PAD_SINK);
 
diff --git a/drivers/staging/media/atomisp/pci/atomisp_subdev.c b/drivers/staging/media/atomisp/pci/atomisp_subdev.c
index 9de9cd884d99..07189230c308 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_subdev.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_subdev.c
@@ -51,39 +51,6 @@ const struct atomisp_in_fmt_conv atomisp_in_fmt_conv[] = {
 	{}
 };
 
-static const struct {
-	u32 code;
-	u32 compressed;
-} compressed_codes[] = {
-	{ MEDIA_BUS_FMT_SBGGR10_1X10, MEDIA_BUS_FMT_SBGGR10_DPCM8_1X8 },
-	{ MEDIA_BUS_FMT_SGBRG10_1X10, MEDIA_BUS_FMT_SGBRG10_DPCM8_1X8 },
-	{ MEDIA_BUS_FMT_SGRBG10_1X10, MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8 },
-	{ MEDIA_BUS_FMT_SRGGB10_1X10, MEDIA_BUS_FMT_SRGGB10_DPCM8_1X8 },
-};
-
-u32 atomisp_subdev_uncompressed_code(u32 code)
-{
-	unsigned int i;
-
-	for (i = 0; i < ARRAY_SIZE(compressed_codes); i++)
-		if (code == compressed_codes[i].compressed)
-			return compressed_codes[i].code;
-
-	return code;
-}
-
-bool atomisp_subdev_is_compressed(u32 code)
-{
-	int i;
-
-	for (i = 0; i < ARRAY_SIZE(atomisp_in_fmt_conv) - 1; i++)
-		if (code == atomisp_in_fmt_conv[i].code)
-			return atomisp_in_fmt_conv[i].bpp !=
-			       atomisp_in_fmt_conv[i].depth;
-
-	return false;
-}
-
 const struct atomisp_in_fmt_conv *atomisp_find_in_fmt_conv(u32 code)
 {
 	int i;
diff --git a/drivers/staging/media/atomisp/pci/atomisp_subdev.h b/drivers/staging/media/atomisp/pci/atomisp_subdev.h
index b12bb65be3f2..b399319ae2c9 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_subdev.h
+++ b/drivers/staging/media/atomisp/pci/atomisp_subdev.h
@@ -296,8 +296,6 @@ struct atomisp_sub_device {
 
 extern const struct atomisp_in_fmt_conv atomisp_in_fmt_conv[];
 
-u32 atomisp_subdev_uncompressed_code(u32 code);
-bool atomisp_subdev_is_compressed(u32 code);
 const struct atomisp_in_fmt_conv *atomisp_find_in_fmt_conv(u32 code);
 
 /* ISP2400 */
@@ -309,7 +307,6 @@ const struct atomisp_in_fmt_conv
 *atomisp_find_in_fmt_conv_by_atomisp_in_fmt(enum atomisp_input_format
 	atomisp_in_fmt);
 
-const struct atomisp_in_fmt_conv *atomisp_find_in_fmt_conv_compressed(u32 code);
 bool atomisp_subdev_format_conversion(struct atomisp_sub_device *asd);
 
 /* Get pointer to appropriate format */
-- 
2.53.0


      reply	other threads:[~2026-04-24 13:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260420032701.33250-1-debjeetbanerjee48@gmail.com>
2026-04-20  4:34 ` [PATCH v2] staging: media: atomisp: csi2: Fix DPCM decompression for source pad format Debjeet Banerjee
2026-04-20  6:46   ` Andy Shevchenko
2026-04-20  7:42     ` Debjeet Banerjee
2026-04-21  8:22     ` [PATCH v3] " Debjeet Banerjee
2026-04-22 10:46       ` Sakari Ailus
2026-04-22 11:16         ` Debjeet Banerjee
2026-04-22 11:18           ` Sakari Ailus
2026-04-22 12:20             ` [PATCH v4 1/2] media: atomisp: csi2: Remove unimplemented DPCM decompression Debjeet Banerjee
2026-04-22 12:20               ` [PATCH v4 2/2] media: atomisp: Remove unused DPCM helper functions and declarations Debjeet Banerjee
2026-04-22 12:38               ` [PATCH v4 1/2] media: atomisp: csi2: Remove unimplemented DPCM decompression Sakari Ailus
2026-04-22 12:48                 ` [PATCH v3] media: atomisp: csi2: Fix DPCM decompression for source pad format Debjeet Banerjee
2026-04-22 12:51                 ` [PATCH v4 1/2] media: atomisp: csi2: Remove unimplemented DPCM decompression Debjeet Banerjee
2026-04-22 12:58                   ` Sakari Ailus
2026-04-22 13:38                     ` Debjeet Banerjee
2026-04-23 12:52                     ` [PATCH v5 " Debjeet Banerjee
2026-04-23 12:52                       ` [PATCH v5 2/2] media: atomisp: Remove unused DPCM helper functions and declarations Debjeet Banerjee
2026-04-23 21:05                       ` [PATCH v5 1/2] media: atomisp: csi2: Remove unimplemented DPCM decompression Sakari Ailus
2026-04-24 13:04                         ` Debjeet Banerjee [this message]

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=20260424130428.27019-1-debjeetbanerjee48@gmail.com \
    --to=debjeetbanerjee48@gmail.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=andy@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hansg@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.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