Message ID | 20250417065354.311617-11-sakari.ailus@linux.intel.com |
---|---|
State | New |
Headers | show |
Series | CCS PLL fixes and improvements | expand |
Hi Sakari, Thank you for the patch. On Thu, Apr 17, 2025 at 09:53:53AM +0300, Sakari Ailus wrote: > Print the PLL calculator flags right away when the PLL calculator is > called. Previously this was done only in a successful case and that didn't > really help solving a problem when one happened. > > Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > drivers/media/i2c/ccs-pll.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/i2c/ccs-pll.c b/drivers/media/i2c/ccs-pll.c > index fc6f8aff5fd8..8e01be4b0785 100644 > --- a/drivers/media/i2c/ccs-pll.c > +++ b/drivers/media/i2c/ccs-pll.c > @@ -123,8 +123,11 @@ static void print_pll(struct device *dev, const struct ccs_pll *pll) > pll->pixel_rate_pixel_array); > dev_dbg(dev, "pixel rate on CSI-2 bus:\t%u\n", > pll->pixel_rate_csi); > +} > > - dev_dbg(dev, "flags%s%s%s%s%s%s%s%s%s%s%s\n", > +static void print_pll_flags(struct device *dev, struct ccs_pll *pll) > +{ > + dev_dbg(dev, "PLL flags%s%s%s%s%s%s%s%s%s%s%s\n", > pll->flags & PLL_FL(OP_PIX_CLOCK_PER_LANE) ? " op-pix-clock-per-lane" : "", > pll->flags & PLL_FL(NO_OP_CLOCKS) ? " no-op-clocks" : "", > pll->flags & PLL_FL(EVEN_PLL_MULTIPLIER) ? " even-pll-multiplier" : "", > @@ -738,6 +741,8 @@ int ccs_pll_calculate(struct device *dev, const struct ccs_pll_limits *lim, > u32 i; > int rval = -EINVAL; > > + print_pll_flags(dev, pll); > + > if (!(pll->flags & CCS_PLL_FLAG_LANE_SPEED_MODEL)) { > pll->op_lanes = 1; > pll->vt_lanes = 1;
diff --git a/drivers/media/i2c/ccs-pll.c b/drivers/media/i2c/ccs-pll.c index fc6f8aff5fd8..8e01be4b0785 100644 --- a/drivers/media/i2c/ccs-pll.c +++ b/drivers/media/i2c/ccs-pll.c @@ -123,8 +123,11 @@ static void print_pll(struct device *dev, const struct ccs_pll *pll) pll->pixel_rate_pixel_array); dev_dbg(dev, "pixel rate on CSI-2 bus:\t%u\n", pll->pixel_rate_csi); +} - dev_dbg(dev, "flags%s%s%s%s%s%s%s%s%s%s%s\n", +static void print_pll_flags(struct device *dev, struct ccs_pll *pll) +{ + dev_dbg(dev, "PLL flags%s%s%s%s%s%s%s%s%s%s%s\n", pll->flags & PLL_FL(OP_PIX_CLOCK_PER_LANE) ? " op-pix-clock-per-lane" : "", pll->flags & PLL_FL(NO_OP_CLOCKS) ? " no-op-clocks" : "", pll->flags & PLL_FL(EVEN_PLL_MULTIPLIER) ? " even-pll-multiplier" : "", @@ -738,6 +741,8 @@ int ccs_pll_calculate(struct device *dev, const struct ccs_pll_limits *lim, u32 i; int rval = -EINVAL; + print_pll_flags(dev, pll); + if (!(pll->flags & CCS_PLL_FLAG_LANE_SPEED_MODEL)) { pll->op_lanes = 1; pll->vt_lanes = 1;
Print the PLL calculator flags right away when the PLL calculator is called. Previously this was done only in a successful case and that didn't really help solving a problem when one happened. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> --- drivers/media/i2c/ccs-pll.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)