Linux Media Controller development
 help / color / mirror / Atom feed
* [PATCH v3 00/12] media: Add Lenovo Yoga Book YB1-X91 camera support
@ 2026-08-27 23:17 Maurizio Casciano
  2026-08-27 23:17 ` [PATCH v3 01/12] media: ov8858: Extract digital gain programming Maurizio Casciano
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Maurizio Casciano @ 2026-08-27 23:17 UTC (permalink / raw)
  To: linux-media
  Cc: Mauro Carvalho Chehab, Sakari Ailus, Bingbu Cao, Jacopo Mondi,
	Nicholas Roth, Andy Shevchenko, Andy Shevchenko, Hans de Goede,
	Greg Kroah-Hartman, Jose Maria Martin, Uwe Kleine-Koenig,
	linux-staging, linux-kernel, Maurizio Casciano

The Lenovo Yoga Book YB1-X91L exposes an OV2740 front sensor and an
OV8858 rear sensor through the Cherry Trail AtomISP. Its firmware does
not provide enough information for the existing sensor and IPU bridge
drivers to construct the complete camera links.

Add the ACPI IDs and bridge data, describe both AtomISP camera links,
support the Yoga Book sensor clocks and modes, expose raw Bayer capture,
add per-channel white-balance controls, and add the WV517S rear-camera
lens actuator.

Raw capture is selected through the normal V4L2 raw pixel formats. There
is no module parameter or separate private ABI. Processed formats retain
the existing behavior, while raw formats expose the complete CSI-2
transport frames required by the ISP2401 copy pipeline.

Changes since v2:

- preserve the OV8858 digital-gain explanation and keep separate helpers
  for the existing long-gain and new manual-white-balance paths;
- move OV2740 gain variables next to their first uses and retain the
  three-control cluster requested during review;
- add a preparatory conversion of atomisp_get_padding() and its callers
  to struct v4l2_area, then use that type throughout the raw-capture
  change;
- deduplicate AtomISP padding parsing with gmin_cfg_get_int(), clean up
  declaration ordering and keep sensor configuration comments adjacent;
- use direct WV517S dependency headers, handle inactive Runtime PM before
  acquiring a reference, use a local device pointer and C99 I2C IDs, and
  place the PM operations beside the resume callback; and
- use <linux/acpi.h> for OV8858 because the media CI base used for v2
  does not provide <linux/device-id/acpi.h>; this caused the v2 bisect,
  x86/x86_64 build, smatch and sparse jobs to fail before compilation.

The tablet DSDT contains the sensor objects requested during review:

    Device (CA11)
    {
        Name (_HID, "INT3477")
        Name (_CID, "OVTI8858")
        Name (_DDN, "OV8858")
    }

    Device (CA01)
    {
        Name (_HID, "OVTI2740")
        Name (_CID, "OVTI2740")
        Name (_DDN, "OV2740")
    }

Pahole reports struct ov2740_mode as 64 bytes, exactly one cacheline,
with no holes or padding. Struct ov8858 is 792 bytes, naturally aligned
to 8 bytes, with 4 bytes of tail padding.

All twelve patches pass strict checkpatch. The touched Media objects at
the exact v3 tip pass W=1 and sparse v0.6.5-rc1. A clean 20-job
bindeb-pkg build containing the same functional camera changes completed
successfully.

Runtime testing used a Lenovo Yoga Book YB1-X91L. Both sensors, AtomISP
and WV517S bound, and both cameras worked after suspend and resume.
Captures passed with:

- front raw BG10: 1932x1092, 4472832 bytes;
- rear raw BG10: 3264x2448, 16293888 bytes;
- front processed YU12: 1920x1080; and
- rear processed JPEG: 3248x2432, 1530647 bytes.

With Best Regards,
Maurizio Casciano

Maurizio Casciano (12):
  media: ov8858: Extract digital gain programming
  media: ov8858: support 19.2 MHz clock and CHT gain setup
  media: ov2740: Use C99 initializers for ACPI IDs
  media: ov2740: Add OVTI2740 ACPI ID
  media: ov8858: Add INT3477 ACPI ID
  media: intel: ipu-bridge: Add Yoga Book camera sensors
  media: atomisp: Add Yoga Book camera configuration
  media: atomisp: support the Yoga Book OV2740 link
  media: ov2740: add manual white balance controls
  media: atomisp: Use struct v4l2_area for padding
  media: atomisp: allow raw Bayer capture
  media: i2c: Add WV517S lens actuator driver

 MAINTAINERS                                   |   1 +
 drivers/media/i2c/Kconfig                     |  11 +
 drivers/media/i2c/Makefile                    |   1 +
 drivers/media/i2c/ov2740.c                    | 174 ++++++++++++---
 drivers/media/i2c/ov8858.c                    | 167 ++++++++++++--
 drivers/media/i2c/wv517s.c                    | 206 ++++++++++++++++++
 drivers/media/pci/intel/ipu-bridge.c          |  19 +-
 .../staging/media/atomisp/pci/atomisp_cmd.c   |  71 ++++--
 .../staging/media/atomisp/pci/atomisp_cmd.h   |   6 +-
 .../staging/media/atomisp/pci/atomisp_csi2.c  |  17 +-
 .../staging/media/atomisp/pci/atomisp_csi2.h  |   2 +
 .../media/atomisp/pci/atomisp_csi2_bridge.c   |  67 +++++-
 .../media/atomisp/pci/atomisp_internal.h      |   3 +
 .../staging/media/atomisp/pci/atomisp_ioctl.c |  35 ++-
 .../staging/media/atomisp/pci/atomisp_v4l2.c  |   9 +
 include/media/ipu-bridge.h                    |   2 +
 16 files changed, 694 insertions(+), 97 deletions(-)
 create mode 100644 drivers/media/i2c/wv517s.c


base-commit: 73e3f0710014fe6d4ed98cfc02292f6121db7558
-- 
2.53.0

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-08-27 23:18 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-27 23:17 [PATCH v3 00/12] media: Add Lenovo Yoga Book YB1-X91 camera support Maurizio Casciano
2026-08-27 23:17 ` [PATCH v3 01/12] media: ov8858: Extract digital gain programming Maurizio Casciano
2026-08-27 23:17 ` [PATCH v3 02/12] media: ov8858: support 19.2 MHz clock and CHT gain setup Maurizio Casciano
2026-08-27 23:17 ` [PATCH v3 03/12] media: ov2740: Use C99 initializers for ACPI IDs Maurizio Casciano
2026-08-27 23:17 ` [PATCH v3 04/12] media: ov2740: Add OVTI2740 ACPI ID Maurizio Casciano
2026-08-27 23:17 ` [PATCH v3 05/12] media: ov8858: Add INT3477 " Maurizio Casciano
2026-08-27 23:17 ` [PATCH v3 06/12] media: intel: ipu-bridge: Add Yoga Book camera sensors Maurizio Casciano
2026-08-27 23:17 ` [PATCH v3 07/12] media: atomisp: Add Yoga Book camera configuration Maurizio Casciano
2026-08-27 23:17 ` [PATCH v3 08/12] media: atomisp: support the Yoga Book OV2740 link Maurizio Casciano
2026-08-27 23:17 ` [PATCH v3 09/12] media: ov2740: add manual white balance controls Maurizio Casciano
2026-08-27 23:17 ` [PATCH v3 10/12] media: atomisp: Use struct v4l2_area for padding Maurizio Casciano
2026-08-27 23:17 ` [PATCH v3 11/12] media: atomisp: allow raw Bayer capture Maurizio Casciano
2026-08-27 23:17 ` [PATCH v3 12/12] media: i2c: Add WV517S lens actuator driver Maurizio Casciano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox