Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp912040img; Fri, 22 Mar 2019 11:13:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqxN9CLvfSpt/SPN2VVEnVUJZ+O+H5GgAuv9ew4YQHAfMe+G+LaQcmYXceWiNVyKNWu8/x32 X-Received: by 2002:aa7:8459:: with SMTP id r25mr10802475pfn.65.1553278394401; Fri, 22 Mar 2019 11:13:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553278394; cv=none; d=google.com; s=arc-20160816; b=0K3mPmDBv4Wf5icdaVgj1/1c5KCCvZJKmEyipDX/w+KqvAv0t1M9AjIME0k2gcboIs BdOTtV6eXac3iwka80BY7CloCmwvV5bT8x+Kexc/SvcLjhKKSt4qzWE2cevppH69Vmd6 17F+GytJaNsx4ceYF/rxhJaEzpSwY4ElQK+CprGeHBIy1iEv0gaLL71ElKgoEPLV9tud AyT4h43MJEvIe8++e46+m96lWLk95tC/cuOiRhPnYUYwtMqCZphTVRSgXYRmN6UegaoS L2L1J0YBDWiuLtOoUKVIDbTHsFjRAcPGoVaJxj/NX4sM1umX932eEC5RWByT6BZJ9nuU ZCaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id:dkim-signature; bh=qz6cnN0BZcfG1DHSDh71YJmldkrRVU/OMC0SkuVzbnA=; b=mdvYb4PBxauq27Nrsee00XCQB8HrC+/DKNL8ZmQRBhJfaenMGK2VgUymEcI3RpW/qu x/FKxhbFU4zerd16y3MLVq/zjy75L3w8Q7Nc/Ga8DXo7QbMsmghR9K1MU9sl5kriKaTg mFtimgeWnQO/9PN0B6/1jmpG71lXJrrcCX9gEarYl4yYPFFXFP9tXkZXCAbQ+PhexTo+ N/x8hPmsZioVD8RAPCFxbfhB3rUrxaLj30na5b38Fou6hr3B1S+abpbJr1MfslDsfRau 4sCWV8FLW7KlbPmX9cxwYaZdG9T4zYok3zP5rhzEBtYbSMjD5/ckztK8v/2T3JjPXJCL alhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ndufresne-ca.20150623.gappssmtp.com header.s=20150623 header.b=LKFEWKOl; 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 x16si7492596pgg.335.2019.03.22.11.12.55; Fri, 22 Mar 2019 11:13:14 -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=@ndufresne-ca.20150623.gappssmtp.com header.s=20150623 header.b=LKFEWKOl; 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 S1728648AbfCVSLx (ORCPT + 99 others); Fri, 22 Mar 2019 14:11:53 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:45454 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727801AbfCVSLx (ORCPT ); Fri, 22 Mar 2019 14:11:53 -0400 Received: by mail-qt1-f194.google.com with SMTP id v20so3503317qtv.12 for ; Fri, 22 Mar 2019 11:11:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ndufresne-ca.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version; bh=qz6cnN0BZcfG1DHSDh71YJmldkrRVU/OMC0SkuVzbnA=; b=LKFEWKOl+gs9s23UnFxaMp/3/FIXFe1oB4YZw4yIaa4KrxmYNwjNG0MbiOalLW3hE0 TkCjwa+t8uVKJtA5cto3vuK3pUhayCFsRXMgmX5UcaAoeBufD7HmLlsRosRppNCCS33S 6jVk3BsYryaRj8MdnIuCsRIuqagOc9a2cwKtHdQNKBAZP4IvbydDSYGKAaCGYzvhPAKY ync/MUMAC3EkBBEZxtqdhYy6/s/A8jqaQ6df39/ccUWwvmgST6Qj0YqOAtYsHutGEk2V JZdQCa0sdv01Pt3+0kgo5zLM5SmcNNJ5139+UwpC3pjciwZnL6Dc7s2y7f8qbP9n3wWZ OI4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version; bh=qz6cnN0BZcfG1DHSDh71YJmldkrRVU/OMC0SkuVzbnA=; b=cNrIsSO0UUg31rjuzhy3MSahW2+gpK1CfVZdU0fK9EdvZao3cq1lEkZPLLY8fLHq1d a7b/fFgl1VLZ2EOeE9y1gPXZSw9ohGU06nE5KZHljcAng9jPEvB6y2vgHYuyrORXGFH+ vU3ez7jzdiWw3FwBFKBdTYqcEBHbIeYJojagqFHt54H8h3H9+ibGT3pyAPkhiBY8HClm g6TfKch3LRgMlQdv890vHn0MISM7070XZuKscD9sMEdo53RQuylLg28C2BJ0xovTfT2X sbu2U+eRpQNwroMKBUtNXSu7/DfzLs5ala3ebjKPu/m8UzarDPqB8uEfuzW3UJzxJmxH RCIg== X-Gm-Message-State: APjAAAU4UdebSk5sLS7hvMry47+DvlNkVRXz8p/zMpBM0Mpa6ZEMriHv oAUKYV91lxFMx9pfAX6ZQe4fqw== X-Received: by 2002:aed:3608:: with SMTP id e8mr9484739qtb.31.1553278311515; Fri, 22 Mar 2019 11:11:51 -0700 (PDT) Received: from tpx230-nicolas.collaboramtl (modemcable154.55-37-24.static.videotron.ca. [24.37.55.154]) by smtp.gmail.com with ESMTPSA id i33sm1526204qtb.64.2019.03.22.11.11.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Mar 2019 11:11:50 -0700 (PDT) Message-ID: Subject: Re: [RFC PATCH 18/20] lib: image-formats: Add v4l2 formats support From: Nicolas Dufresne To: Ville =?ISO-8859-1?Q?Syrj=E4l=E4?= Cc: Paul Kocialkowski , Maxime Ripard , Daniel Vetter , David Airlie , Maarten Lankhorst , Sean Paul , Mauro Carvalho Chehab , Sakari Ailus , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Hans Verkuil , Laurent Pinchart , Thomas Petazzoni , linux-media@vger.kernel.org, Daniel Stone Date: Fri, 22 Mar 2019 14:11:48 -0400 In-Reply-To: <20190322144210.GB3888@intel.com> References: <20190320142739.GK3888@intel.com> <20190320160939.GR3888@intel.com> <20190320164133.GT3888@intel.com> <20190320183914.GV3888@intel.com> <46df4fb13636b90c147839b0aa5ad1ac33030461.camel@bootlin.com> <20190321163532.GG3888@intel.com> <20190322144210.GB3888@intel.com> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-mXZ6tifngVMDJDmbi+Oj" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-mXZ6tifngVMDJDmbi+Oj Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Le vendredi 22 mars 2019 =C3=A0 16:42 +0200, Ville Syrj=C3=A4l=C3=A4 a =C3= =A9crit : > On Thu, Mar 21, 2019 at 03:14:06PM -0400, Nicolas Dufresne wrote: > > Le jeudi 21 mars 2019 =C3=A0 18:35 +0200, Ville Syrj=C3=A4l=C3=A4 a =C3= =A9crit : > > > > I'm not sure what it's worth, but there is a "pixel format guide" > > > > project that is all about matching formats from one API to another:= =20 > > > > https://afrantzis.com/pixel-format-guide/ (and it has an associated > > > > tool too). > > > >=20 > > > > On the page about DRM, it seems that they got the word that DRM for= mats > > > > are the native pixel order in little-endian systems: > > > > https://afrantzis.com/pixel-format-guide/drm.html > > >=20 > > > Looks consistent with the official word in drm_fourcc.h. > > >=20 > > > $ python3 -m pfg find-compatible V4L2_PIX_FMT_XBGR32 drm > > > Format: V4L2_PIX_FMT_XBGR32 > > > Is compatible on all systems with: > > > DRM_FORMAT_XRGB8888 > > > Is compatible on little-endian systems with: > > > Is compatible on big-endian systems with: > > >=20 > > > $ python3 -m pfg find-compatible DRM_FORMAT_XRGB8888 v4l2 > > > Format: DRM_FORMAT_XRGB8888 > > > Is compatible on all systems with: > > > V4L2_PIX_FMT_XBGR32 > > > Is compatible on little-endian systems with: > > > Is compatible on big-endian systems with: > > >=20 > > > Even works both ways :) > > >=20 > > > > Perhaps some drivers have been abusing the format definitions, lead= ing > > > > to the inconsistencies that Nicolas could witness? > > >=20 > > > That is quite possible, perhaps even likely. No one really > > > seems interested in making sure big endian systems actually > > > work properly. I believe the usual approach is to hack > > > around semi-rnadomly until the correct colors accidentally > > > appear on the screen. > >=20 > > We did not hack around randomly. >=20 > BTW I didn't mean to imply it was you who hacked around randomly. > Sorry if you got that impression. >=20 > What I was trying to convey is the following sequence of events: > 1. random person X gets their hand on a big endian machine for > a while > 2. colors are wrong > 3. they hack stuff until the colors are correct in their > current use case > 4. they move on to more interesting things Thanks for clarification. Nicolas --=-mXZ6tifngVMDJDmbi+Oj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQSScpfJiL+hb5vvd45xUwItrAaoHAUCXJUlZAAKCRBxUwItrAao HKKzAKCMEnieITwh6pMvL3NLsy7RUoZmtgCg2OozBvt/rLlUXddaD435eszT8bc= =Hs9Q -----END PGP SIGNATURE----- --=-mXZ6tifngVMDJDmbi+Oj--