From patchwork Fri Mar 1 21:21:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 19618 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 2FA72BD160 for ; Fri, 1 Mar 2024 21:22:02 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D8D0562875; Fri, 1 Mar 2024 22:22:01 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="PO8ghUEo"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6C68162964 for ; Fri, 1 Mar 2024 22:21:59 +0100 (CET) Received: from pendragon.ideasonboard.com (89-27-53-110.bb.dnainternet.fi [89.27.53.110]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E9001335C; Fri, 1 Mar 2024 22:21:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1709328105; bh=X2dfK1U286UER7gay9EgBCokZrhjkVFLfSHMIsfzgf8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PO8ghUEo5JeHeFjbtCNGJ2eArzzq3/dcMAqO79M8PtOHpHUrzsGjjBMstcYrS8cMu Hls66q36KymYHFBLm+AeWWzWt1zhliZ1UvZbzeXrRUeAsEjXMhTwj5g7E1xHpm5ltx 4Bh0ipQypp1yjLKdeQm9c28b5NLNxOrLRwvVL8d4= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH/RFC 27/32] pipeline: raspberrypi: vc4: Use the CameraSensor embedded data API Date: Fri, 1 Mar 2024 23:21:16 +0200 Message-ID: <20240301212121.9072-28-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240301212121.9072-1-laurent.pinchart@ideasonboard.com> References: <20240301212121.9072-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sakari Ailus Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Now that the CameraSensor class implements support for embedded data, use the corresponding API instead of retrieving the embedded data format from the subdev manually. This changes requires sensor kernel drivers that implement the upstream embedded data API based on V4L2 streams. As the API is under development and not merged in the upstream kernel yet, this breaks compatibility with the downstream Raspberry Pi kernel. Signed-off-by: Laurent Pinchart --- src/libcamera/pipeline/rpi/vc4/vc4.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp index 3c3c1b30f9e3..75dc85cf62a1 100644 --- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp +++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp @@ -574,9 +574,7 @@ int Vc4CameraData::platformConfigure(const RPi::RPiCameraConfiguration *rpiConfi * supports it. */ if (sensorMetadata_) { - V4L2SubdeviceFormat embeddedFormat; - - sensor_->device()->getFormat(1, &embeddedFormat); + V4L2SubdeviceFormat embeddedFormat = sensor_->embeddedDataFormat(); V4L2DeviceFormat format{}; format.fourcc = V4L2PixelFormat(V4L2_META_FMT_SENSOR_DATA); format.planes[0].size = embeddedFormat.size.width * embeddedFormat.size.height;