From patchwork Sun Aug 7 18:00:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 17014 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 B0C7CC3272 for ; Sun, 7 Aug 2022 18:01:13 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DBE1E6332D; Sun, 7 Aug 2022 20:01:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1659895272; bh=GUl7vEMbbHxG8oo2HKGwxUbKPCCwHnPE+mYKgGL6xoQ=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=U5alL+JJMk8lwHUBibvbRWMQU7EYdJCZSShici/SWkddozSyZxVQDEtNjJHOdogg3 gWAdQnUa4l5TsNcEoKEk8ngARLPi7uTzaWxKELXlMONWT/GNYJua+ud/2uq5WwzAIY GqqE8fLwBPzV4/L3Mph63QBRrvT6PZjuS0wEkiEtc+vJFE7E0ca5yyVofZBBIzhW2N TkWTLnFarNOOEcsfgWVlqFtyDVAQDdYc5c8+PKDwX81Slv7qY+J/iPPdqbjyOjPIKw iOGKSLKT1KDXbsWedSW44cTqj54PJTdPVU5tFjAx8o5YkzntMHLZ/Y82X7pyz+uqIa t0qKh2s1flMIQ== 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 9D68D63312 for ; Sun, 7 Aug 2022 20:01:10 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="vU/+Ze2o"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0C169749; Sun, 7 Aug 2022 20:01:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1659895270; bh=GUl7vEMbbHxG8oo2HKGwxUbKPCCwHnPE+mYKgGL6xoQ=; h=From:To:Cc:Subject:Date:From; b=vU/+Ze2oYImJSI9DAuLET5nS46hSjYOJOtyqlCv+eboUYlk/c9KQzN+vOWHM/i0Ho +zhX9Fg4X7pL40FqQ1zGOJviRYUnUpcN1iPfLVjWjUCCgh0wlHwOhWsMZSBE57QMpI T3cpVlak4Zi3uAByXsHHXjNcsopE1IeQ8pTQhFkY= To: libcamera-devel@lists.libcamera.org Date: Sun, 7 Aug 2022 21:00:57 +0300 Message-Id: <20220807180100.396-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/3] cam: Support KMS scaling 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: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hello, This patch series improves the KMS sink in cam to scale the frame buffer to full screen when supported by the hardware, and to center the image instead of aligning it to the top-left corner otherwise. The series has been tested on a RockPi 4 board. Please see individual patches for details. Laurent Pinchart (3): cam: drm: Add support for test-only commits cam: kms_sink: Make lifetime management of DRM request safer cam: kms_sink: Scale the frame buffer to full screen if supported src/cam/drm.cpp | 2 + src/cam/drm.h | 1 + src/cam/kms_sink.cpp | 99 +++++++++++++++++++++++++++++++++++++++----- src/cam/kms_sink.h | 13 +++++- 4 files changed, 102 insertions(+), 13 deletions(-) base-commit: 26c82ce13697e1af5950f4935ecff83c6453f351 Tested-by: Kieran Bingham