From patchwork Tue Jul 9 14:39:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Scally X-Patchwork-Id: 20628 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 C4763BDB1C for ; Tue, 9 Jul 2024 14:39:51 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0203B6338C; Tue, 9 Jul 2024 16:39:51 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="LcOiVyyO"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D35A86337C for ; Tue, 9 Jul 2024 16:39:22 +0200 (CEST) Received: from mail.ideasonboard.com (cpc141996-chfd3-2-0-cust928.12-3.cable.virginm.net [86.13.91.161]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 763692393; Tue, 9 Jul 2024 16:38:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1720535930; bh=7HjZW+B3x78J3wRUkUtBFxMgqtv/VD1c96N6Ydcnhek=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LcOiVyyOWHPL69QN5Qdn0m6vvhRwUh1ujYaT9HH8l4Ib/T/X2duVDn4L505ajjrA1 olsXyEDdmHMu2FXXB1SfREPA3u/7Uwk1Jh3uXwmpCPy26kg6vfiioUlUWhckRZiuh+ 4iuBDY9LZgCuNeFAmvcK7MkxdXDUUSd/qibAUuNs= From: Daniel Scally To: libcamera-devel@lists.libcamera.org Cc: Daniel Scally Subject: [PATCH v4 11/13] libcamera: mali-c55: Enable links between resizer and video node Date: Tue, 9 Jul 2024 15:39:11 +0100 Message-Id: <20240709143913.3276983-12-dan.scally@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240709143913.3276983-1-dan.scally@ideasonboard.com> References: <20240709143913.3276983-1-dan.scally@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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The mali-c55 driver now expects links to video devices to be enabled in order for those devices to be streamed from / to. Enable the media link between the resizers and their associated video device to fulfil the requirement. Signed-off-by: Daniel Scally Reviewed-by: Kieran Bingham --- src/libcamera/pipeline/mali-c55/mali-c55.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/libcamera/pipeline/mali-c55/mali-c55.cpp b/src/libcamera/pipeline/mali-c55/mali-c55.cpp index c456a798..512a7489 100644 --- a/src/libcamera/pipeline/mali-c55/mali-c55.cpp +++ b/src/libcamera/pipeline/mali-c55/mali-c55.cpp @@ -827,6 +827,17 @@ int PipelineHandlerMaliC55::configure(Camera *camera, Stream *stream = streamConfig.stream(); MaliC55Pipe *pipe = pipeFromStream(data, stream); + /* + * Enable the media link between the pipe's resizer and the + * capture video device + */ + const MediaEntity *rszEntity = pipe->resizer->entity(); + ret = rszEntity->getPadByIndex(1)->links()[0]->setEnabled(true); + if (ret) { + LOG(MaliC55, Error) << "Couldn't enable resizer's link"; + return ret; + } + if (isFormatRaw(streamConfig.pixelFormat)) ret = configureRawStream(data, streamConfig, subdevFormat); else