Skip to content

Commit e09b036

Browse files
pinchartlHans Verkuil
authored andcommitted
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 <[email protected]> Reviewed-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
1 parent 1126d89 commit e09b036

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -309,17 +309,17 @@ static void rkisp1_rsz_config(struct rkisp1_resizer *rsz,
309309
src_c.width = src_y.width / src_yuv_info->hdiv;
310310
src_c.height = src_y.height / src_yuv_info->vdiv;
311311

312+
dev_dbg(rsz->rkisp1->dev,
313+
"stream %u rsz/scale: Y %ux%u -> %ux%u, CbCr %ux%u -> %ux%u\n",
314+
rsz->id, sink_y->width, sink_y->height,
315+
src_fmt->width, src_fmt->height,
316+
sink_c.width, sink_c.height, src_c.width, src_c.height);
317+
312318
if (sink_c.width == src_c.width && sink_c.height == src_c.height) {
313319
rkisp1_rsz_disable(rsz, when);
314320
return;
315321
}
316322

317-
dev_dbg(rsz->rkisp1->dev, "stream %d rsz/scale: %dx%d -> %dx%d\n",
318-
rsz->id, sink_y->width, sink_y->height,
319-
src_fmt->width, src_fmt->height);
320-
dev_dbg(rsz->rkisp1->dev, "chroma scaling %dx%d -> %dx%d\n",
321-
sink_c.width, sink_c.height, src_c.width, src_c.height);
322-
323323
/* set values in the hw */
324324
rkisp1_rsz_config_regs(rsz, sink_y, &sink_c, &src_y, &src_c, when);
325325
}

0 commit comments

Comments
 (0)