summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorSuresh Udipi <sudipi@jp.adit-jv.com>2021-08-13 18:07:55 +0300
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-11-30 13:55:39 +0300
commitebeefe26859ec58c2a8bbb83896f26ebc389a29f (patch)
tree92cc64105587f79ca433a46d97e267db6e728019 /drivers/media
parentcee44d4fbacbbdfe62697ec94e76c6e4f726c5df (diff)
downloadlinux-ebeefe26859ec58c2a8bbb83896f26ebc389a29f.tar.xz
media: rcar-csi2: Add warning for PHY speed less than minimum
Add a warning message when the selected PHY speed is less than supported minimum PHY speed given in the hsfreq table[1]. For raspberry pi camera capture on Kingfisher board with resolution 640x480, the calculated PHY speed is 48 mbps which is less than the minimum PHY speed 80 Mbps from the table[1]. But in this cases capture is successful. [1] specs r19uh0105ej0200-r-car-3rd-generation.pdf [Table 25.9] Signed-off-by: Suresh Udipi <sudipi@jp.adit-jv.com> Signed-off-by: Michael Rodin <mrodin@de.adit-jv.com> Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/rcar-vin/rcar-csi2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/platform/rcar-vin/rcar-csi2.c b/drivers/media/platform/rcar-vin/rcar-csi2.c
index 436b7be96920..db119a002414 100644
--- a/drivers/media/platform/rcar-vin/rcar-csi2.c
+++ b/drivers/media/platform/rcar-vin/rcar-csi2.c
@@ -544,6 +544,10 @@ static int rcsi2_set_phypll(struct rcar_csi2 *priv, unsigned int mbps)
const struct rcsi2_mbps_reg *hsfreq;
const struct rcsi2_mbps_reg *hsfreq_prev = NULL;
+ if (mbps < priv->info->hsfreqrange->mbps)
+ dev_warn(priv->dev, "%u Mbps less than min PHY speed %u Mbps",
+ mbps, priv->info->hsfreqrange->mbps);
+
for (hsfreq = priv->info->hsfreqrange; hsfreq->mbps != 0; hsfreq++) {
if (hsfreq->mbps >= mbps)
break;