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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9086BC4167B for ; Tue, 20 Dec 2022 09:10:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229612AbiLTJKF (ORCPT ); Tue, 20 Dec 2022 04:10:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229513AbiLTJKD (ORCPT ); Tue, 20 Dec 2022 04:10:03 -0500 Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDD1E7661; Tue, 20 Dec 2022 01:10:01 -0800 (PST) Received: by mail-qt1-f178.google.com with SMTP id h26so6616330qtu.2; Tue, 20 Dec 2022 01:10:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2ZhjR6xVXhmmNThDy/2WcduVvAA5lIhOxqbWgZts2YU=; b=Rj5XEgBFaayNCRV8iVcUilP3bw29poWSldD4/kIGm8QZjIebr/ICuiTBU3ZagKTX4y uaTgWx4tuQiYN1N2MCNNbssrZRPBeyaXKY1XGhFp6d2Zsj+I5z5feXxabjqDUM7ro9Tp iKHtkIalEs8gy0uh9kQZ1AeWf/jU8OqF2FnZqwZiMbNI8lV7kDM2mKW8CdLs/2o+cd7s bTLi6UyaduDwZ2HFvkD3xq+BGr9PR4lLyX1+lYq5N/rp4ycITzL+AyxcWP1beGwjOjls NRrr6YpyKb/u2b3/R3/5KmiTrPwp9inyVetBT3NENnb2uuh67z8DFtwW+/2T2MWxBPIW mXKQ== X-Gm-Message-State: ANoB5pkSRkXG59fsMvEhzQgGM1+uPdmpZEIAR4TK5kUiQjuA5DajppPF 1jDJbQg3ysdXaCgYeSjEPw3sObUyW1r4lg== X-Google-Smtp-Source: AA0mqf7/hLjQxcR2P72YxLZ0jbRxmGG9W/iccVyBzEhS9K/5vtWA65li+sWCU2Jd7G2akWyZ2t6CrA== X-Received: by 2002:ac8:4a17:0:b0:3a7:e2df:e868 with SMTP id x23-20020ac84a17000000b003a7e2dfe868mr55479215qtq.41.1671527400747; Tue, 20 Dec 2022 01:10:00 -0800 (PST) Received: from mail-yb1-f176.google.com (mail-yb1-f176.google.com. [209.85.219.176]) by smtp.gmail.com with ESMTPSA id u5-20020a05620a430500b006ff8ac9acfdsm8707091qko.49.2022.12.20.01.09.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Dec 2022 01:10:00 -0800 (PST) Received: by mail-yb1-f176.google.com with SMTP id 203so7707476yby.10; Tue, 20 Dec 2022 01:09:59 -0800 (PST) X-Received: by 2002:a25:7a02:0:b0:6f7:952d:b145 with SMTP id v2-20020a257a02000000b006f7952db145mr45769325ybc.604.1671527399695; Tue, 20 Dec 2022 01:09:59 -0800 (PST) MIME-Version: 1.0 References: <20221219140139.294245-1-tomi.valkeinen+renesas@ideasonboard.com> <20221219140139.294245-8-tomi.valkeinen+renesas@ideasonboard.com> <2f252958-1bb1-006a-b450-1315be8a3c9f@xs4all.nl> In-Reply-To: <2f252958-1bb1-006a-b450-1315be8a3c9f@xs4all.nl> From: Geert Uytterhoeven Date: Tue, 20 Dec 2022 10:09:46 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 7/7] drm: rcar-du: Add new formats (2-10-10-10 ARGB, Y210) To: Hans Verkuil Cc: Laurent Pinchart , Tomi Valkeinen , linux-renesas-soc@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, Kieran Bingham , Nicolas Dufresne , Sakari Ailus Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Hi Hans, On Tue, Dec 20, 2022 at 10:01 AM Hans Verkuil wrote: > On 19/12/2022 22:47, Laurent Pinchart wrote: > > (CC'ing Sakari and Hans) > > > > Thank you for the patch. > > > > On Mon, Dec 19, 2022 at 04:01:39PM +0200, Tomi Valkeinen wrote: > >> Add new pixel formats: RGBX1010102, RGBA1010102, ARGB2101010 and Y210. > >> > >> Signed-off-by: Tomi Valkeinen > >> --- > >> drivers/gpu/drm/rcar-du/rcar_du_kms.c | 24 +++++++++++++ > >> drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 49 +++++++++++++++++++++++++-- > >> 2 files changed, 71 insertions(+), 2 deletions(-) > >> > >> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/rcar-du/rcar_du_kms.c > >> index 8c2719efda2a..8ccabf5a30c4 100644 > >> --- a/drivers/gpu/drm/rcar-du/rcar_du_kms.c > >> +++ b/drivers/gpu/drm/rcar-du/rcar_du_kms.c > >> @@ -259,6 +259,24 @@ static const struct rcar_du_format_info rcar_du_format_infos[] = { > >> .bpp = 32, > >> .planes = 1, > >> .hsub = 1, > >> + }, { > >> + .fourcc = DRM_FORMAT_RGBX1010102, > > > > Ah, here the format makes sense. > > > >> + .v4l2 = V4L2_PIX_FMT_XBGR2101010, > > > > But this is horrible :-( Could we use the same names as DRM for new > > formats, when there is no conflict with existing V4L2 formats ? > > > > Sakari, Hans, what do you think ? Please see patch 1/7 in the series for > > the format definitions. > > V4L2 describes pixel formats based on how they appear in memory from the > lowest to highest memory address. So that means big endian? > If I am not mistaken, DRM uses the CPU order. So that explains the difference > in naming. I don't think we should hide that difference. And V4L2 has been > quite consistent in following memory ordering in the naming (except possibly > for some of the really old pixelformats). DRM uses little endian. > Departing from that would be more of a hindrance than a help, IMHO. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds 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 291B0C10F1E for ; Tue, 20 Dec 2022 09:10:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AB3DB10E0B8; Tue, 20 Dec 2022 09:10:16 +0000 (UTC) Received: from mail-qv1-f52.google.com (mail-qv1-f52.google.com [209.85.219.52]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7CA5310E0B8 for ; Tue, 20 Dec 2022 09:10:01 +0000 (UTC) Received: by mail-qv1-f52.google.com with SMTP id u10so7920155qvp.4 for ; Tue, 20 Dec 2022 01:10:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2ZhjR6xVXhmmNThDy/2WcduVvAA5lIhOxqbWgZts2YU=; b=lNNVvMBcIoFmz4H8E8r3c4U+auYTHnFVGOfXqricHVHWtWCA8sel4xpHghHkB0kDq5 JfOhJ92zF3dmf4F2eloQUaEs/cR+NE1lrc63GYP/gOdw+yrNoozzu1cJegqUpcUl+pbn kqoCLfTW/poFm567V72jHf6O99xJxYhcSOrZy/cFS/PLwuNmKwTSPEeLjatssPYCf8k3 YxtYaIdUN7f92bnojtftoKYB62MiSXg78/FIfhdjSMTP2mDJSADy00SpzoEkvUG/izWy kJOKykpn2/cxgbg+UvHYcg5Np45m5/cZTt1dsBB5iUk8AVy4KzaDXoMQsji2OfOzzfEt S8UA== X-Gm-Message-State: ANoB5pmaKRXkcZy1sMGnamVomTij4ESFkxKI7lUAkh0g71VDdoZ7h/Vy rpnJ9u53mCmI6q6PCEzA7iqZMVgMuJLy/g== X-Google-Smtp-Source: AA0mqf5XLHyljY+/R61sORjwAM8AOjejSh8uDHY3NqDFTXPqrQ7R/P2Lygtv1j4K8UYhVdu70FbCuA== X-Received: by 2002:ad4:42a9:0:b0:4c7:5f25:83fc with SMTP id e9-20020ad442a9000000b004c75f2583fcmr60446766qvr.6.1671527400509; Tue, 20 Dec 2022 01:10:00 -0800 (PST) Received: from mail-yb1-f181.google.com (mail-yb1-f181.google.com. [209.85.219.181]) by smtp.gmail.com with ESMTPSA id br12-20020a05620a460c00b006faf76e7c9asm8565837qkb.115.2022.12.20.01.10.00 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Dec 2022 01:10:00 -0800 (PST) Received: by mail-yb1-f181.google.com with SMTP id j206so12277095ybj.1 for ; Tue, 20 Dec 2022 01:09:59 -0800 (PST) X-Received: by 2002:a25:7a02:0:b0:6f7:952d:b145 with SMTP id v2-20020a257a02000000b006f7952db145mr45769325ybc.604.1671527399695; Tue, 20 Dec 2022 01:09:59 -0800 (PST) MIME-Version: 1.0 References: <20221219140139.294245-1-tomi.valkeinen+renesas@ideasonboard.com> <20221219140139.294245-8-tomi.valkeinen+renesas@ideasonboard.com> <2f252958-1bb1-006a-b450-1315be8a3c9f@xs4all.nl> In-Reply-To: <2f252958-1bb1-006a-b450-1315be8a3c9f@xs4all.nl> From: Geert Uytterhoeven Date: Tue, 20 Dec 2022 10:09:46 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 7/7] drm: rcar-du: Add new formats (2-10-10-10 ARGB, Y210) To: Hans Verkuil Content-Type: text/plain; charset="UTF-8" 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: Kieran Bingham , dri-devel@lists.freedesktop.org, Nicolas Dufresne , linux-renesas-soc@vger.kernel.org, Sakari Ailus , Laurent Pinchart , Tomi Valkeinen , linux-media@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Hans, On Tue, Dec 20, 2022 at 10:01 AM Hans Verkuil wrote: > On 19/12/2022 22:47, Laurent Pinchart wrote: > > (CC'ing Sakari and Hans) > > > > Thank you for the patch. > > > > On Mon, Dec 19, 2022 at 04:01:39PM +0200, Tomi Valkeinen wrote: > >> Add new pixel formats: RGBX1010102, RGBA1010102, ARGB2101010 and Y210. > >> > >> Signed-off-by: Tomi Valkeinen > >> --- > >> drivers/gpu/drm/rcar-du/rcar_du_kms.c | 24 +++++++++++++ > >> drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 49 +++++++++++++++++++++++++-- > >> 2 files changed, 71 insertions(+), 2 deletions(-) > >> > >> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/rcar-du/rcar_du_kms.c > >> index 8c2719efda2a..8ccabf5a30c4 100644 > >> --- a/drivers/gpu/drm/rcar-du/rcar_du_kms.c > >> +++ b/drivers/gpu/drm/rcar-du/rcar_du_kms.c > >> @@ -259,6 +259,24 @@ static const struct rcar_du_format_info rcar_du_format_infos[] = { > >> .bpp = 32, > >> .planes = 1, > >> .hsub = 1, > >> + }, { > >> + .fourcc = DRM_FORMAT_RGBX1010102, > > > > Ah, here the format makes sense. > > > >> + .v4l2 = V4L2_PIX_FMT_XBGR2101010, > > > > But this is horrible :-( Could we use the same names as DRM for new > > formats, when there is no conflict with existing V4L2 formats ? > > > > Sakari, Hans, what do you think ? Please see patch 1/7 in the series for > > the format definitions. > > V4L2 describes pixel formats based on how they appear in memory from the > lowest to highest memory address. So that means big endian? > If I am not mistaken, DRM uses the CPU order. So that explains the difference > in naming. I don't think we should hide that difference. And V4L2 has been > quite consistent in following memory ordering in the naming (except possibly > for some of the really old pixelformats). DRM uses little endian. > Departing from that would be more of a hindrance than a help, IMHO. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds