Commit fc890f00 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab
Browse files

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: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarPaul Elder <paul.elder@ideasonboard.com>
Reviewed-by: default avatarDafna Hirschfeld <dafna@fastmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 0f3c2ab2
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -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;
}