* [PATCH v2] staging: media: atomisp: csi2: Fix DPCM decompression for source pad format
[not found] <20260420032701.33250-1-debjeetbanerjee48@gmail.com>
@ 2026-04-20 4:34 ` Debjeet Banerjee
2026-04-20 6:46 ` Andy Shevchenko
0 siblings, 1 reply; 14+ messages in thread
From: Debjeet Banerjee @ 2026-04-20 4:34 UTC (permalink / raw)
To: hansg, mchehab, gregkh
Cc: andy, sakari.ailus, debjeetbanerjee48, linux-media, linux-kernel,
linux-staging
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. This was marked with a FIXME comment.
When a sensor transmits DPCM-compressed data over MIPI CSI-2 (e.g.
MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8), the Atom ISP hardware decompresses it
before passing it to the ISP pipeline. Therefore the source pad must
expose the uncompressed format (e.g. MEDIA_BUS_FMT_SGRBG10_1X10), not
the compressed one.
atomisp_subdev_uncompressed_code() already implements this mapping via
the compressed_codes[] table in atomisp_subdev.c, which pairs each
DPCM mbus code with its uncompressed counterpart. For codes that are not
DPCM-compressed, the function returns the code unchanged, so this change
is a no-op for all non-DPCM formats.
Signed-off-by: Debjeet Banerjee <debjeetbanerjee48@gmail.com>
---
v2:
- Rebased onto latest media tree (fix CI apply failure)
- Fix missing linux-staging recipient (typo in v1)
- Fix indentation
---
drivers/staging/media/atomisp/pci/atomisp_csi2.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/atomisp_csi2.c b/drivers/staging/media/atomisp/pci/atomisp_csi2.c
index 95b9113d75e9..e723304bec80 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_csi2.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_csi2.c
@@ -107,10 +107,17 @@ 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);
-
+ /*
+ * The source pad must expose the uncompressed format even when the sink
+ * pad receives DPCM-compressed data. The hardware decompresses DPCM
+ * (e.g. SGRBG10_DPCM8_1X8 -> SGRBG10_1X10) between sink and source,
+ * so propagate the sink format but map the mbus code to its uncompressed
+ * equivalent. atomisp_subdev_uncompressed_code() returns the code
+ * unchanged for formats that are not DPCM-compressed.
+ */
+ *actual_ffmt = *__csi2_get_format(csi2, sd_state, which, CSI2_PAD_SINK);
+ actual_ffmt->code = atomisp_subdev_uncompressed_code(actual_ffmt->code);
+ *ffmt = *actual_ffmt;
return 0;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v2] staging: media: atomisp: csi2: Fix DPCM decompression for source pad format
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
0 siblings, 2 replies; 14+ messages in thread
From: Andy Shevchenko @ 2026-04-20 6:46 UTC (permalink / raw)
To: Debjeet Banerjee
Cc: hansg, mchehab, gregkh, andy, sakari.ailus, linux-media,
linux-kernel, linux-staging
On Mon, Apr 20, 2026 at 7:35 AM Debjeet Banerjee
<debjeetbanerjee48@gmail.com> wrote:
>
> 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. This was marked with a FIXME comment.
>
> When a sensor transmits DPCM-compressed data over MIPI CSI-2 (e.g.
> MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8), the Atom ISP hardware decompresses it
> before passing it to the ISP pipeline. Therefore the source pad must
> expose the uncompressed format (e.g. MEDIA_BUS_FMT_SGRBG10_1X10), not
> the compressed one.
>
> atomisp_subdev_uncompressed_code() already implements this mapping via
> the compressed_codes[] table in atomisp_subdev.c, which pairs each
> DPCM mbus code with its uncompressed counterpart. For codes that are not
> DPCM-compressed, the function returns the code unchanged, so this change
> is a no-op for all non-DPCM formats.
No, please spend your time first on learning the process. When sending
patches like this, do not rush with the new versions, keep at least
24h distance between them.
...
Also, drop the "staging:" prefix from the Subject.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2] staging: media: atomisp: csi2: Fix DPCM decompression for source pad format
2026-04-20 6:46 ` Andy Shevchenko
@ 2026-04-20 7:42 ` Debjeet Banerjee
2026-04-21 8:22 ` [PATCH v3] " Debjeet Banerjee
1 sibling, 0 replies; 14+ messages in thread
From: Debjeet Banerjee @ 2026-04-20 7:42 UTC (permalink / raw)
To: andy.shevchenko
Cc: hansg, mchehab, gregkh, andy, sakari.ailus, linux-media,
linux-kernel, linux-staging
On Mon, Apr 20, 2026 at 09:46:39AM +0300, Andy Shevchenko wrote:
> No, please spend your time first on learning the process. When sending
> patches like this, do not rush with the new versions, keep at least
> 24h distance between them.
Thank you for the guidance. I will follow the 24h interval before sending the next version.
> Also, drop the "staging:" prefix from the Subject.
Understood, I will remove the "staging:" prefix in v3.
Regards,
Debjeet Banerjee
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v3] media: atomisp: csi2: Fix DPCM decompression for source pad format
2026-04-20 6:46 ` Andy Shevchenko
2026-04-20 7:42 ` Debjeet Banerjee
@ 2026-04-21 8:22 ` Debjeet Banerjee
2026-04-22 10:46 ` Sakari Ailus
1 sibling, 1 reply; 14+ messages in thread
From: Debjeet Banerjee @ 2026-04-21 8:22 UTC (permalink / raw)
To: andy.shevchenko, hansg, mchehab, gregkh
Cc: andy, sakari.ailus, linux-media, linux-kernel, linux-staging,
debjeetbanerjee48
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. This was marked with a FIXME comment.
When a sensor transmits DPCM-compressed data over MIPI CSI-2 (e.g.
MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8), the Atom ISP hardware decompresses it
before passing it to the ISP pipeline. Therefore the source pad must
expose the uncompressed format (e.g. MEDIA_BUS_FMT_SGRBG10_1X10), not
the compressed one.
atomisp_subdev_uncompressed_code() already implements this mapping via
the compressed_codes[] table in atomisp_subdev.c, which pairs each
DPCM mbus code with its uncompressed counterpart. For codes that are not
DPCM-compressed, the function returns the code unchanged, so this change
is a no-op for all non-DPCM formats.
Signed-off-by: Debjeet Banerjee <debjeetbanerjee48@gmail.com>
---
v3:
- Drop "staging:" prefix in subject (per Andy Shevchenko)
v2:
- Rebased onto latest media tree (fix CI apply failure)
- Fix missing linux-staging recipient (typo in v1)
- Fix indentation
---
drivers/staging/media/atomisp/pci/atomisp_csi2.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/atomisp_csi2.c b/drivers/staging/media/atomisp/pci/atomisp_csi2.c
index 95b9113d75e9..e723304bec80 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_csi2.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_csi2.c
@@ -107,10 +107,17 @@ 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);
-
+ /*
+ * The source pad must expose the uncompressed format even when the sink
+ * pad receives DPCM-compressed data. The hardware decompresses DPCM
+ * (e.g. SGRBG10_DPCM8_1X8 -> SGRBG10_1X10) between sink and source,
+ * so propagate the sink format but map the mbus code to its uncompressed
+ * equivalent. atomisp_subdev_uncompressed_code() returns the code
+ * unchanged for formats that are not DPCM-compressed.
+ */
+ *actual_ffmt = *__csi2_get_format(csi2, sd_state, which, CSI2_PAD_SINK);
+ actual_ffmt->code = atomisp_subdev_uncompressed_code(actual_ffmt->code);
+ *ffmt = *actual_ffmt;
return 0;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v3] media: atomisp: csi2: Fix DPCM decompression for source pad format
2026-04-21 8:22 ` [PATCH v3] " Debjeet Banerjee
@ 2026-04-22 10:46 ` Sakari Ailus
2026-04-22 11:16 ` Debjeet Banerjee
0 siblings, 1 reply; 14+ messages in thread
From: Sakari Ailus @ 2026-04-22 10:46 UTC (permalink / raw)
To: Debjeet Banerjee
Cc: andy.shevchenko, hansg, mchehab, gregkh, andy, linux-media,
linux-kernel, linux-staging
Hi Debjeet,
On Tue, Apr 21, 2026 at 01:52:11PM +0530, Debjeet Banerjee wrote:
> 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. This was marked with a FIXME comment.
>
> When a sensor transmits DPCM-compressed data over MIPI CSI-2 (e.g.
> MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8), the Atom ISP hardware decompresses it
> before passing it to the ISP pipeline. Therefore the source pad must
> expose the uncompressed format (e.g. MEDIA_BUS_FMT_SGRBG10_1X10), not
> the compressed one.
>
> atomisp_subdev_uncompressed_code() already implements this mapping via
> the compressed_codes[] table in atomisp_subdev.c, which pairs each
> DPCM mbus code with its uncompressed counterpart. For codes that are not
> DPCM-compressed, the function returns the code unchanged, so this change
> is a no-op for all non-DPCM formats.
>
> Signed-off-by: Debjeet Banerjee <debjeetbanerjee48@gmail.com>
> ---
> v3:
> - Drop "staging:" prefix in subject (per Andy Shevchenko)
>
> v2:
> - Rebased onto latest media tree (fix CI apply failure)
> - Fix missing linux-staging recipient (typo in v1)
> - Fix indentation
> ---
> drivers/staging/media/atomisp/pci/atomisp_csi2.c | 15 +++++++++++----
> 1 file changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/media/atomisp/pci/atomisp_csi2.c b/drivers/staging/media/atomisp/pci/atomisp_csi2.c
> index 95b9113d75e9..e723304bec80 100644
> --- a/drivers/staging/media/atomisp/pci/atomisp_csi2.c
> +++ b/drivers/staging/media/atomisp/pci/atomisp_csi2.c
> @@ -107,10 +107,17 @@ 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);
> -
> + /*
> + * The source pad must expose the uncompressed format even when the sink
> + * pad receives DPCM-compressed data. The hardware decompresses DPCM
> + * (e.g. SGRBG10_DPCM8_1X8 -> SGRBG10_1X10) between sink and source,
> + * so propagate the sink format but map the mbus code to its uncompressed
> + * equivalent. atomisp_subdev_uncompressed_code() returns the code
> + * unchanged for formats that are not DPCM-compressed.
It may well be but the rest of the driver doesn't appear to support DPCM
uncompression. Rather than trying to pretend it does, I'd instead just
remove any references to it.
> + */
> + *actual_ffmt = *__csi2_get_format(csi2, sd_state, which, CSI2_PAD_SINK);
> + actual_ffmt->code = atomisp_subdev_uncompressed_code(actual_ffmt->code);
> + *ffmt = *actual_ffmt;
> return 0;
> }
>
--
Regards,
Sakari Ailus
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3] media: atomisp: csi2: Fix DPCM decompression for source pad format
2026-04-22 10:46 ` Sakari Ailus
@ 2026-04-22 11:16 ` Debjeet Banerjee
2026-04-22 11:18 ` Sakari Ailus
0 siblings, 1 reply; 14+ messages in thread
From: Debjeet Banerjee @ 2026-04-22 11:16 UTC (permalink / raw)
To: sakari.ailus
Cc: andy.shevchenko, andy, debjeetbanerjee48, gregkh, hansg,
linux-kernel, linux-media, linux-staging, mchehab
On Wed, Apr 22, 2026 at 01:46:33PM +0300, Sakari Ailus wrote:
> It may well be but the rest of the driver doesn't appear to support DPCM
> uncompression. Rather than trying to pretend it does, I'd instead just
> remove any references to it.
Thanks for the feedback Sakari.
So if I understand correctly, the right fix here is to remove all the
DPCM-related dead code: compressed_codes[], atomisp_subdev_uncompressed_code(),
atomisp_subdev_is_compressed(), and atomisp_find_in_fmt_conv_compressed()
declaration
And in atomisp_csi2.c just keep the source pad copying the sink format as before,
but drop the FIXME comment since we're explicitly acknowledging DPCM is not supported?
Please let me know if I'm on the right track before I send v4 of this patch.
Regards,
Debjeet
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3] media: atomisp: csi2: Fix DPCM decompression for source pad format
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
0 siblings, 1 reply; 14+ messages in thread
From: Sakari Ailus @ 2026-04-22 11:18 UTC (permalink / raw)
To: Debjeet Banerjee
Cc: andy.shevchenko, andy, gregkh, hansg, linux-kernel, linux-media,
linux-staging, mchehab
Hi Dabjeet,
On Wed, Apr 22, 2026 at 04:46:49PM +0530, Debjeet Banerjee wrote:
> On Wed, Apr 22, 2026 at 01:46:33PM +0300, Sakari Ailus wrote:
> > It may well be but the rest of the driver doesn't appear to support DPCM
> > uncompression. Rather than trying to pretend it does, I'd instead just
> > remove any references to it.
>
> Thanks for the feedback Sakari.
>
> So if I understand correctly, the right fix here is to remove all the
> DPCM-related dead code: compressed_codes[], atomisp_subdev_uncompressed_code(),
> atomisp_subdev_is_compressed(), and atomisp_find_in_fmt_conv_compressed()
> declaration
>
> And in atomisp_csi2.c just keep the source pad copying the sink format as before,
> but drop the FIXME comment since we're explicitly acknowledging DPCM is not supported?
>
> Please let me know if I'm on the right track before I send v4 of this patch.
That's how it looks like to me, too.
--
Regards,
Sakari Ailus
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v4 1/2] media: atomisp: csi2: Remove unimplemented DPCM decompression
2026-04-22 11:18 ` Sakari Ailus
@ 2026-04-22 12:20 ` 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
0 siblings, 2 replies; 14+ messages in thread
From: Debjeet Banerjee @ 2026-04-22 12:20 UTC (permalink / raw)
To: sakari.ailus
Cc: andy.shevchenko, andy, debjeetbanerjee48, gregkh, hansg,
linux-kernel, linux-media, linux-staging, mchehab
The source pad format handling attempted to map DPCM-compressed mbus
codes to their uncompressed equivalents. However, the rest of the
driver does not support DPCM decompression, making this dead code.
Remove the DPCM unmapping logic and simplify to directly copy the sink
pad format to the source pad. Add an explicit comment stating that
DPCM is not supported.
Signed-off-by: Debjeet Banerjee <debjeetbanerjee48@gmail.com>
---
v4:
- Complete removal of DPCM decompression attempt (per Sakari Ailus feedback)
- 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 (per Andy Shevchenko)
v2:
- Rebased onto latest media tree (fix CI apply failure)
- Fix missing linux-staging recipient (typo in v1)
- Fix indentation
---
drivers/staging/media/atomisp/pci/atomisp_csi2.c | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/atomisp_csi2.c b/drivers/staging/media/atomisp/pci/atomisp_csi2.c
index e723304bec80..64419c1a805e 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_csi2.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_csi2.c
@@ -107,17 +107,10 @@ int atomisp_csi2_set_ffmt(struct v4l2_subdev *sd,
&tmp_ffmt);
}
- /*
- * The source pad must expose the uncompressed format even when the sink
- * pad receives DPCM-compressed data. The hardware decompresses DPCM
- * (e.g. SGRBG10_DPCM8_1X8 -> SGRBG10_1X10) between sink and source,
- * so propagate the sink format but map the mbus code to its uncompressed
- * equivalent. atomisp_subdev_uncompressed_code() returns the code
- * unchanged for formats that are not DPCM-compressed.
- */
- *actual_ffmt = *__csi2_get_format(csi2, sd_state, which, CSI2_PAD_SINK);
- actual_ffmt->code = atomisp_subdev_uncompressed_code(actual_ffmt->code);
- *ffmt = *actual_ffmt;
+ /* Source pad format is copied from sink pad. DPCM is not supported. */
+ *actual_ffmt = *ffmt = *__csi2_get_format(csi2, sd_state, which,
+ CSI2_PAD_SINK);
+
return 0;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v4 2/2] media: atomisp: Remove unused DPCM helper functions and declarations
2026-04-22 12:20 ` [PATCH v4 1/2] media: atomisp: csi2: Remove unimplemented DPCM decompression Debjeet Banerjee
@ 2026-04-22 12:20 ` Debjeet Banerjee
2026-04-22 12:38 ` [PATCH v4 1/2] media: atomisp: csi2: Remove unimplemented DPCM decompression Sakari Ailus
1 sibling, 0 replies; 14+ messages in thread
From: Debjeet Banerjee @ 2026-04-22 12:20 UTC (permalink / raw)
To: sakari.ailus
Cc: andy.shevchenko, andy, debjeetbanerjee48, gregkh, hansg,
linux-kernel, linux-media, linux-staging, mchehab
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@gmail.com>
---
.../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 3d56ca83ecb7..ec5d3d7d7700 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 e1d0168cb91d..a8d3ddeda3bf 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
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v4 1/2] media: atomisp: csi2: Remove unimplemented DPCM decompression
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 ` 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
1 sibling, 2 replies; 14+ messages in thread
From: Sakari Ailus @ 2026-04-22 12:38 UTC (permalink / raw)
To: Debjeet Banerjee
Cc: andy.shevchenko, andy, gregkh, hansg, linux-kernel, linux-media,
linux-staging, mchehab
Hi Debjeet,
On Wed, Apr 22, 2026 at 05:50:05PM +0530, Debjeet Banerjee wrote:
> The source pad format handling attempted to map DPCM-compressed mbus
> codes to their uncompressed equivalents. However, the rest of the
> driver does not support DPCM decompression, making this dead code.
>
> Remove the DPCM unmapping logic and simplify to directly copy the sink
> pad format to the source pad. Add an explicit comment stating that
> DPCM is not supported.
>
> Signed-off-by: Debjeet Banerjee <debjeetbanerjee48@gmail.com>
> ---
> v4:
> - Complete removal of DPCM decompression attempt (per Sakari Ailus feedback)
> - 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 (per Andy Shevchenko)
>
> v2:
> - Rebased onto latest media tree (fix CI apply failure)
> - Fix missing linux-staging recipient (typo in v1)
> - Fix indentation
> ---
> drivers/staging/media/atomisp/pci/atomisp_csi2.c | 15 ++++-----------
> 1 file changed, 4 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/staging/media/atomisp/pci/atomisp_csi2.c b/drivers/staging/media/atomisp/pci/atomisp_csi2.c
> index e723304bec80..64419c1a805e 100644
> --- a/drivers/staging/media/atomisp/pci/atomisp_csi2.c
> +++ b/drivers/staging/media/atomisp/pci/atomisp_csi2.c
> @@ -107,17 +107,10 @@ int atomisp_csi2_set_ffmt(struct v4l2_subdev *sd,
> &tmp_ffmt);
> }
>
> - /*
> - * The source pad must expose the uncompressed format even when the sink
> - * pad receives DPCM-compressed data. The hardware decompresses DPCM
> - * (e.g. SGRBG10_DPCM8_1X8 -> SGRBG10_1X10) between sink and source,
> - * so propagate the sink format but map the mbus code to its uncompressed
> - * equivalent. atomisp_subdev_uncompressed_code() returns the code
> - * unchanged for formats that are not DPCM-compressed.
> - */
> - *actual_ffmt = *__csi2_get_format(csi2, sd_state, which, CSI2_PAD_SINK);
> - actual_ffmt->code = atomisp_subdev_uncompressed_code(actual_ffmt->code);
> - *ffmt = *actual_ffmt;
This won't apply to my atomisp branch.
> + /* Source pad format is copied from sink pad. DPCM is not supported. */
> + *actual_ffmt = *ffmt = *__csi2_get_format(csi2, sd_state, which,
> + CSI2_PAD_SINK);
> +
> return 0;
> }
>
--
Regards,
Sakari Ailus
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3] media: atomisp: csi2: Fix DPCM decompression for source pad format
2026-04-22 12:38 ` [PATCH v4 1/2] media: atomisp: csi2: Remove unimplemented DPCM decompression Sakari Ailus
@ 2026-04-22 12:48 ` Debjeet Banerjee
2026-04-22 12:51 ` [PATCH v4 1/2] media: atomisp: csi2: Remove unimplemented DPCM decompression Debjeet Banerjee
1 sibling, 0 replies; 14+ messages in thread
From: Debjeet Banerjee @ 2026-04-22 12:48 UTC (permalink / raw)
To: sakari.ailus
Cc: andy.shevchenko, andy, debjeetbanerjee48, gregkh, hansg,
linux-kernel, linux-media, linux-staging, mchehab
On Wed, 22 Apr 2026 15:38:36 +0300, Sakari Ailus wrote:
> This won't apply to my atomisp branch.
I see the issue, it's because of the indentation problem that happened becuase of my IDE.
Should i send a patch v5 with the indentation fixed right now?
Regards,
Debjeet
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v4 1/2] media: atomisp: csi2: Remove unimplemented DPCM decompression
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 ` Debjeet Banerjee
2026-04-22 12:58 ` Sakari Ailus
1 sibling, 1 reply; 14+ messages in thread
From: Debjeet Banerjee @ 2026-04-22 12:51 UTC (permalink / raw)
To: sakari.ailus
Cc: andy.shevchenko, andy, debjeetbanerjee48, gregkh, hansg,
linux-kernel, linux-media, linux-staging, mchehab
Disregard my last reply, apologies for my mistake on the subject.
On Wed, 22 Apr 2026 15:38:36 +0300, Sakari Ailus wrote:
> This won't apply to my atomisp branch.
I see the issue, it's because of the indentation problem that happened becuase of my IDE.
Should i send a patch v5 with the indentation fixed right now?
Regards,
Debjeet
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v4 1/2] media: atomisp: csi2: Remove unimplemented DPCM decompression
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
0 siblings, 1 reply; 14+ messages in thread
From: Sakari Ailus @ 2026-04-22 12:58 UTC (permalink / raw)
To: Debjeet Banerjee
Cc: andy.shevchenko, andy, gregkh, hansg, linux-kernel, linux-media,
linux-staging, mchehab
On Wed, Apr 22, 2026 at 06:21:15PM +0530, Debjeet Banerjee wrote:
> Disregard my last reply, apologies for my mistake on the subject.
>
> On Wed, 22 Apr 2026 15:38:36 +0300, Sakari Ailus wrote:
> > This won't apply to my atomisp branch.
>
> I see the issue, it's because of the indentation problem that happened becuase of my IDE.
> Should i send a patch v5 with the indentation fixed right now?
Can you try rebasing on the atomisp branch first?
--
Sakari Ailus
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v4 1/2] media: atomisp: csi2: Remove unimplemented DPCM decompression
2026-04-22 12:58 ` Sakari Ailus
@ 2026-04-22 13:38 ` Debjeet Banerjee
0 siblings, 0 replies; 14+ messages in thread
From: Debjeet Banerjee @ 2026-04-22 13:38 UTC (permalink / raw)
To: sakari.ailus
Cc: andy.shevchenko, andy, debjeetbanerjee48, gregkh, hansg,
linux-kernel, linux-media, linux-staging, mchehab
Hi Sakari,
I've rebased onto your atomisp branch and generated the v5 patches. Should I send them now?
Regards,
Debjeet
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2026-04-22 13:38 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox