From patchwork Tue May 17 14:33:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 15933 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 D9810C3271 for ; Tue, 17 May 2022 14:34:00 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6D4C065667; Tue, 17 May 2022 16:34:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1652798040; bh=U0Vdm2wpBtY0+BD7NSs1FupKjGp9MeIUUX1p4o37m6M=; 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=1xWnfODdSw3JIMu5RSUBwLNjeinvnHfRNdA0t/lXLn+ELFWpkNKMKlXPpeUNSIEie umgDa6t7bOBpgV86usR3l+2GK2ZsbJlVtTRkNlrR/YHWFWTfNaUDtScYhbsTVxuQvt ehlpQLwTkMaXiBG3EtaBEiWyFqEnAEYYYe4cMzzA046OUgMRinv62AJaNMq1D0g79z L49Z1Sue5gtXWV9zJQc9NHLbbXY+Tz/xpHWhZ4+gmk5uO1eSjG0eJ3wNjyCnW0m12y 4smYjStJTGrrL5EWDDgJqaJvP0lrndmhLK2zRjdWCxVL8akc3xw5luA9pnWxCvexFA T9yhM2k9o4M1w== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 336246566D for ; Tue, 17 May 2022 16:33:56 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="MUsbNzKa"; 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 9EF4CD59; Tue, 17 May 2022 16:33:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1652798036; bh=U0Vdm2wpBtY0+BD7NSs1FupKjGp9MeIUUX1p4o37m6M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MUsbNzKaEWYIkqCSShrIW+6vhAZc4Kk5qElwtToVfYtwOandLNSlGNmKWAWXNMIg3 kfne+i0rcKTaKdfk2c6GkZ/Gyz5PC0q4PfDSFCOnwezU2ulXEoJWKjmnJM59kuuQ0Q S7S3PJStYhoonxBChXXWqWvbPyiFQHBL1OkkTv08= To: libcamera-devel@lists.libcamera.org, David Plowman , Kieran Bingham , Laurent Pinchart , Jacopo Mondi Date: Tue, 17 May 2022 17:33:21 +0300 Message-Id: <20220517143325.71784-10-tomi.valkeinen@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220517143325.71784-1-tomi.valkeinen@ideasonboard.com> References: <20220517143325.71784-1-tomi.valkeinen@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 09/13] 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 Reviewed-by: Kieran Bingham --- 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 f1844717..d8ff0284 100644 --- a/src/py/cam/cam_kms.py +++ b/src/py/cam/cam_kms.py @@ -75,12 +75,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