Re: [PATCH v2 08/11] media: atomisp: support the Yoga Book OV2740 link
From: Andy Shevchenko
Date: Thu Aug 27 2026 - 15:58:08 EST
On Thu, Aug 27, 2026 at 08:17:53PM +0200, Maurizio Casciano wrote:
> The YB1-X91L firmware does not describe the complete camera link. Its
> front OV2740 uses two CSI-2 lanes at a 288 MHz link frequency and sends
> a 1932x1092 BGGR transport frame with 12 pixels of horizontal and
> vertical padding around the 1920x1080 image.
>
> Allow the AtomISP bridge to provide per-sensor link frequencies and
> padding, add the matching OV2740 mode, and derive ISP2401 D-PHY timing
> from the sensor link-frequency control.
>
> The register values are hardware configuration facts checked against
> the Lenovo YB1-X91L configuration and physical captures; no proprietary
> driver code or tuning binary is included.
>
> Tested on a Lenovo Yoga Book YB1-X91L with continuous front-camera raw
> capture.
...
> +bool atomisp_csi2_get_sensor_padding(struct device *dev,
> + struct v4l2_area *padding)
> +{
> + struct acpi_device *adev;
> +
> + padding->width = pad_w;
> + padding->height = pad_h;
> +
> + adev = ACPI_COMPANION(dev);
> + if (!adev)
> + return false;
> + padding->width = atomisp_csi2_get_padding_value(adev,
> + "CsiPaddingWidth", pad_w);
padding->width =
atomisp_csi2_get_padding_value(adev, "CsiPaddingWidth", pad_w);
> + padding->height = atomisp_csi2_get_padding_value(adev,
> + "CsiPaddingHeight", pad_h);
In the similar way.
> + return padding->width != pad_w || padding->height != pad_h;
> +}
...
> - ATOMISP_SENSOR_CONFIG("INT33BE", 2, false), /* OV5693 */
> - ATOMISP_SENSOR_CONFIG("INT3477", 4, true), /* OV8858 */
> - ATOMISP_SENSOR_CONFIG("OVTI2740", 2, false), /* OV2740 */
> + ATOMISP_SENSOR_CONFIG("INT33BE", 2, false, 0), /* OV5693 */
> + ATOMISP_SENSOR_CONFIG("INT3477", 4, true, 0), /* OV8858 */
> + /* OV2740 */
> + ATOMISP_SENSOR_CONFIG("OVTI2740", 2, false, 288 * HZ_PER_MHZ),
It's better to keep style
/* OV5693 */
ATOMISP_SENSOR_CONFIG("INT33BE", 2, false, 0),
/* OV8858 */
ATOMISP_SENSOR_CONFIG("INT3477", 4, true, 0),
/* OV2740 */
ATOMISP_SENSOR_CONFIG("OVTI2740", 2, false, 288 * HZ_PER_MHZ),
Check if that can be done in the previous patch(es) already.
--
With Best Regards,
Andy Shevchenko