Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3806380yba; Tue, 23 Apr 2019 09:56:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqyOpwwRFOegbBGV7Jv1sg1cOfKI3hUtmbBAUqyOiQIF8fwClX5IOXXYeCihIbG0aS2vxCh0 X-Received: by 2002:a17:902:441:: with SMTP id 59mr27398886ple.242.1556038587080; Tue, 23 Apr 2019 09:56:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556038587; cv=none; d=google.com; s=arc-20160816; b=VOAH8njv9IsibIhg884i8pzKodhdcXUP6w0qsOyW+ej0SJU6G1ufy9ACYGsMAI3URb +hO5TQNjdMwAOtke0sgQMxCwEq8RKbBofh69LiLhWYbiDrxAb6P5mHVQooDYowI5MJwU gLePLbTzqJuhxiqyhFa/3J5rrNmLRC9eeoaWEXfOGj4tx1qNCgSfjRRBHPkZkFIB9Fdj uSOz424NoXN7k/GLihrKnJfdtzePgBGhzoO1QuPZiYZqTqmgm9hZAS42KC7a7Op6yzu/ htLIaztDtAUyHGxivec4G9jpLhiwsQ6uZw24Fd2RzW0vmCOK1Hbcf5QLU7BIN1LulFLR CnVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=zxLsjKC40Du35pRl1/qPta+LagCOlcRUXZQM358dc4Q=; b=y2uJG5y0zKFzFu5JnN6x45eoVEA/NpO48Mt5AimzJH7/OvtrijEBPMHU1er6rPdOWi gJcmQI1rsp+sEfr4U7/rGIUjoBlUIWlDWKRjEvE1FAkt/moxUb5tsIUFyP/yh7KTNISP ePR+FYST0HM8jIi4xAYtZCAU/k4Cm5h++4MGvkbaW7itr/Zg1Ipbsn8Y+gFZp6UVFB1I znjv+aKI0VmAHwvlUFHtifW62NOvTRea6hO38pJ5iRYTzGCUy4d6XrjXVu+GnT9Ixrd1 CMnUxvEgyKJGQvNnSRBP6xf/v9xkr5v0ebfO6ZF1z8O/p2cSko6BzL9ffAi8XdTp1EN5 kSSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 2si2619374plc.371.2019.04.23.09.56.11; Tue, 23 Apr 2019 09:56:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729133AbfDWQyy (ORCPT + 99 others); Tue, 23 Apr 2019 12:54:54 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:48793 "EHLO relay6-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728705AbfDWQyy (ORCPT ); Tue, 23 Apr 2019 12:54:54 -0400 X-Originating-IP: 93.29.109.196 Received: from collins (196.109.29.93.rev.sfr.net [93.29.109.196]) (Authenticated sender: paul.kocialkowski@bootlin.com) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 7CC3BC000B; Tue, 23 Apr 2019 16:54:49 +0000 (UTC) Message-ID: <06f3722e96df32c02421105cab1280f2fbe52e2b.camel@bootlin.com> Subject: Re: [PATCH 00/20] drm: Split out the formats API and move it to a common place From: Paul Kocialkowski To: Laurent Pinchart Cc: Maxime Ripard , Daniel Vetter , Daniel Vetter , David Airlie , Maarten Lankhorst , Sean Paul , Mauro Carvalho Chehab , Sakari Ailus , Linux Kernel Mailing List , dri-devel , Hans Verkuil , Thomas Petazzoni , "open list:DMA BUFFER SHARING FRAMEWORK" , Boris Brezillon Date: Tue, 23 Apr 2019 18:54:49 +0200 In-Reply-To: <20190420224045.GY4964@pendragon.ideasonboard.com> References: <20190417154121.GJ13337@phenom.ffwll.local> <20190418062229.eyog4i62eg4pr6uf@flea> <20190418090221.e57dogn4yx5nwdni@flea> <6578c22ddf5420d4dead69d29f451bc6a91f6c4a.camel@bootlin.com> <20190420224045.GY4964@pendragon.ideasonboard.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Le dimanche 21 avril 2019 à 01:40 +0300, Laurent Pinchart a écrit : > Hi Paul, > > On Thu, Apr 18, 2019 at 01:49:54PM +0200, Paul Kocialkowski wrote: > > On Thu, 2019-04-18 at 11:02 +0200, Maxime Ripard wrote: > > > On Thu, Apr 18, 2019 at 09:52:10AM +0200, Daniel Vetter wrote: > > > > And a lot of people pushed for the "fourcc is a standard", when > > > > really it's totally not. > > > > > > Even if it's not a standard, having consistency would be a good thing. > > > > > > And you said yourself that DRM fourcc is now pretty much an authority > > > for the fourcc, so it definitely looks like a standard to me. > > > > I think trying to make the V4L2 and DRM fourccs converge is a lost > > cause, as it has already significantly diverged. Even if we coordinate > > an effort to introduce new formats with the same fourcc on both sides, > > I don't see what good that would be since the formats we have now are > > still plagued by the inconsistency. > > > > I think we always need an explicit translation step from either v4l2 or > > drm to the internal representation and back, without ever assuming that > > formats might be compatible because they share the same fourcc. > > I don't agree. APIs evolve, and while we can't switch from one set of > 4CCs to another in existing APIs, we could in new APIs. Boris is working > on new ioctls to handle formats in V4L2, and while 4CC unification could > be impopular from a userspace developers point of view there, I don't > think we have ruled it out completely. The move to the request API is > also an area where a common set of 4CCs could be used, as it will depart > from the existing V4L2 ioctls. To summarize my opinion, we're not there > yet, but I wouldn't rule it out completely for the future. Well, I don't see how we could maintain backward compatibility with some DRM and V4L2 fourccs that are compatible and some that aren't. Since both descriptions have diverged already, one would need explicit checking of whether the format at hand is a compatible one or not before passing-it along as-is to the other subsystem or going through a format conversion step (in userspace, duplicating the information). So it feels like it kind of defeats the purpose. If we're going to use a unified 4CC representation in the future, I think we should do it by using the new formats that this proposal is introducing instead of subsystem-specific formats. At which point I believe we will need an internal conversion step between that format and what the subsystem uses internally. Or do it the other way round and use the unified format all around the subsystem, with a legacy layer for the previous subsystem-specific format. Cheers, Paul