Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1413044pxb; Thu, 4 Nov 2021 01:42:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyyI/1wTtGzcVeNDpW9qod5x8f76s0F1wmKR5BGdAD9l7SxZ20x6+/p/G/2Vc7OO7f1Gxxe X-Received: by 2002:a17:906:7ac9:: with SMTP id k9mr62573196ejo.411.1636015334710; Thu, 04 Nov 2021 01:42:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636015334; cv=none; d=google.com; s=arc-20160816; b=djOvvQvsjSdJ9zxIM/trgsLe34z9UT8iLNq3k3KyZSw1i1VpZulkaVOrgRWof8Khw8 2HS5xKK5SxD5rggU28IDpE++Y+QCHdRVuqgkdiYapKqrnKL+mcQQwFln8MB287gMTiaH 67TzALusvvXv6qenKKAg97gvsEkWU0A9bLw/OZknAWTN4DkSWcQqWqRZtkluZ0yddK3b LUHr+4znWY5Q/yTB+4N0WWhAZo+EJvsZ8hMBrFvJ+c8a1oh0FxmY9neehOKcUbvFwZsh fTrP07RiusOGI+wpTUrmGV5wK3R10I4CVBukQP+mhI4347xGkwfV+9Xms8A/z4/PnyjS fvxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=3Tm7Cxsz8ZeS5O/n3g0jdloo9YL+7e6vT2y7elJ5GCA=; b=QrKqprVd1PMndSVIVnx4WtZt+3NlS9w6k0ajI7aDvUwCFW72mdgBlRBCjg1mZL3s+U H/lQ9yRwgrM+XBJENAUKrnUS/4DpNw4l/1d2FrX2GhAM90leaapqLhOjo5THa8z5lMME 4d7d816ulyXrJ/YtldcbTyjRWc5OEuQ4ft1OMQuzz7CVKaYeuGIAJ/OQI/iWh9uMy1/t X5XWJbyeU5n52AA509o87wOr0ZBoI/iz/5ZsgBxAOAM6IzVvuSQ6nR7J3iVjy0p+Wg/I Wz0IZ2FbIHmWWfBnmiCCJU8AIm4jrcLDujfDuOYbUzDjeky+pmyeVHdgPvomH+Un/E5w JJMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Mni8B+Er; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w20si7880876eje.578.2021.11.04.01.41.50; Thu, 04 Nov 2021 01:42:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Mni8B+Er; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231136AbhKDIk0 (ORCPT + 99 others); Thu, 4 Nov 2021 04:40:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:54078 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230084AbhKDIkZ (ORCPT ); Thu, 4 Nov 2021 04:40:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F40096112D; Thu, 4 Nov 2021 08:37:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636015068; bh=E+go/jlwcXH60auQtP/uEyLMcbdgde64C/RHs6+jrR0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Mni8B+Er6MbxMus1Wobyx1zTlOT9FFbfE6ehLHBeU7OdCb4//ZFIeMTfDDTqjTWeg qDcM8wpgXvHUoGCeyPjicomCK3S8n9M6H6uPIhVtOnkgnI6i7AMTp0cR9EcEB2guAA 7PofpQ36+NPMEoJM+vnfk+9o5ZK1KDbte47nrQCLYLh9c4PGEbnC0fVh6QglB08SJ8 LqmhXkogRC8WLsEeWT52R9FJw+bnB+jg56+FnJs/m+KbelH7vUrcL3OyntxIxbu89Y KMU+h+BX9V7A7e7Rp5uHzuFKynzGLjq/NC2tb0XtTlXha5b41oze5+ioveRBlvhnK0 2z5P4baPHdxKQ== Date: Thu, 4 Nov 2021 08:37:37 +0000 From: Mauro Carvalho Chehab To: Hans Verkuil Cc: Linux Media Mailing List , Tsuchiya Yuto , Hans de Goede , Patrik Gfeller , Mauro Carvalho Chehab , Sakari Ailus , Greg Kroah-Hartman , Kaixu Xia , Laurent Pinchart , Yang Li , Tomi Valkeinen , Alex Dewar , Aline Santana Cordeiro , Arnd Bergmann , Alan , Peter Zijlstra , Ingo Molnar , linux-staging@lists.linux.dev, Linux Kernel Mailing List , Andy Shevchenko Subject: Re: atomisp current issues Message-ID: <20211104083737.55b88011@sal.lan> In-Reply-To: <20211103165424.67296e13@sal.lan> References: <20211103135418.496f75d5@sal.lan> <20211103165424.67296e13@sal.lan> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, 3 Nov 2021 16:54:24 +0000 Mauro Carvalho Chehab escreveu: > Em Wed, 3 Nov 2021 15:41:05 +0100 > Hans Verkuil escreveu: > > > On 03/11/2021 14:54, Mauro Carvalho Chehab wrote: > > > Hi, > > > > > > From what I've seen so far, those are the main issues with regards to V4L2 API, > > > in order to allow a generic V4L2 application to work with it. > > > > > > MMAP support > > > ============ > > > > > > Despite having some MMAP code on it, the current implementation is broken. > > > Fixing it is not trivial, as it would require fixing the HMM support on it, > > > which does several tricks. > > > > > > The best would be to replace it by something simpler. If this is similar > > > enough to IPU3, perhaps one idea would be to replace the HMM code on it by > > > videodev2 + IPU3 HMM code. > > > > > > As this is not trivial, I'm postponing such task. If someone has enough > > > time, it would be great to have this fixed. > > > > > > From my side, I opted to add support for USERPTR on camorama: > > > > > > https://github.com/alessio/camorama > > > > > > As this is something I wanted to do anyway, and it allowed me to cleanup > > > several things in camorama's code. > > > > > > Support for USERPTR is not autodetected. So, this should be selected > > > > You can autodetect this: the capabilities field returned by VIDIOC_REQBUFS > > or VIDIOC_CREATE_BUFS will indicate support for this. This works with any > > vb2-based driver. > > > > Just thought I should mention this... > > Yeah, surely the app could try it, but: > > 1. As libv4l doesn't support USERPTR, such detection should happen > early inside camorama code; I ended adding auto-detection support for USERPTR inside camorama, for completeness. The "-U" command line option remains, so one could use it to force USERPTR mode. As the way I implemented it is that camorama checks if REQBUFS doesn't return any error, it means that it will automatically fallback to USERPTR with atomisp driver (while MMAP support is not fixed there). So, once I fix the issues with S_FMT/G_FMT, camorama will likely work out of the box with it. Regards, Mauro