linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: neil.armstrong@linaro.org
To: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
	Robert Foss <rfoss@kernel.org>, Todor Tomov <todor.too@gmail.com>,
	Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Hans Verkuil <hans.verkuil@cisco.com>
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH 5/9] media: qcom: camss: unconditionally set async notifier of subdevices
Date: Mon, 23 Jun 2025 11:26:31 +0200	[thread overview]
Message-ID: <df889cdc-fda7-409c-a9d5-4f33a59f2b2c@linaro.org> (raw)
In-Reply-To: <20250513142353.2572563-6-vladimir.zapolskiy@linaro.org>

On 13/05/2025 16:23, Vladimir Zapolskiy wrote:
> For sake of simplicity it makes sense to register async notifier
> for all type of subdevices, both CAMSS components and sensors.
> 
> The case of sensors not connected to CAMSS is extraordinary and
> degenerate, it does not deserve any specific optimization.

Could you describe the difference on behavior in this case ? and how
it's still valid ?

Neil

> 
> Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
> ---
>   drivers/media/platform/qcom/camss/camss.c | 30 ++++++-----------------
>   1 file changed, 8 insertions(+), 22 deletions(-)
> 
> diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c
> index 976b70cc6d6a..4e91e4b6ef52 100644
> --- a/drivers/media/platform/qcom/camss/camss.c
> +++ b/drivers/media/platform/qcom/camss/camss.c
> @@ -3556,7 +3556,6 @@ static int camss_probe(struct platform_device *pdev)
>   {
>   	struct device *dev = &pdev->dev;
>   	struct camss *camss;
> -	int num_subdevs;
>   	int ret;
>   
>   	camss = devm_kzalloc(dev, sizeof(*camss), GFP_KERNEL);
> @@ -3627,11 +3626,9 @@ static int camss_probe(struct platform_device *pdev)
>   
>   	pm_runtime_enable(dev);
>   
> -	num_subdevs = camss_of_parse_ports(camss);
> -	if (num_subdevs < 0) {
> -		ret = num_subdevs;
> +	ret = camss_of_parse_ports(camss);
> +	if (ret < 0)
>   		goto err_v4l2_device_unregister;
> -	}
>   
>   	ret = camss_register_entities(camss);
>   	if (ret < 0)
> @@ -3647,23 +3644,12 @@ static int camss_probe(struct platform_device *pdev)
>   		goto err_register_subdevs;
>   	}
>   
> -	if (num_subdevs) {
> -		camss->notifier.ops = &camss_subdev_notifier_ops;
> -
> -		ret = v4l2_async_nf_register(&camss->notifier);
> -		if (ret) {
> -			dev_err(dev,
> -				"Failed to register async subdev nodes: %d\n",
> -				ret);
> -			goto err_media_device_unregister;
> -		}
> -	} else {
> -		ret = v4l2_device_register_subdev_nodes(&camss->v4l2_dev);
> -		if (ret < 0) {
> -			dev_err(dev, "Failed to register subdev nodes: %d\n",
> -				ret);
> -			goto err_media_device_unregister;
> -		}
> +	camss->notifier.ops = &camss_subdev_notifier_ops;
> +	ret = v4l2_async_nf_register(&camss->notifier);
> +	if (ret) {
> +		dev_err(dev,
> +			"Failed to register async subdev nodes: %d\n", ret);
> +		goto err_media_device_unregister;
>   	}
>   
>   	return 0;


  parent reply	other threads:[~2025-06-23  9:26 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-13 14:23 [PATCH 0/9] media: qcom: camss: a number of cleanups and fixes Vladimir Zapolskiy
2025-05-13 14:23 ` [PATCH 1/9] media: qcom: camss: cleanup media device allocated resource on error path Vladimir Zapolskiy
2025-06-13 15:36   ` Bryan O'Donoghue
2025-05-13 14:23 ` [PATCH 2/9] media: qcom: camss: remove duplicated csiphy_formats_sc7280 data Vladimir Zapolskiy
2025-05-13 16:30   ` Bryan O'Donoghue
2025-05-13 14:23 ` [PATCH 3/9] media: qcom: camss: remove .link_entities Vladimir Zapolskiy
2025-05-13 16:29   ` Bryan O'Donoghue
2025-05-13 14:23 ` [PATCH 4/9] media: qcom: camss: register camss media device before subdevices Vladimir Zapolskiy
2025-06-13  9:06   ` Bryan O'Donoghue
2025-06-17 16:14     ` Vladimir Zapolskiy
2025-06-23  9:24       ` neil.armstrong
2025-05-13 14:23 ` [PATCH 5/9] media: qcom: camss: unconditionally set async notifier of subdevices Vladimir Zapolskiy
2025-05-13 15:46   ` Bryan O'Donoghue
2025-05-14 15:16     ` Vladimir Zapolskiy
2025-05-15  9:25     ` Loic Poulain
2025-06-13  9:11   ` Bryan O'Donoghue
2025-06-17 16:22     ` Vladimir Zapolskiy
2025-06-23  9:26   ` neil.armstrong [this message]
2025-05-13 14:23 ` [PATCH 6/9] media: qcom: camss: simplify camss_subdev_notifier_complete() function Vladimir Zapolskiy
2025-06-13  9:13   ` Bryan O'Donoghue
2025-05-13 14:23 ` [PATCH 7/9] media: qcom: camss: change internals of endpoint parsing to fwnode handling Vladimir Zapolskiy
2025-06-13  9:30   ` Bryan O'Donoghue
2025-06-17 16:30     ` Vladimir Zapolskiy
2025-06-23  9:29   ` neil.armstrong
2025-06-23 12:00     ` Vladimir Zapolskiy
2025-05-13 14:23 ` [PATCH 8/9] media: qcom: camss: use a handy v4l2_async_nf_add_fwnode_remote() function Vladimir Zapolskiy
2025-05-13 14:23 ` [PATCH 9/9] MAINTAINERS: add myself as a CAMSS patch reviewer Vladimir Zapolskiy
2025-05-13 15:06   ` Bryan O'Donoghue
2025-06-06 10:52 ` [PATCH 0/9] media: qcom: camss: a number of cleanups and fixes Vladimir Zapolskiy
2025-06-10 17:26 ` Vladimir Zapolskiy
2025-06-10 18:53   ` Bryan O'Donoghue
2025-06-10 21:15     ` Vladimir Zapolskiy

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=df889cdc-fda7-409c-a9d5-4f33a59f2b2c@linaro.org \
    --to=neil.armstrong@linaro.org \
    --cc=bryan.odonoghue@linaro.org \
    --cc=hans.verkuil@cisco.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=rfoss@kernel.org \
    --cc=todor.too@gmail.com \
    --cc=vladimir.zapolskiy@linaro.org \
    /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).