mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Loic Poulain <loic.poulain@oss.qualcomm.com>
Cc: Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
	Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] media: qcom: camss: Report hardware version via media controller
Date: Tue, 21 Jul 2026 10:11:38 +0200	[thread overview]
Message-ID: <d96f928b-76b9-424c-905e-500b459dc8d6@oss.qualcomm.com> (raw)
In-Reply-To: <CAFEp6-3m0LesW_QUEPc=wLbBOMXo+YXSSw=5YpZgg3P5wsz3qg@mail.gmail.com>

On 7/21/26 9:55 AM, Loic Poulain wrote:
> On Mon, Jul 20, 2026 at 11:12 AM Konrad Dybcio
> <konrad.dybcio@oss.qualcomm.com> wrote:
>>
>> On 7/17/26 4:20 PM, Loic Poulain wrote:
>>> Populate media_dev.hw_revision with the top-level CAMSS hardware version
>>> so that user space can query the exact hardware variant through the media
>>> controller (e.g. via media-ctl or MEDIA_IOC_DEVICE_INFO). This can help
>>> identify the platform variant and adapt behaviour accordingly, for example
>>> allowing libcamera to apply quirks or enable features that cannot be
>>> discovered through standard V4L2 or media-controller APIs.
>>
>> [...]
>>
>>> +static void camss_read_version(struct camss *camss)
>>> +{
>>> +     u32 hw_version;
>>> +
>>> +     if (!camss->top_base || !camss->res->pm_clks[0])
>>> +             return;
>>> +
>>> +     if (pm_runtime_resume_and_get(camss->dev))
>>> +             return;
>>> +
>>> +     hw_version = readl_relaxed(camss->top_base + CAMSS_HW_VERSION);
>>> +
>>> +     pm_runtime_put_sync(camss->dev);
>>
>> I think non-sync is fine here
> 
> Using asynchronous PM may result in the runtime suspend ("work") never
> being executed if the probe function fails later (read version called
> from probe). From my understanding, a subsequent pm_runtime_disable()
> in the error path would cancel the pending suspend request, leaving
> the runtime PM state in a non-symmetrical (unbalanced) state.

Got it

Konrad

  reply	other threads:[~2026-07-21  8:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-17 14:20 [PATCH 0/4] media: qcom: camss: Report CAMSS " Loic Poulain
2026-07-17 14:20 ` [PATCH 1/4] media: qcom: camss: Add PM clock support and integrate with runtime PM Loic Poulain
2026-07-20 10:10   ` Bryan O'Donoghue
2026-07-30  8:38   ` Bryan O'Donoghue
2026-07-30  9:25     ` Loic Poulain
2026-07-17 14:20 ` [PATCH 2/4] media: qcom: camss: Add PM clock definitions for QCM2290 Loic Poulain
2026-07-20 10:11   ` Bryan O'Donoghue
2026-07-17 14:20 ` [PATCH 3/4] media: qcom: camss: Drop top_ahb/ahb/axi from QCM2290 subdevice clocks Loic Poulain
2026-07-17 14:20 ` [PATCH 4/4] media: qcom: camss: Report hardware version via media controller Loic Poulain
2026-07-20  9:12   ` Konrad Dybcio
2026-07-21  7:55     ` Loic Poulain
2026-07-21  8:11       ` Konrad Dybcio [this message]
2026-07-20 10:16   ` Bryan O'Donoghue

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=d96f928b-76b9-424c-905e-500b459dc8d6@oss.qualcomm.com \
    --to=konrad.dybcio@oss.qualcomm.com \
    --cc=bryan.odonoghue@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=loic.poulain@oss.qualcomm.com \
    --cc=mchehab@kernel.org \
    --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

all inboxes | Powered by JetHome®