diff mbox series

[v2,7/8] Add debug log info to vfe block init and set clock rate

Message ID 20240624-b4-sc7180-camss-v2-7-0dfecdc50073@gmail.com (mailing list archive)
State New
Headers show
Series Add sc7180 camss subsys support | expand

Commit Message

George Chan via B4 Relay June 23, 2024, 11:22 p.m. UTC
From: George Chan <gchan9527@gmail.com>

Print out missing clock's name when doing msm_vfe_subdev_init().
Also print out min clock rate required at vfe_set_clock_rates().

Signed-off-by: George Chan <gchan9527@gmail.com>
---
 drivers/media/platform/qcom/camss/camss-vfe.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

Bryan O'Donoghue June 24, 2024, 10:15 a.m. UTC | #1
On 24/06/2024 00:22, George Chan via B4 Relay wrote:
> From: George Chan <gchan9527@gmail.com>
> 
> Print out missing clock's name when doing msm_vfe_subdev_init().
> Also print out min clock rate required at vfe_set_clock_rates().
> 
> Signed-off-by: George Chan <gchan9527@gmail.com>
> ---
>   drivers/media/platform/qcom/camss/camss-vfe.c | 7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c b/drivers/media/platform/qcom/camss/camss-vfe.c
> index 05fa1adc1661..fbbf38755c0e 100644
> --- a/drivers/media/platform/qcom/camss/camss-vfe.c
> +++ b/drivers/media/platform/qcom/camss/camss-vfe.c
> @@ -579,7 +579,8 @@ static int vfe_set_clock_rates(struct vfe_device *vfe)
>   
>   			if (j == clock->nfreqs) {
>   				dev_err(dev,
> -					"Pixel clock is too high for VFE");
> +					"Pixel clock(%s) is too high for VFE, at least set to %lld",
> +					 clock->name, min_rate);

Pixel clock %lld Hz is too high for clock %s
>   				return -EINVAL;
>   			}
>   
> @@ -1452,8 +1453,10 @@ int msm_vfe_subdev_init(struct camss *camss, struct vfe_device *vfe,
>   		struct camss_clock *clock = &vfe->clock[i];
>   
>   		clock->clk = devm_clk_get(dev, res->clock[i]);
> -		if (IS_ERR(clock->clk))
> +		if (IS_ERR(clock->clk)) {
> +			dev_err(dev, "missing clk %s", res->clock[i]);
>   			return PTR_ERR(clock->clk);
> +		}
>   
>   		clock->name = res->clock[i];
>   
> 

A bit inconsistent with the messages

stick to "clock %s"

---
bod
diff mbox series

Patch

diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c b/drivers/media/platform/qcom/camss/camss-vfe.c
index 05fa1adc1661..fbbf38755c0e 100644
--- a/drivers/media/platform/qcom/camss/camss-vfe.c
+++ b/drivers/media/platform/qcom/camss/camss-vfe.c
@@ -579,7 +579,8 @@  static int vfe_set_clock_rates(struct vfe_device *vfe)
 
 			if (j == clock->nfreqs) {
 				dev_err(dev,
-					"Pixel clock is too high for VFE");
+					"Pixel clock(%s) is too high for VFE, at least set to %lld",
+					 clock->name, min_rate);
 				return -EINVAL;
 			}
 
@@ -1452,8 +1453,10 @@  int msm_vfe_subdev_init(struct camss *camss, struct vfe_device *vfe,
 		struct camss_clock *clock = &vfe->clock[i];
 
 		clock->clk = devm_clk_get(dev, res->clock[i]);
-		if (IS_ERR(clock->clk))
+		if (IS_ERR(clock->clk)) {
+			dev_err(dev, "missing clk %s", res->clock[i]);
 			return PTR_ERR(clock->clk);
+		}
 
 		clock->name = res->clock[i];