From: Sergey Zagursky <gvozdoder@gmail.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Miguel Vadillo <miguel.vadillo@intel.com>,
Mehdi Djait <mehdi.djait@linux.intel.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: ipu-bridge: do not use the CVS device lookup for IVSC
Date: Wed, 2 Sep 2026 15:57:25 +0100 [thread overview]
Message-ID: <20260902145830.1796405-1-gvozdoder@gmail.com> (raw)
In-Reply-To: <apfI7m2oD-k5GOYN@kekkonen.localdomain>
Sakari Ailus wrote:
> I can confirm there's indeed an issue here. But considering the list
> contains the CVS device HIDs, doesn't it mean you're returning NULL here
> for CVS, i.e. not for IVSC?
acpi_match_device_ids() returns 0 on a match, not a boolean:
int acpi_match_device_ids(struct acpi_device *device,
const struct acpi_device_id *ids)
{
return __acpi_match_device(device, ids, NULL, NULL, NULL) ?
0 : -ENOENT;
}
so the bare "if (acpi_match_device_ids(adev, cvs_acpi_ids))" is true when
adev is *not* in the list, which is the IVSC case. Both spellings are in
tree, e.g. drivers/acpi/scan.c:1800 uses the negated form for "matched"
and drivers/acpi/x86/utils.c:206 the bare one for "did not match".
On this machine adev is INTC10CF, which is not in cvs_acpi_ids[], so the
early return is taken, the IPU6 probe fails with -ENODEV and is retried
once the IVSC device exists. With the polarity you read, IVSC would fall
through to the lookup that returns the driverless INTC10CF:00 platform
device and the camera would stay dead. It does come up, so the code
behaves as the changelog describes.
That said, you had to stop and ask, which says enough about how it reads.
v2 wraps the match in a named helper so the polarity is visible at the
call site:
static bool ipu_bridge_is_cvs_dev(struct acpi_device *adev)
{
return !acpi_match_device_ids(adev, cvs_acpi_ids);
}
if (!ipu_bridge_is_cvs_dev(adev))
return NULL;
No functional change, so I rebuilt it but did not boot it again; the
functional test in v1 stands:
https://lore.kernel.org/linux-media/20260902145440.1786297-1-gvozdoder@gmail.com/
Thanks for the quick review.
next prev parent reply other threads:[~2026-09-02 14:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-01 19:43 [REGRESSION 7.1 -> 7.2] media: ipu-bridge: IVSC camera broken by c6b1b34b5090 ("media: pci: intel: Add CVS support for IPU bridge driver") Sergey Zagursky
2026-09-01 19:50 ` [PATCH] media: ipu-bridge: do not use the CVS device lookup for IVSC Sergey Zagursky
2026-09-02 6:57 ` Sakari Ailus
2026-09-02 14:57 ` Sergey Zagursky [this message]
2026-09-02 19:23 ` Sakari Ailus
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=20260902145830.1796405-1-gvozdoder@gmail.com \
--to=gvozdoder@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=mehdi.djait@linux.intel.com \
--cc=miguel.vadillo@intel.com \
--cc=sakari.ailus@linux.intel.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