From patchwork Wed May 29 15:43:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 20118 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 47342BDE6B for ; Wed, 29 May 2024 15:43:56 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 362D4634B7; Wed, 29 May 2024 17:43:55 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="BLq70rWu"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 742706347E for ; Wed, 29 May 2024 17:43:53 +0200 (CEST) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 95B7D149B for ; Wed, 29 May 2024 17:43:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1716997429; bh=0IVDvQyTdEB156wv7hHrIpk3ld4/whTZEiQgbkGzoxI=; h=From:To:Subject:Date:From; b=BLq70rWuFqvopYO0boVao2mNa2YxnHgl3TPubwKx93H8Z8Pf0ScQVrQpeTgfXZlB2 tKg1ZsUhQ5tir/O/Qt8vxlB25VgjNP8m1qvLGLtqHdUpgLW1oQU7FL+NzjuI359Hke 7vaYqYssB6cks3P5YWnZ2UCTyifDOon1BWIWY2kE= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH v2 0/6] vimc scaling improvements Date: Wed, 29 May 2024 18:43:35 +0300 Message-ID: <20240529154341.10426-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.44.1 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 | 75 ++++++++++++++++--------- test/v4l2_videodevice/capture_async.cpp | 11 ++-- 5 files changed, 116 insertions(+), 60 deletions(-) base-commit: c79fa47aac9b38865dab5e9f29030903bf460c46