media: atomisp: move a debug printf to a better place
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 4 Nov 2021 11:20:37 +0000 (11:20 +0000)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 15 Nov 2021 08:11:45 +0000 (08:11 +0000)
The sensor width/height report is alread being printed after
its calculus. The only reason for an extra debug printk is
when dis is used. So, change its message to reflect and move
it to be inside the if checks.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_cmd.c

index feb75491a273620eb7a090433ebb7467af5ae952..76c9e89afb484d5ffbdf2888d84bf7eb023ff076 100644 (file)
@@ -5583,6 +5583,10 @@ static int atomisp_set_fmt_to_snr(struct video_device *vdev,
                                       pad, set_fmt, &pad_state, &vformat);
                if (ret)
                        return ret;
+
+               dev_dbg(isp->dev, "video dis: sensor width: %d, height: %d\n",
+                       ffmt->width, ffmt->height);
+
                if (ffmt->width < req_ffmt->width ||
                    ffmt->height < req_ffmt->height) {
                        req_ffmt->height -= dvs_env_h;
@@ -5593,8 +5597,6 @@ static int atomisp_set_fmt_to_snr(struct video_device *vdev,
                        asd->params.video_dis_en = false;
                }
        }
-       dev_dbg(isp->dev, "sensor width: %d, height: %d\n",
-               ffmt->width, ffmt->height);
        vformat.which = V4L2_SUBDEV_FORMAT_ACTIVE;
        ret = v4l2_subdev_call(isp->inputs[asd->input_curr].camera, pad,
                               set_fmt, NULL, &vformat);