From patchwork Thu Nov 7 10:58:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Scally X-Patchwork-Id: 21844 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 80982C330B for ; Thu, 7 Nov 2024 10:59:13 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id F404765485; Thu, 7 Nov 2024 11:59:09 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="MjuiAsLx"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E58E76547F for ; Thu, 7 Nov 2024 11:58:57 +0100 (CET) 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 BA7651890; Thu, 7 Nov 2024 11:58:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1730977128; bh=1BWGNjNH+ArkioShSA1zbZVIsnJfSG1BVW5CkmaxX6Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MjuiAsLxZzwbA4yagS/EfDfpmr7c1NVDe+Xdlu2Kz+vEJAYrDqAsOe9EsKMbqgCYM Vcozw74f6CE0NITbfR0pzLaJauxhMe2ZvVut2bI2Zxw17VUm3HenweaY4wSXqyM25M 4r4t4VqX52K9u7V2aADBLW/KtvJtNCTt9jO9DGVc= From: Daniel Scally To: libcamera-devel@lists.libcamera.org Cc: Daniel Scally , Kieran Bingham Subject: [PATCH v5 11/13] libcamera: mali-c55: Enable links between resizer and video node Date: Thu, 7 Nov 2024 10:58:44 +0000 Message-Id: <20241107105846.52287-12-dan.scally@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241107105846.52287-1-dan.scally@ideasonboard.com> References: <20241107105846.52287-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. Reviewed-by: Kieran Bingham Signed-off-by: Daniel Scally Reviewed-by: Jacopo Mondi --- Changes in v5: - None 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 97827abd..b00cbce5 100644 --- a/src/libcamera/pipeline/mali-c55/mali-c55.cpp +++ b/src/libcamera/pipeline/mali-c55/mali-c55.cpp @@ -834,6 +834,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