]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: aptina-pll: Debug log p1 min and max values
authorHans de Goede <johannes.goede@oss.qualcomm.com>
Tue, 30 Dec 2025 17:02:58 +0000 (18:02 +0100)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Wed, 14 Jan 2026 22:33:04 +0000 (23:33 +0100)
Make aptina_pll_calculate() debug log the calculated p1 min and max values,
this makes it easier to see how the m, n and p1 values were chosen.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/i2c/aptina-pll.c

index b1f89bbf9d473f6ef00ebb8250405018d07e668b..cd2ed4583c97ec87e516acfd249fdccf2f9efbb8 100644 (file)
@@ -129,6 +129,8 @@ int aptina_pll_calculate(struct device *dev,
        p1_max = min(limits->p1_max, limits->out_clock_max * div /
                     (pll->ext_clock * pll->m));
 
+       dev_dbg(dev, "pll: p1 min %u max %u\n", p1_min, p1_max);
+
        for (p1 = p1_max & ~1; p1 >= p1_min; p1 -= 2) {
                unsigned int mf_inc = p1 / gcd(div, p1);
                unsigned int mf_high;