* [PATCH 1/2] media: mali-c55: Fix the resizer source code for RGB bypass
@ 2026-12-05 21:27 David Carlier
2026-12-05 21:27 ` [PATCH 2/2] media: mali-c55: Never match an unset media bus code David Carlier
0 siblings, 1 reply; 2+ messages in thread
From: David Carlier @ 2026-12-05 21:27 UTC (permalink / raw)
To: linux-media
Cc: Daniel Scally, Jacopo Mondi, Mauro Carvalho Chehab, linux-kernel
On the bypass route, the resizer derives its source pad code from the
shifted_code of the ISP format table. That field is zero for
MEDIA_BUS_FMT_RGB202020_1X60, so the capture device fails link
validation with -EPIPE and the documented RGB bypass cannot stream.
RGB data is not downshifted, so report the same code on the source pad.
The issue was found by code inspection with an LLM, build tested only.
Fixes: d5f281f3dd29 ("media: mali-c55: Add Mali-C55 ISP driver")
Cc: stable@vger.kernel.org
Signed-off-by: David Carlier <devnexen@gmail.com>
---
drivers/media/platform/arm/mali-c55/mali-c55-isp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/arm/mali-c55/mali-c55-isp.c b/drivers/media/platform/arm/mali-c55/mali-c55-isp.c
index 8e5175581cfc..da79d9c85f29 100644
--- a/drivers/media/platform/arm/mali-c55/mali-c55-isp.c
+++ b/drivers/media/platform/arm/mali-c55/mali-c55-isp.c
@@ -51,7 +51,8 @@ static const struct mali_c55_isp_format_info mali_c55_isp_fmts[] = {
},
{
.code = MEDIA_BUS_FMT_RGB202020_1X60,
- .shifted_code = 0, /* Not relevant for this format */
+ /* RGB data is not downshifted on the bypass path */
+ .shifted_code = MEDIA_BUS_FMT_RGB202020_1X60,
.order = 0, /* Not relevant for this format */
.bypass = true,
}
--
2.55.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] media: mali-c55: Never match an unset media bus code
2026-12-05 21:27 [PATCH 1/2] media: mali-c55: Fix the resizer source code for RGB bypass David Carlier
@ 2026-12-05 21:27 ` David Carlier
0 siblings, 0 replies; 2+ messages in thread
From: David Carlier @ 2026-12-05 21:27 UTC (permalink / raw)
To: linux-media
Cc: Daniel Scally, Jacopo Mondi, Mauro Carvalho Chehab, linux-kernel
Formats with a single media bus code leave the second mbus_codes[] slot
at zero, so a code of 0 matches all of them. Nothing sets a zero code
anymore, but link validation should not accept one. Reject it up front.
Signed-off-by: David Carlier <devnexen@gmail.com>
---
drivers/media/platform/arm/mali-c55/mali-c55-capture.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/media/platform/arm/mali-c55/mali-c55-capture.c b/drivers/media/platform/arm/mali-c55/mali-c55-capture.c
index d6f155dd5255..0bb85f6bda3e 100644
--- a/drivers/media/platform/arm/mali-c55/mali-c55-capture.c
+++ b/drivers/media/platform/arm/mali-c55/mali-c55-capture.c
@@ -233,6 +233,10 @@ mali_c55_mbus_code_can_produce_fmt(const struct mali_c55_format_info *fmt,
{
unsigned int i;
+ /* Unused mbus_codes[] slots are zero, never match them. */
+ if (!code)
+ return false;
+
for (i = 0; i < ARRAY_SIZE(fmt->mbus_codes); i++) {
if (fmt->mbus_codes[i] == code)
return true;
--
2.55.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-12-05 21:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-05 21:27 [PATCH 1/2] media: mali-c55: Fix the resizer source code for RGB bypass David Carlier
2026-12-05 21:27 ` [PATCH 2/2] media: mali-c55: Never match an unset media bus code David Carlier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox