Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp807456img; Wed, 20 Mar 2019 11:16:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqxG2LD/QihZLb4BcHehdDqR7JycBib5d0LTO0yspCEAcgi5lE2LwcY3TusE+exJJfZCvYWN X-Received: by 2002:a63:5054:: with SMTP id q20mr8741047pgl.414.1553105810803; Wed, 20 Mar 2019 11:16:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553105810; cv=none; d=google.com; s=arc-20160816; b=j+gNkBl7fds3Tju9zfSBdh/s4jmpTykYY9YxSOUQ6Ud+iCklm3pebtTbwc3txKjfUd nke2FHeLRK0LS8b+T5nQJnw3lg53rwrZC+JizSC8mszITkyxQyLmdNLOBsIm6iIa440U 4Nwda/Z1w/W/B6NyD4Nm5D2ZEUx2lV8qnqO0CZDYxgg0ixn16JSyFD+VMEBEG4/kz0fB SDKI4HMxfa8OGtplUTsrX7A+SAzlJ2RX0YtTbCOFxI3AgBz/w310PctWMds5WXSVLrPJ 6zHKuNJPmhyVVK1IfF4GxljL5bENvpsDW7cMxdjjnpKags/kPuT1KzyPrnpq8scxxjg4 9RvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:nodisclaimer:user-agent:content-language:accept-language :in-reply-to:references:message-id:date:thread-index:thread-topic :subject:cc:to:from:dkim-signature; bh=BpKQbY914KC3AcMUfYWXFlHT+B05nb6hlB4C68WfVZA=; b=YfhP4qCSHb9pfBlO3oNy0p0TalmtTdaoC2SR05FeYZgqwQBscSHCTmhE6KYZ8o6mYb davwDytGIhsRB5mi7vIN2rb2eyYP3Gixld04HXSUeCaeASOe066o/YoxsBASCWKVH8qo ZSIfm67vZnLQvu+PTmRTb5r/D6IH74meFTF/wVWJN8hXdq/MFOTJ+1efsWPS+8NpwFzW 2Wyy6QiAgTe/xTMqBc0FoJd8u4MTAZr6l2WMx/ipOlsto4oYDKX6BaNdsG6FVMvXVy26 xvp4o0DeZINzjzBtq30ZdH4C+LAYfW7XJ/uvqatTc+KNvLBbfF8Yl13fhVVrwm+DNbws tm9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector1-arm-com header.b=oeOZoJSl; 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 c15si2198279pgj.13.2019.03.20.11.16.35; Wed, 20 Mar 2019 11:16:50 -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; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector1-arm-com header.b=oeOZoJSl; 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 S1727371AbfCTSP7 (ORCPT + 99 others); Wed, 20 Mar 2019 14:15:59 -0400 Received: from mail-eopbgr00060.outbound.protection.outlook.com ([40.107.0.60]:43330 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726529AbfCTSP6 (ORCPT ); Wed, 20 Mar 2019 14:15:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BpKQbY914KC3AcMUfYWXFlHT+B05nb6hlB4C68WfVZA=; b=oeOZoJSlYURT2uoycg2Gbe155d7dHnZlGSdyJIfz/R3jIrHkQTSL3RO5jRk4DuOkkK3PVgMgxSSZzNJ0LFVWRg+1m0VFAjnkuSE9K0OZuU12LfPn+5190YzyITm03PzJluVgAuh1MMAFT3o5a7NBEwStWtGWKbpoKs0VSPTBU/8= Received: from AM0PR08MB3025.eurprd08.prod.outlook.com (52.134.93.10) by AM0PR08MB4002.eurprd08.prod.outlook.com (20.178.202.211) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.14; Wed, 20 Mar 2019 18:15:55 +0000 Received: from AM0PR08MB3025.eurprd08.prod.outlook.com ([fe80::7e:6dfb:116b:befd]) by AM0PR08MB3025.eurprd08.prod.outlook.com ([fe80::7e:6dfb:116b:befd%2]) with mapi id 15.20.1709.015; Wed, 20 Mar 2019 18:15:55 +0000 From: Brian Starkey To: Nicolas Dufresne CC: Maxime Ripard , Daniel Vetter , David Airlie , Maarten Lankhorst , Sean Paul , Mauro Carvalho Chehab , Sakari Ailus , Hans Verkuil , Laurent Pinchart , Thomas Petazzoni , Paul Kocialkowski , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , "linux-media@vger.kernel.org" , nd Subject: Re: [RFC PATCH 18/20] lib: image-formats: Add v4l2 formats support Thread-Topic: [RFC PATCH 18/20] lib: image-formats: Add v4l2 formats support Thread-Index: AQHU30j15eYGJfx+ZkmNvpI6wq6Apw== Date: Wed, 20 Mar 2019 18:15:54 +0000 Message-ID: <20190320181553.radwlhapzn464dlh@DESKTOP-E1NTVVP.localdomain> References: In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: NeoMutt/20180716-849-147d51-dirty x-originating-ip: [217.140.106.49] x-clientproxiedby: LO2P265CA0418.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a0::22) To AM0PR08MB3025.eurprd08.prod.outlook.com (2603:10a6:208:5c::10) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Brian.Starkey@arm.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 118528bc-f306-4126-864f-08d6ad6017ac x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020);SRVR:AM0PR08MB4002; x-ms-traffictypediagnostic: AM0PR08MB4002: x-ms-exchange-purlcount: 1 nodisclaimer: True x-microsoft-antispam-prvs: x-forefront-prvs: 098291215C x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(366004)(376002)(39860400002)(346002)(136003)(189003)(199004)(256004)(386003)(97736004)(52116002)(9686003)(81156014)(76176011)(966005)(99286004)(102836004)(105586002)(106356001)(305945005)(6246003)(58126008)(72206003)(68736007)(6506007)(316002)(14454004)(54906003)(7736002)(2906002)(81166006)(478600001)(6512007)(25786009)(6306002)(8936002)(6916009)(66066001)(6116002)(1076003)(229853002)(3846002)(4326008)(86362001)(476003)(53936002)(14444005)(44832011)(5660300002)(486006)(446003)(71200400001)(71190400001)(6436002)(11346002)(8676002)(7416002)(6486002)(26005)(186003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR08MB4002;H:AM0PR08MB3025.eurprd08.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 2EZSvcw+CdYOaYsYpr0MeT5bkoc17Omlno6GxTi9DbLSoMCmVD0nfs9qKSGozu4zdPfXzui3jgH0TdNzjD+som1JrbtCi3IKqkUg2mdxj5Chqtl1c4a2+/BUalPxGCpHfw+5YLD6MLcTc2HOovTkBG9xKRW0sWtu1oR1OMOu63H38ynb7HbIYfoBMWciG5F0DndSSLE2av6tcviRFGEhcHBsLaojwcQpivCBUt1KPzcDC0wM/XL0JHghaOt2nUwTpOo2Y8RS8r2nN+/glcRk1KHN6LrOGzW7OxalbeV5QLSSnyj3bdOosIz4tL5qwlxtloqz3c/tdT11rSsJ2bxmymtK78cOYwDwyzLvY+/iFt6mO1C0Ho/+0f4VC4OMQ9I8oCV3iQy8oiZLEJ139HqF2lYA0XUSEUI/QJqYyjsjCA4= Content-Type: text/plain; charset="us-ascii" Content-ID: <4811124997DA2F4383E90C1A9A8E2083@eurprd08.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 118528bc-f306-4126-864f-08d6ad6017ac X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Mar 2019 18:15:54.9935 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4002 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 19, 2019 at 07:29:18PM -0400, Nicolas Dufresne wrote: > All RGB mapping should be surrounded by ifdef, because many (not all) > DRM formats represent the order of component when placed in a CPU > register, unlike V4L2 which uses memory order. I've pick this one > randomly, but this one on most system, little endian, will match > V4L2_PIX_FMT_XBGR32. This type of complex mapping can be found in > multiple places, notably in GStreamer: >=20 > https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/blob/master/sys/= kms/gstkmsutils.c#L45 >=20 I do sort-of wonder if it's worth trying to switch to common fourccs between DRM and V4L2 (and whatever else there is). The V4L2 formats list is quite incomplete and a little quirky in places (V4L2_PIX_FORMAT_XBGR32 and V4L2_PIX_FORMAT_XRGB32 naming inconsistency being one. 'X' isn't even next to 'B' in XBGR32). At least for newly-added formats, not using a common definition doesn't make a lot of sense to me. Longer term, I also don't really see any downsides to unification. -Brian