summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-06-14 21:10:42 +0200
committerMauro Carvalho Chehab <mchehab@kernel.org>2022-07-17 13:02:04 +0200
commitfc890f00d0d5a5dfac23d119645f44b92f299abf (patch)
tree86c95cf8676368c4631c3225fbdd542133386573 /drivers/media
parentmedia: rkisp1: Make rkisp1_isp_mbus_info common (diff)
downloadlinux-fc890f00d0d5a5dfac23d119645f44b92f299abf.tar.xz
linux-fc890f00d0d5a5dfac23d119645f44b92f299abf.zip
media: rkisp1: cap: Print debug message on failed link validation
When a link validation failure occurs, print a debug message to help diagnosing the cause. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Dafna Hirschfeld <dafna@fastmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c
index 94819e6c23e2..fb14c8aa154c 100644
--- a/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c
+++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c
@@ -1294,8 +1294,16 @@ static int rkisp1_capture_link_validate(struct media_link *link)
if (sd_fmt.format.height != cap->pix.fmt.height ||
sd_fmt.format.width != cap->pix.fmt.width ||
- sd_fmt.format.code != fmt->mbus)
+ sd_fmt.format.code != fmt->mbus) {
+ dev_dbg(cap->rkisp1->dev,
+ "link '%s':%u -> '%s':%u not valid: 0x%04x/%ux%u != 0x%04x/%ux%u\n",
+ link->source->entity->name, link->source->index,
+ link->sink->entity->name, link->sink->index,
+ sd_fmt.format.code, sd_fmt.format.width,
+ sd_fmt.format.height, fmt->mbus, cap->pix.fmt.width,
+ cap->pix.fmt.height);
return -EPIPE;
+ }
return 0;
}