[PATCH v5 2/2] media: atomisp: Remove unused DPCM helper functions and declarations

From: Debjeet Banerjee

Date: Thu Apr 23 2026 - 08:57:53 EST


Remove the DPCM-related helper functions and data structures that are no
longer used after simplifying the CSI2 source pad format handling:

- atomisp_subdev_uncompressed_code() function
- atomisp_subdev_is_compressed() function
- atomisp_find_in_fmt_conv_compressed() declaration
- compressed_codes[] array from atomisp_subdev.c

Since the driver does not support DPCM decompression, these functions
were dead code and have been removed to clean up the codebase.

Signed-off-by: Debjeet Banerjee <debjeetbanerjee48@xxxxxxxxx>
---
.../media/atomisp/pci/atomisp_subdev.c | 33 -------------------
.../media/atomisp/pci/atomisp_subdev.h | 3 --
2 files changed, 36 deletions(-)

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