diff options
| author | Hermes Wu <Hermes.wu@ite.com.tw> | 2026-09-30 14:41:34 +0800 |
|---|---|---|
| committer | Hans Verkuil <hverkuil+cisco@kernel.org> | 2026-09-30 16:51:17 +0200 |
| commit | 61006efc95addca54e88b0a8433a483fa0c41e4b (patch) | |
| tree | 5c2dc24e95035a9df3cc1444aa9361c26c148dc5 /drivers | |
| parent | 2f7dc82ea96ba8d092c5fc783ed394354e80ebfb (diff) | |
media: i2c: it6625: drop the private CSI-format name table
it6625_csi_format_name(), used only by it6625_log_status(), maintains
a driver-local name table for a value V4L2 already exposes as a
media-bus format code. No in-kernel helper converts MEDIA_BUS_FMT_*
codes to printable names, so report the raw media-bus code as %#x
instead. it6625_log_status() now snapshots it6625->mbus_fmt_code
(the value actually used elsewhere as the driver's representation of
the current format) under it6625_lock instead of the separate
csi_format field.
Signed-off-by: Hermes Wu <Hermes.wu@ite.com.tw>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/media/i2c/it6625.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/drivers/media/i2c/it6625.c b/drivers/media/i2c/it6625.c index b888d4db5599..515711057b25 100644 --- a/drivers/media/i2c/it6625.c +++ b/drivers/media/i2c/it6625.c @@ -1369,26 +1369,12 @@ static void it6625_polling_work(struct work_struct *work) it6625_interrupt_handler(it6625); } -static const char *it6625_csi_format_name(u8 csi_format) -{ - switch (csi_format) { - case CSI_YUV422_8b: - return "YUV422 8bit"; - case CSI_RGB888: - return "RGB888 8bit"; - case CSI_YUV444_8b: - return "YUV444 8bit"; - default: - return "unknown"; - } -} - static int it6625_log_status(struct v4l2_subdev *sd) { struct it6625 *it6625 = sd_to_6625(sd); struct v4l2_dv_timings timings, configured_timings; struct v4l2_bt_timings bt; - u8 csi_format; + u32 mbus_fmt_code; if (it6625_get_detected_timings(it6625, &timings)) v4l2_info(sd, "No video detected"); @@ -1402,13 +1388,11 @@ static int it6625_log_status(struct v4l2_subdev *sd) /* snapshot together so the reported pair was actually configured together */ scoped_guard(mutex, &it6625->it6625_lock) { - csi_format = it6625->csi_format; + mbus_fmt_code = it6625->mbus_fmt_code; bt = it6625->timings.bt; } - v4l2_info(sd, "CSI format: %s @ %uHz", - it6625_csi_format_name(csi_format), - fps_from_bt_timings(&bt)); + v4l2_info(sd, "CSI format: %#x @ %uHz", mbus_fmt_code, fps_from_bt_timings(&bt)); it6625_show_avi_infoframe(it6625); |
