diff options
author | Laurent Pinchart | 2023-09-25 03:20:08 +0300 |
---|---|---|
committer | Hans Verkuil | 2023-10-12 09:46:38 +0200 |
commit | e09b03627643e1f40bfaacf29be0de7df1c8c05d (patch) | |
tree | b8e5c415cf6fa0bb233b9f3f6ca5adecdf3ba5e3 /drivers/media | |
parent | 1126d89f8f54a13e7c5cbee24c414603ee794f10 (diff) |
media: rkisp1: resizer: Improve debug message when configuring resizer
The debug messages that show the resizer configuration are only printed
if the driver enables the resizer. This prevents checking the resizer
configuration when the driver believes it should be disabled. Fix it by
moving the dev_dbg() statements earlier.
Also, combine the two debug prints into a single one to gather all the
information in one place, which makes reading the log easier.
While at it, use %u instead of %d to print unsigned values.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c index 1741ada7032b..92ae2d2e0f12 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c @@ -309,17 +309,17 @@ static void rkisp1_rsz_config(struct rkisp1_resizer *rsz, src_c.width = src_y.width / src_yuv_info->hdiv; src_c.height = src_y.height / src_yuv_info->vdiv; + dev_dbg(rsz->rkisp1->dev, + "stream %u rsz/scale: Y %ux%u -> %ux%u, CbCr %ux%u -> %ux%u\n", + rsz->id, sink_y->width, sink_y->height, + src_fmt->width, src_fmt->height, + sink_c.width, sink_c.height, src_c.width, src_c.height); + if (sink_c.width == src_c.width && sink_c.height == src_c.height) { rkisp1_rsz_disable(rsz, when); return; } - dev_dbg(rsz->rkisp1->dev, "stream %d rsz/scale: %dx%d -> %dx%d\n", - rsz->id, sink_y->width, sink_y->height, - src_fmt->width, src_fmt->height); - dev_dbg(rsz->rkisp1->dev, "chroma scaling %dx%d -> %dx%d\n", - sink_c.width, sink_c.height, src_c.width, src_c.height); - /* set values in the hw */ rkisp1_rsz_config_regs(rsz, sink_y, &sink_c, &src_y, &src_c, when); } |