From: Laurent Pinchart Date: Sun, 27 Apr 2025 22:13:32 +0000 (+0300) Subject: media: ccs-pll: Print a debug message when VT tree calculation fails X-Git-Tag: v6.16-rc1~145^2~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac6fb0d8f98810f628e0539f4671d6e71fbf7053;p=thirdparty%2Flinux.git media: ccs-pll: Print a debug message when VT tree calculation fails When the VT tree calculation fails to find a valid pre-divider, the ccs_pll_calculate_vt_tree() function returns an error silently, and the caller doesn't print any message either. This makes debugging PLL calculation issues more difficult. Add a debug message to report the issue, and amend the corresponding message for the OP tree to mention "OP". Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil --- diff --git a/drivers/media/i2c/ccs-pll.c b/drivers/media/i2c/ccs-pll.c index 8f9a695bd9e54..4eb83636e1027 100644 --- a/drivers/media/i2c/ccs-pll.c +++ b/drivers/media/i2c/ccs-pll.c @@ -449,6 +449,7 @@ static int ccs_pll_calculate_vt_tree(struct device *dev, return 0; } + dev_dbg(dev, "unable to compute VT pre_pll divisor\n"); return -EINVAL; } @@ -888,8 +889,7 @@ int ccs_pll_calculate(struct device *dev, const struct ccs_pll_limits *lim, } if (rval) { - dev_dbg(dev, "unable to compute pre_pll divisor\n"); - + dev_dbg(dev, "unable to compute OP pre_pll divisor\n"); return rval; }