From patchwork Mon May 16 14:10:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 15920 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 2D3C6C3271 for ; Mon, 16 May 2022 14:11:05 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C4A5A65680; Mon, 16 May 2022 16:11:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1652710264; bh=MRxE+WJDv6nB+zC5V/SxfwJvigsEeyodx4QT1Xo+d+s=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=MTeiA0+iKipv9Wm5jcuqBADuFBjirTEfftZDt+0NBrWFhDy3iye7nrEWRqUsPuWQF Ux0zRy6Fxh+4Hfpidle3BoZ5hkBUK3q2CteHgt5EvJxXP+FM/cm55YG7/oB3FhmbMi TxNdUKzaoXlu8pdw05wbe+tyngu69lhlzBzvvhj5gMpBztDTCdYkNKIwXUYkB4VjQS fsu+pPvpx6N2NopFNr8ZcLL//40rHxIVX4QTimBkeEEBLi+o1oAMetzT/EJTL8GBOE rKcun8P3sg1KKJeg/4381f46UEX02kSg1ETWfFfmUUnkvjb39yMt43CtB27hzMP0xs W8mdvrett2Upg== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 284D765653 for ; Mon, 16 May 2022 16:10:55 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Qpx2U2Li"; dkim-atps=neutral Received: from deskari.lan (91-156-85-209.elisa-laajakaista.fi [91.156.85.209]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8E8F98EF; Mon, 16 May 2022 16:10:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1652710254; bh=MRxE+WJDv6nB+zC5V/SxfwJvigsEeyodx4QT1Xo+d+s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qpx2U2LiyJ2PlL9K9GCHqE7vZKja8dpr3fQxfB3F4epDjSz/57XZTpTtnufDKMxbB 3ONDOjmQoZ+XM7OrSFQPNXa5zRQpm8AFCmAUvdanvp46KfLgLGVpOyTZpWvcjMrJkw A+JChmClr04DSl4+ni/iGcCp9FQyScn9X5m4jXHs= To: libcamera-devel@lists.libcamera.org, David Plowman , Kieran Bingham , Laurent Pinchart , Jacopo Mondi Date: Mon, 16 May 2022 17:10:22 +0300 Message-Id: <20220516141022.96327-15-tomi.valkeinen@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220516141022.96327-1-tomi.valkeinen@ideasonboard.com> References: <20220516141022.96327-1-tomi.valkeinen@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 14/14] py: cam_kms: fix multistream display 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: , X-Patchwork-Original-From: Tomi Valkeinen via libcamera-devel From: Tomi Valkeinen Reply-To: Tomi Valkeinen Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Instead of doing an atomic commit for each stream, do a single commit for the two planes. This fixes the issue that only the first plane was actually shown. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- src/py/cam/cam_kms.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/py/cam/cam_kms.py b/src/py/cam/cam_kms.py index 90aac5f6..74cd3b38 100644 --- a/src/py/cam/cam_kms.py +++ b/src/py/cam/cam_kms.py @@ -67,12 +67,13 @@ class KMSRenderer: buffers = drmreq['camreq'].buffers + req = pykms.AtomicReq(self.card) + for stream, fb in buffers.items(): drmfb = self.cam_2_drm.get(fb, None) - - req = pykms.AtomicReq(self.card) self.add_plane(req, stream, drmfb) - req.commit() + + req.commit() def handle_page_flip(self, frame, time): old = self.current