[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240910175357.229075-14-prabhakar.mahadev-lad.rj@bp.renesas.com>
Date: Tue, 10 Sep 2024 18:53:54 +0100
From: Prabhakar <prabhakar.csengg@...il.com>
To: Sakari Ailus <sakari.ailus@...ux.intel.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Hans Verkuil <hverkuil-cisco@...all.nl>
Cc: linux-media@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-renesas-soc@...r.kernel.org,
Prabhakar <prabhakar.csengg@...il.com>,
Biju Das <biju.das.jz@...renesas.com>,
Fabrizio Castro <fabrizio.castro.jz@...esas.com>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Subject: [PATCH v2 13/16] media: platform: rzg2l-cru: rzg2l-video: Use rzg2l_cru_ip_code_to_fmt() to validate format
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Utilize `rzg2l_cru_ip_code_to_fmt()` in `rzg2l_cru_mc_validate_format()`
to validate whether the format is supported. This change removes the need
to manually add new entries when a new format is added to the CRU driver,
simplifying the validation process.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
---
drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
index 014c0ff2721b..c32608c557a3 100644
--- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
+++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
@@ -201,12 +201,8 @@ static int rzg2l_cru_mc_validate_format(struct rzg2l_cru_dev *cru,
if (v4l2_subdev_call_state_active(sd, pad, get_fmt, &fmt))
return -EPIPE;
- switch (fmt.format.code) {
- case MEDIA_BUS_FMT_UYVY8_1X16:
- break;
- default:
+ if (!rzg2l_cru_ip_code_to_fmt(fmt.format.code))
return -EPIPE;
- }
switch (fmt.format.field) {
case V4L2_FIELD_TOP:
--
2.34.1
Powered by blists - more mailing lists