From: Fernando Rimoli <fernandorimoli11@gmail.com>
To: Sergey Lebedev <lsa.uz@pm.me>
Cc: Fernando Rimoli <fernandorimoli11@gmail.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Benjamin Mugnier <benjamin.mugnier@foss.st.com>,
Sylvain Petinot <sylvain.petinot@foss.st.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Dan Scally <dan.scally@ideasonboard.com>,
Hans de Goede <hansg@kernel.org>,
Peter Marshall <pm@petermarshall.ca>,
George Neacsu <geocausa@gmail.com>,
"D. Manresa" <dmanresa@gmail.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] media: ipu-bridge: Add the Surface Pro 11 infrared illuminator
Date: Sun, 25 Oct 2026 15:47:41 +0000 [thread overview]
Message-ID: <20261025154743.39801-1-fernandorimoli11@gmail.com> (raw)
In-Reply-To: <20261019162722.25587-5-lsa.uz@pm.me>
Hi Sergey,
On Mon, Oct 19, 2026 at 04:28:11PM +0000, Sergey Lebedev wrote:
> +/* The infrared illuminator, strobed by the VD55G0's GPIO 1 */
> +static const u32 surface_pro_11_ir_gpios[] = { 1 };
> +
> +static const struct ipu_sensor_leds surface_pro_11_ir_leds = {
> + .hid = "SMO55F0",
> + .property = "st,leds",
[...]
> + leds = ipu_bridge_get_leds(cfg);
> + if (leds)
> + sensor->dev_properties[d++] =
> + PROPERTY_ENTRY_U32_ARRAY_LEN(leds->property, leds->gpios,
> + leds->nr_gpios);
The property entry keeps pointers to both its name and its values, and
here both point into the module image: the "st,leds" literal and the
static const surface_pro_11_ir_gpios[]. The bridge never unregisters its
software nodes, on purpose, so that a rebind can reuse them. After rmmod
ipu-bridge both pointers dangle, and a sensor driver probing again reads
freed memory for the property's name and value.
It is the same thing that a20c843c9bc4 ("media: ipu-bridge: Keep the
clock-noncontinuous property name out of rodata") fixed for
clock-noncontinuous, and that D. Manresa's v4 fixes for the
link-frequencies values and the lens-focus name:
https://lore.kernel.org/linux-media/20261010155626.2766298-1-dmanresa@gmail.com/
Following his v4, the name would go in struct ipu_property_names and the
GPIO numbers would be copied into struct ipu_sensor, so that nothing the
node points at lives in the module.
On the same hunk:
> sensor->vcm_ref[0] =
> SOFTWARE_NODE_REFERENCE(&sensor->swnodes[SWNODE_VCM]);
> - sensor->dev_properties[3] =
> + sensor->dev_properties[d++] =
> PROPERTY_ENTRY_REF_ARRAY("lens-focus", sensor->vcm_ref);
Manresa's v4 1/2 changes this same line to use names->lens_focus, so
whichever of the two lands second will need a rebase.
The Surface Pro 9 needs an entry too. Its VD55G0 drives the illuminator
from GPIO 1, as on your machine. Its DMI strings are:
sys_vendor "Microsoft Corporation"
product_name "Surface Pro 9"
I tested it with your driver by having it fall back to GPIO 1 when no
st,leds was found. In a dim room, 640x480 Y8 at exposure 600 and
analogue gain 8, the frame mean goes from 22.0 with led_mode off to 64.7
with it set to flash. There is more on how the series runs on the
Surface Pro 9 in my reply to the cover letter.
Fernando
next prev parent reply other threads:[~2026-10-25 15:47 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-19 16:27 [PATCH 0/4] media: Add the ST VD55G0 global shutter sensor Sergey Lebedev
2026-10-19 16:27 ` [PATCH 1/4] dt-bindings: media: i2c: Add ST VD55G0 camera sensor Sergey Lebedev
2026-10-20 8:27 ` Krzysztof Kozlowski
2026-10-20 9:08 ` Sergey Lebedev
2026-10-19 16:27 ` [PATCH 2/4] media: i2c: Add ST VD55G0 global shutter sensor driver Sergey Lebedev
2026-10-19 18:24 ` George Neacsu
2026-10-19 19:34 ` Sergey Lebedev
2026-10-20 6:44 ` George Neacsu
2026-10-20 8:52 ` Sergey Lebedev
2026-10-20 12:25 ` Benjamin Mugnier
2026-10-20 14:26 ` Sergey Lebedev
2026-10-20 18:10 ` George Neacsu
2026-10-20 18:14 ` Sergey Lebedev
2026-10-21 9:02 ` Benjamin Mugnier
2026-10-21 9:04 ` Benjamin Mugnier
2026-10-21 9:06 ` Sergey Lebedev
2026-10-19 16:28 ` [PATCH 3/4] media: ipu-bridge: Add ST VD55G0 Sergey Lebedev
2026-10-19 16:28 ` [PATCH 4/4] media: ipu-bridge: Add the Surface Pro 11 infrared illuminator Sergey Lebedev
2026-10-25 15:47 ` Fernando Rimoli [this message]
2026-10-25 17:23 ` Sergey Lebedev
2026-10-25 15:51 ` [PATCH 0/4] media: Add the ST VD55G0 global shutter sensor Fernando Rimoli
2026-10-25 17:38 ` Sergey Lebedev
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=20261025154743.39801-1-fernandorimoli11@gmail.com \
--to=fernandorimoli11@gmail.com \
--cc=benjamin.mugnier@foss.st.com \
--cc=dan.scally@ideasonboard.com \
--cc=dmanresa@gmail.com \
--cc=geocausa@gmail.com \
--cc=hansg@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=lsa.uz@pm.me \
--cc=mchehab@kernel.org \
--cc=pm@petermarshall.ca \
--cc=sakari.ailus@linux.intel.com \
--cc=sylvain.petinot@foss.st.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
all inboxes | Powered by JetHome®