Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: Yassine Oudjana <y.oudjana@protonmail.com>,
	Robert Foss <rfoss@kernel.org>, Todor Tomov <todor.too@gmail.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
	Depeng Shao <quic_depengs@quicinc.com>
Cc: Yassine Oudjana <yassine.oudjana@gmail.com>,
	linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: qcom: camss: csiphy-3ph: Make non-Gen2 PHY work again
Date: Tue, 1 Apr 2025 09:40:31 +0100	[thread overview]
Message-ID: <2d2e64cf-2bc9-403d-98ed-c9150d1973c4@linaro.org> (raw)
In-Reply-To: <20250401083329.314863-1-y.oudjana@protonmail.com>

On 01/04/2025 09:33, Yassine Oudjana wrote:
> Commit fbce0ca24c3a ("media: qcom: camss: csiphy-3ph: Move CSIPHY variables
> to data field inside csiphy struct") moved a version check that was
> previously guarded by a check for Gen2 to csiphy_init without moving the
> Gen2 check along with it. Since it was guarded by the Gen2 check, it was
> only handling versions that were Gen2 and returned -ENODEV for others since
> they shouldn't pass the Gen2 check to begin with.
> 
> Check if the CSIPHY is Gen2 before running this version check and assigning
> Gen2 lane regs array.
> 
> Fixes: fbce0ca24c3a ("media: qcom: camss: csiphy-3ph: Move CSIPHY variables to data field inside csiphy struct")
> Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com>
> ---
>   drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c b/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c
> index a6cc957b986e..17762aee6dba 100644
> --- a/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c
> +++ b/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c
> @@ -700,6 +700,9 @@ static int csiphy_init(struct csiphy_device *csiphy)
>   	csiphy->regs = regs;
>   	regs->offset = 0x800;
>   
> +	if (!csiphy_is_gen2(csiphy->camss->res->version))
> +		return 0;
> +
>   	switch (csiphy->camss->res->version) {
>   	case CAMSS_845:
>   		regs->lane_regs = &lane_regs_sdm845[0];

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

      reply	other threads:[~2025-04-01  8:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-01  8:33 [PATCH] media: qcom: camss: csiphy-3ph: Make non-Gen2 PHY work again Yassine Oudjana
2025-04-01  8:40 ` Bryan O'Donoghue [this message]

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=2d2e64cf-2bc9-403d-98ed-c9150d1973c4@linaro.org \
    --to=bryan.odonoghue@linaro.org \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=quic_depengs@quicinc.com \
    --cc=rfoss@kernel.org \
    --cc=todor.too@gmail.com \
    --cc=vladimir.zapolskiy@linaro.org \
    --cc=y.oudjana@protonmail.com \
    --cc=yassine.oudjana@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