From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 25554C433EF for ; Fri, 24 Jun 2022 21:37:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5CE9C10F518; Fri, 24 Jun 2022 21:37:44 +0000 (UTC) Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by gabe.freedesktop.org (Postfix) with ESMTPS id 07A8D10F518 for ; Fri, 24 Jun 2022 21:37:43 +0000 (UTC) Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 06642575; Fri, 24 Jun 2022 23:37:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1656106661; bh=x/2F7wnnx9++HURFgjwgfwtKcJIps+u4eDRx97GPze0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FktPHgHF3x9VZTv7zmTHLU8yCbFcOGDwe4wEi0fHFCQUQATV7iYr3INsRC04oAe2n sSed6OBwE5rNl3b4t4N1Cgu/YitNrCpHqH28NdTfvn9E/h78nwTsNFUQJoGXDSZ34r vnsXFGoLXsfHXphWYLyOH5BEW4YZzky72pxmND0s= Date: Sat, 25 Jun 2022 00:37:23 +0300 From: Laurent Pinchart To: Daniel Vetter Subject: Re: [PATCH] drm/fourcc: Add formats for packed YUV 4:4:4 AVUY and XVUY permutations Message-ID: References: <20220616185210.22018-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Zimmermann , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Daniel, On Fri, Jun 24, 2022 at 11:16:46PM +0200, Daniel Vetter wrote: > On Thu, Jun 16, 2022 at 09:52:10PM +0300, Laurent Pinchart wrote: > > Add FourCCs for two missing permutations of the packed YUV 4:4:4 color > > For a second I thought this 4:4:4 is the bit packing, but it's the 444 > sampling rate thing. > > Man formats are confusing. :-) > > components, namely AVUY and XVUY. > > > > These formats are needed by the NXP i.MX8 ISI. While the ISI is > > supported by a V4L2 device (corresponding formats have been submitted to > > V4L2), it is handled in userspace by libcamera, which uses DRM FourCCs > > for pixel formats. > > > > Signed-off-by: Laurent Pinchart > > --- > > include/uapi/drm/drm_fourcc.h | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h > > index f1972154a594..399d950c53e3 100644 > > --- a/include/uapi/drm/drm_fourcc.h > > +++ b/include/uapi/drm/drm_fourcc.h > > @@ -205,7 +205,9 @@ extern "C" { > > I build script to make sure we don't accidentally assign duplicated codes > would be nice, this is pain to check. Do you mean something like cat include/uapi/drm/drm_fourcc.h | \ grep '#define DRM_FORMAT_.*fourcc_code' | \ sed 's/.*fourcc_code(\([^)]*\)).*/\1/' | \ sort | \ uniq -c | \ grep -qv '^ \+1 ' && echo "Duplicate 4CC !!" ? Where could this live ? > Reviewed-by: Daniel Vetter > > > #define DRM_FORMAT_VYUY fourcc_code('V', 'Y', 'U', 'Y') /* [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian */ > > > > #define DRM_FORMAT_AYUV fourcc_code('A', 'Y', 'U', 'V') /* [31:0] A:Y:Cb:Cr 8:8:8:8 little endian */ > > +#define DRM_FORMAT_AVUY8888 fourcc_code('A', 'V', 'U', 'Y') /* [31:0] A:Cr:Cb:Y 8:8:8:8 little endian */ > > #define DRM_FORMAT_XYUV8888 fourcc_code('X', 'Y', 'U', 'V') /* [31:0] X:Y:Cb:Cr 8:8:8:8 little endian */ > > +#define DRM_FORMAT_XVUY8888 fourcc_code('X', 'V', 'U', 'Y') /* [31:0] X:Cr:Cb:Y 8:8:8:8 little endian */ > > #define DRM_FORMAT_VUY888 fourcc_code('V', 'U', '2', '4') /* [23:0] Cr:Cb:Y 8:8:8 little endian */ > > #define DRM_FORMAT_VUY101010 fourcc_code('V', 'U', '3', '0') /* Y followed by U then V, 10:10:10. Non-linear modifier only */ -- Regards, Laurent Pinchart