Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2740707pxm; Mon, 28 Feb 2022 05:20:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJxnaJTVzBXSOLMUEEBp3tj4ZZKs/nZJpQCa4jwixi3nEo0Q8i5qSxTabAnlFr16fgHunO/c X-Received: by 2002:a17:906:590c:b0:6d6:dc46:1c26 with SMTP id h12-20020a170906590c00b006d6dc461c26mr574413ejq.355.1646054435158; Mon, 28 Feb 2022 05:20:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646054435; cv=none; d=google.com; s=arc-20160816; b=I06YgcvMX09bmh6IHI+YeDKeQAA9GqzcEWsHK3ZDuWpOjtutrjEu0cYa3wfjcPe0kL KVo0v2fGIbA63bZVkMWjra6DyTYIlvlNEin6xABg/A+Eb4wHSaYkKlP7YzOvuGWznjJh Cac54gUHx3cnX8DMD3Kf2WCgcKEIOiV96IU1qyogdjz7pTg8so6iLEadXY3+i8M9hrTj /Wcu2pN0+ZqPz9Nv1LWGwwXjjAOKX9GtL98VBwBvrv0KZ8/uqv6olgm0kbIMtP6YhLag xcx0NkyruYnKT55SprwNrrIjidZXV15WuR/LsF0jLPpXUAm0ovkudmtt1XFqgyrmqbQw 9YFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=+8I/V7LMKeEgdjfech8pVN3rLVcrkyoXC3NkYpHqx50=; b=kpyrmpXuNa4T0WAPqMuKFY8ssToamxKeLRlCntXnpwO3KzA31G9J2opzgHIzA8osy6 bf0L9bbthlbO3HS3q/gmnc8kCA+H3XGqGDuxm2/2UF2STftAbDiTQie4DgJSaeJ8umq6 3Zty0oAT796tDdX0CDsjjzsY1qwOJ4Q8yKdriGJI6E3IxfsZGgYHQZV6qDugrHg8QcaV fNKhplcSp5bZT8SAfDrl66t5kDg7l8oK1hpxJVw8rZxwxNF0P4rUh5b9OazYgwiphrDE HAUv71kTxiZL/09fGTke5pXkz5fPy2Gnq80KnGe2+NWKEzHO4mG0YYCxqWMtOaDga2cX KzTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ndufresne-ca.20210112.gappssmtp.com header.s=20210112 header.b=UzEaMg7J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hd40-20020a17090796a800b006a66824a4a4si7548083ejc.47.2022.02.28.05.20.12; Mon, 28 Feb 2022 05:20:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ndufresne-ca.20210112.gappssmtp.com header.s=20210112 header.b=UzEaMg7J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232050AbiB1Mtg (ORCPT + 99 others); Mon, 28 Feb 2022 07:49:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233371AbiB1Mtf (ORCPT ); Mon, 28 Feb 2022 07:49:35 -0500 Received: from mail-qv1-xf2f.google.com (mail-qv1-xf2f.google.com [IPv6:2607:f8b0:4864:20::f2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF4ED6354 for ; Mon, 28 Feb 2022 04:48:55 -0800 (PST) Received: by mail-qv1-xf2f.google.com with SMTP id fc19so12198122qvb.7 for ; Mon, 28 Feb 2022 04:48:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ndufresne-ca.20210112.gappssmtp.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=+8I/V7LMKeEgdjfech8pVN3rLVcrkyoXC3NkYpHqx50=; b=UzEaMg7JeXuUGaFUzjzNTjWqymgIKqaEVBGX/ytQjyMN6OC9OOJ0/nKWUdYq5uxvI3 /dra9cjZKvXzgDUebBGOWC5W7Vex1+dDK2vfDgq6DQqBF0xV3OAaHLTrixCGbjpTrelZ oKZ4YLNuUVKHI8QeYETFk0iXjog6Qe7igxM3RkkXzBUgb0EBNE3mMMQlLlQIEemz/1up y2yUjx+uzFN2xwsKNATwGf4tXX+27dJGIKH1fBmD8Ml/FNURZakDjIMB+01PmrrJ9Nh8 VkFceIVqIYMtP9KCjfKcXhhAJeXp9s+7UxbIONneuk+b62r95b0yzSskFZltmHazBbRR 26aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=+8I/V7LMKeEgdjfech8pVN3rLVcrkyoXC3NkYpHqx50=; b=6tSa66VSnL0Yg76Snxy9tde6+ott6b4uIeYdqn10F4XuvgJwZ+aAadeSvLfClEDPKS Xp5j63CcO0HrKuBfqXShp7+WnmSPthUswACfxp5RrOZPl855tigGIMd55dEYwEvuljNH 5hdKk/GJRR7bNDf3InjEcFjXpVHIhHK0zv3rDR91ONbGk9wv6xt574fC00XebRDfuKeg o/jZ5aVXEsDuAYEQihchdcMGLB3E0nEzHu+0umgFKn9AZNCdE6zCCY0C4hZi9Mm1rNUR +XG3iyg2glC+jTwgQeHy9F5WdiIWR4+/qFpce9vivBKT4K9MlQ+9L/HPn1hihs+En3H8 gQgw== X-Gm-Message-State: AOAM531Y325c8o/ZybLNeSJR84uFNrH0cs2tQghg7IzmyWEa25h/xno9 +XfounDuFUqV4Z4ZFEkyVx3x9g== X-Received: by 2002:ac8:59c8:0:b0:2de:5f4:7e84 with SMTP id f8-20020ac859c8000000b002de05f47e84mr16487539qtf.97.1646052535083; Mon, 28 Feb 2022 04:48:55 -0800 (PST) Received: from nicolas-tpx395.localdomain (173-246-12-168.qc.cable.ebox.net. [173.246.12.168]) by smtp.gmail.com with ESMTPSA id y24-20020a05620a09d800b00648c8ba03c1sm4906437qky.107.2022.02.28.04.48.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 04:48:54 -0800 (PST) Message-ID: <1b2ce01fb04f29cca58d40bd81d9f4cc46dcebf8.camel@ndufresne.ca> Subject: Re: [RFC PATCH 2/8] media: Add P010 format From: Nicolas Dufresne To: Jernej Skrabec , ezequiel@vanguardiasur.com.ar, p.zabel@pengutronix.de Cc: mchehab@kernel.org, hverkuil-cisco@xs4all.nl, gregkh@linuxfoundation.org, wens@csie.org, samuel@sholland.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev Date: Mon, 28 Feb 2022 07:48:53 -0500 In-Reply-To: <20220227144926.3006585-3-jernej.skrabec@gmail.com> References: <20220227144926.3006585-1-jernej.skrabec@gmail.com> <20220227144926.3006585-3-jernej.skrabec@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.3 (3.42.3-1.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le dimanche 27 février 2022 à 15:49 +0100, Jernej Skrabec a écrit : > Add P010 format, which is commonly used for 10-bit videos. There is a much more complete patch that was sent previously (with documentation and all): https://patchwork.kernel.org/project/linux-rockchip/patch/20210618131526.566762-5-benjamin.gaignard@collabora.com/ regards, Nicolas > > Signed-off-by: Jernej Skrabec > --- > drivers/media/v4l2-core/v4l2-common.c | 2 ++ > drivers/media/v4l2-core/v4l2-ioctl.c | 1 + > include/uapi/linux/videodev2.h | 1 + > 3 files changed, 4 insertions(+) > > diff --git a/drivers/media/v4l2-core/v4l2-common.c b/drivers/media/v4l2-core/v4l2-common.c > index 1db0020e08c0..4ede36546e9c 100644 > --- a/drivers/media/v4l2-core/v4l2-common.c > +++ b/drivers/media/v4l2-core/v4l2-common.c > @@ -275,6 +275,8 @@ const struct v4l2_format_info *v4l2_format_info(u32 format) > { .format = V4L2_PIX_FMT_YUV422P, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 3, .bpp = { 1, 1, 1, 0 }, .hdiv = 2, .vdiv = 1 }, > { .format = V4L2_PIX_FMT_GREY, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 1, .bpp = { 1, 0, 0, 0 }, .hdiv = 1, .vdiv = 1 }, > > + { .format = V4L2_PIX_FMT_P010, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 2, 4, 0, 0 }, .hdiv = 2, .vdiv = 2 }, > + > /* Tiled YUV formats */ > { .format = V4L2_PIX_FMT_NV12_4L4, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 1, 2, 0, 0 }, .hdiv = 2, .vdiv = 2 }, > { .format = V4L2_PIX_FMT_P010_4L4, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 2, 4, 0, 0 }, .hdiv = 2, .vdiv = 2 }, > diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c > index 048f326c57b9..a8d999e23e5b 100644 > --- a/drivers/media/v4l2-core/v4l2-ioctl.c > +++ b/drivers/media/v4l2-core/v4l2-ioctl.c > @@ -1295,6 +1295,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt) > case V4L2_PIX_FMT_M420: descr = "YUV 4:2:0 (M420)"; break; > case V4L2_PIX_FMT_NV12: descr = "Y/CbCr 4:2:0"; break; > case V4L2_PIX_FMT_NV21: descr = "Y/CrCb 4:2:0"; break; > + case V4L2_PIX_FMT_P010: descr = "10-bit Y/CbCr 4:2:0"; break; > case V4L2_PIX_FMT_NV16: descr = "Y/CbCr 4:2:2"; break; > case V4L2_PIX_FMT_NV61: descr = "Y/CrCb 4:2:2"; break; > case V4L2_PIX_FMT_NV24: descr = "Y/CbCr 4:4:4"; break; > diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h > index 772dbadd1a24..211bc11a48cb 100644 > --- a/include/uapi/linux/videodev2.h > +++ b/include/uapi/linux/videodev2.h > @@ -597,6 +597,7 @@ struct v4l2_pix_format { > /* two planes -- one Y, one Cr + Cb interleaved */ > #define V4L2_PIX_FMT_NV12 v4l2_fourcc('N', 'V', '1', '2') /* 12 Y/CbCr 4:2:0 */ > #define V4L2_PIX_FMT_NV21 v4l2_fourcc('N', 'V', '2', '1') /* 12 Y/CrCb 4:2:0 */ > +#define V4L2_PIX_FMT_P010 v4l2_fourcc('P', '0', '1', '0') /* 24 Y/CbCr 4:2:0 10-bit */ > #define V4L2_PIX_FMT_NV16 v4l2_fourcc('N', 'V', '1', '6') /* 16 Y/CbCr 4:2:2 */ > #define V4L2_PIX_FMT_NV61 v4l2_fourcc('N', 'V', '6', '1') /* 16 Y/CrCb 4:2:2 */ > #define V4L2_PIX_FMT_NV24 v4l2_fourcc('N', 'V', '2', '4') /* 24 Y/CbCr 4:4:4 */