From patchwork Wed Apr 24 23:42:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 19945 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 3C0C1C3200 for ; Wed, 24 Apr 2024 23:42:36 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3F7C0633FD; Thu, 25 Apr 2024 01:42:34 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="VSmm0hv0"; dkim-atps=neutral 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 C36BC61A94 for ; Thu, 25 Apr 2024 01:42:31 +0200 (CEST) Received: from pendragon.ideasonboard.com (117.145-247-81.adsl-dyn.isp.belgacom.be [81.247.145.117]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0D06EB1 for ; Thu, 25 Apr 2024 01:41:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1714002099; bh=l7wUfn6VwyvUPUVegPb+myygSqGHy6bh0tHxQKHHqm0=; h=From:To:Subject:Date:From; b=VSmm0hv0ehWe17iOOY4AiXXrwe41NzREcqr3c9pNkFAmj475UQM0oWNgSdFCmMjY6 lQRZT3vz7orJdM6DiTIZRG2GkanT5zkRI+2bi/U//gEWW3KICSNccJkTRCTINrIZC7 oQXKwK+0OFZeQgD9jZbpCgfoG1TRx9T5wAN1sP9c= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH v1 0/6] vimc scaling improvements Date: Thu, 25 Apr 2024 02:42:18 +0300 Message-ID: <20240424234224.9658-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.43.2 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" Hello, This series improves the vimc pipeline handler to avoid the weird alignment constraints related to the vimc scaler on recent kernels. Starting in v5.16, the vimc scaler doesn't hardcoded a x3 scaling ratio, but makes the scaling configurable by userspace through the sink pad crop rectangle. Take advantage of this feature to lift the strange alignment to a multiple of 6 for the stream output size. This allows capturing all common display resolutions from the vimc pipeline handler, which is handy to test the DRM sink in the cam application. The improvement, in patch 6/6, breaks 4 unit tests. The series starts with improvements and fixes to the tests to avoid those breakages (patches 1/6 to 5/6), before changing the vimc pipeline handler behaviour. Those test improvements would in my opinion make sense even without patch 6/6, as they fix a race condition (3/6) or accelerate the test runs (1/6, 4/6 and 5/6) on fast machines. The series has been tested with the unit tests, running on my development machine, in a local VM, and in the gitlab.freedesktop.org CI VM. Laurent Pinchart (6): test: camera: Increase timeout for vimc capture tests test: fence: Turn class member variable into local variable test: fence: Fix race condition test: fence: Increase timeout for fence test test: v4l2_videodevice: Increase timeout for vimc capture tests pipeline: vimc: Don't hardcode scaling factor with recent kernels src/libcamera/pipeline/vimc/vimc.cpp | 47 +++++++++++++++++-------- test/camera/buffer_import.cpp | 21 +++++++---- test/camera/capture.cpp | 22 +++++++----- test/fence.cpp | 42 +++++++++++----------- test/v4l2_videodevice/capture_async.cpp | 11 +++--- 5 files changed, 90 insertions(+), 53 deletions(-) base-commit: fb74bb7df66b96dbe28702155cddfc96a1b30f78