linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robert Foss <robert.foss@linaro.org>
To: robert.foss@linaro.org, todor.too@gmail.com, agross@kernel.org,
	bjorn.andersson@linaro.org, mchehab@kernel.org,
	linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Andrey Konovalov <andrey.konovalov@linaro.org>,
	AngeloGioacchino Del Regno <kholk11@gmail.com>
Subject: [PATCH v1 1/4] media: camss: vfe: Don't read hardware version needlessly
Date: Mon, 26 Jul 2021 10:01:10 +0200	[thread overview]
Message-ID: <20210726080113.8378-1-robert.foss@linaro.org> (raw)

vfe_set_power() is invoced a few times, which causes a lot of
VFE HW version prints.

Secondly there is no real reason for calling hw_version_read() from
this location specifically, since it does nothing more than print
the VFE HW version.

A better location for the hw_version_read() call would be somewhere
which is only executed once per VFE unit.

Signed-off-by: Robert Foss <robert.foss@linaro.org>
---
 drivers/media/platform/qcom/camss/camss-vfe.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c b/drivers/media/platform/qcom/camss/camss-vfe.c
index e0f3a36f3f3f..f6e889c1598e 100644
--- a/drivers/media/platform/qcom/camss/camss-vfe.c
+++ b/drivers/media/platform/qcom/camss/camss-vfe.c
@@ -713,8 +713,6 @@ static int vfe_set_power(struct v4l2_subdev *sd, int on)
 		ret = vfe_get(vfe);
 		if (ret < 0)
 			return ret;
-
-		vfe->ops->hw_version_read(vfe, vfe->camss->dev);
 	} else {
 		vfe_put(vfe);
 	}
@@ -1301,6 +1299,7 @@ int msm_vfe_subdev_init(struct camss *camss, struct vfe_device *vfe,
 		return -EINVAL;
 	}
 	vfe->ops->subdev_init(dev, vfe);
+	vfe->ops->hw_version_read(vfe, dev);
 
 	/* Memory */
 
-- 
2.29.2


             reply	other threads:[~2021-07-26  8:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-26  8:01 Robert Foss [this message]
2021-07-26  8:01 ` [PATCH v1 2/4] media: camss: vfe: Decrease priority of of VFE HW version to 'dbg' Robert Foss
2021-07-26  8:01 ` [PATCH v1 3/4] media: camss: vfe: Remove vfe_hw_version_read() argument Robert Foss
2021-07-26  8:01 ` [PATCH v1 4/4] media: camss: vfe: Rework vfe_hw_version_read() function definition Robert Foss
     [not found] ` <CGME20210810214617eucas1p1e007c68c34792a844b6c72dd11d05887@eucas1p1.samsung.com>
2021-08-10 21:46   ` [PATCH v1 1/4] media: camss: vfe: Don't read hardware version needlessly Marek Szyprowski
2021-08-11  7:32     ` Robert Foss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210726080113.8378-1-robert.foss@linaro.org \
    --to=robert.foss@linaro.org \
    --cc=agross@kernel.org \
    --cc=andrey.konovalov@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=kholk11@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=todor.too@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).