Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1697538pxy; Thu, 29 Apr 2021 12:25:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2pLA2ivs0SraO4noJdG9fCZBx8He6MjjexcOfz7OksfrNxWYtsqsuQh1GoUpAUlDKbeWc X-Received: by 2002:a17:906:3da9:: with SMTP id y9mr60903ejh.303.1619724311395; Thu, 29 Apr 2021 12:25:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619724311; cv=none; d=google.com; s=arc-20160816; b=j3FOdO8ZYERTBgnbVxk0sJVIfcvHrT+UQT6fAXlbvBQTMCfBPTggIff3SwP4YwWtJM GE1idl5akPt+gAtiS/+omH2cyPHixnBUjILtSPuLjP3SBzAA5pEz5YDimtLIlXjdZdRp bZd7V4Kx2Ic2o/ByTdzbHNdQbQVgXHFir4eYKusk1TsRWJYNA/kKKZ7WiK8WtWUghHSG QLbNglsZ6Q8GvGYC4UozIB7NuXIvVFrI7rXoz5ijlBw5my2+i4kPcnVPytopj+Scsaa7 vPoJKnydd7Vmd7VUaR0+7MHAzyxOBljIOae+DY/79dY0T6i+s1nhKIfhLyqPnFb35ns0 I8Zw== 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=ltkj3GwXMNWaqEgIRsYEcolYZKDxC8Ql9gepvrB9Q24=; b=FrLU2xtjnWd9+ioSSFj9C7vakKsZV5rFtOwoRJmQ2+OnZNghFaFbH/BOP8YKrjxeX6 Qk2XO3yrmB4277sxMUecXa9oO3rRRiVx2/1RDNQSust+8bjNM8bBuWowHufY+eJpgAhe FcQLmcWnNDrQ/p1+eQuyZuAp/m1OVo85km4gxMmGi2dSSWr8xoOEE2VUhrTDq7sgkC9c pRAbypqpAgO0l4CSfWs3esWG8w7/UOzxY6x5HXVaGXPXNB2lAZoG68EfQFfv14UpHt2+ xv8dzYk/6p8YfyHExzd2K1rA3/fYeQo6lNgClNy0Yn9uLjpZ+COrXPQ+v96SnjccyEU2 4OQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ndufresne-ca.20150623.gappssmtp.com header.s=20150623 header.b=TaBriJpT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ds7si885550ejc.164.2021.04.29.12.24.44; Thu, 29 Apr 2021 12:25:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ndufresne-ca.20150623.gappssmtp.com header.s=20150623 header.b=TaBriJpT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233645AbhD2TRz (ORCPT + 99 others); Thu, 29 Apr 2021 15:17:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239559AbhD2TL2 (ORCPT ); Thu, 29 Apr 2021 15:11:28 -0400 Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D17E8C06138E for ; Thu, 29 Apr 2021 12:10:39 -0700 (PDT) Received: by mail-qt1-x830.google.com with SMTP id q4so21619425qtn.5 for ; Thu, 29 Apr 2021 12:10:39 -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:content-transfer-encoding; bh=ltkj3GwXMNWaqEgIRsYEcolYZKDxC8Ql9gepvrB9Q24=; b=TaBriJpTEbcq6utoehleZ+bDiikQrmpNSJk00MCJpyDMZLKOyVSneUzbn7CH4f/qn3 FE1yimgmQ0EwoN8URvM9nU5Uvda1kkFueNohCj18W7thbi5clbQhHBwE3hQzUgPp2fJB +YvpPQTKoOeAx+4wu1ZyUrXd/xHbqG6PZTZrE4k1/hg2zTSqMVaysYRKZY29qGUbpo00 xtHnnxqdp5jV/qFiADbiy6m9EHcrePboNKaCsSdRdB7pMQzuqaqt9xoqUyEm+YTh8LM7 dOAa10WdrQiqJdkNPsoDoz+umXwoXcx66oHDICInmvjRXr4/sLOWjeQOwGQVr+F9lm5f QEbg== 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:content-transfer-encoding; bh=ltkj3GwXMNWaqEgIRsYEcolYZKDxC8Ql9gepvrB9Q24=; b=kikTQm9X24LNyoU3379Do1rjILB8IxCj6pLMMEVytZWX5UpkZq12Um85QTb5iI9ODn bXWfScz++dhWfa6sWUC4AnJIK2pBgQqY5qDnwyV6bUZeVjSU8UZoH4KAqxjRD6PKSKcK YdjRxyo1Ih43FnLVfovXMP0I6qDf2AnV1mFy1uUDA9LmhKYYeuXoyDU9XURXpTWKm+gK jXJsXEsiZ5Z0wUfLccc/AQYBC2lHmbSQ5co0hTYr0CrajNs7khDsTirxkMjt0DlyAWk3 KpC9DK284afY/48P6qu8qVXadwQUmA9tJe8B9oErCmhMWoKm6mLbjtrmApkdNh3GL5cT lJ6g== X-Gm-Message-State: AOAM5334VKMklo/wilKirev8oMEmxX7L8ppy1mM0GdeYuMROfPDwgAEp u1zYmbDTTnxx5d/IgE2HdLdHCA== X-Received: by 2002:ac8:7774:: with SMTP id h20mr901414qtu.79.1619723438687; Thu, 29 Apr 2021 12:10:38 -0700 (PDT) Received: from nicolas-tpx395.localdomain (173-246-12-168.qc.cable.ebox.net. [173.246.12.168]) by smtp.gmail.com with ESMTPSA id r81sm2824049qka.82.2021.04.29.12.10.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Apr 2021 12:10:37 -0700 (PDT) Message-ID: Subject: Re: [PATCH 1/3] v4l: Add Qualcomm custom compressed pixel formats From: Nicolas Dufresne To: Stanimir Varbanov , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-api@vger.kernel.org Cc: Hans Verkuil , Mauro Carvalho Chehab Date: Thu, 29 Apr 2021 15:10:36 -0400 In-Reply-To: <20210429105815.2790770-2-stanimir.varbanov@linaro.org> References: <20210429105815.2790770-1-stanimir.varbanov@linaro.org> <20210429105815.2790770-2-stanimir.varbanov@linaro.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.0 (3.40.0-1.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le jeudi 29 avril 2021 à 13:58 +0300, Stanimir Varbanov a écrit : > Here we add custom Qualcomm raw compressed pixel formats. They are > used in Qualcomm SoCs to optimaize the interconnect bandwidth. Wasn't reviewing, just skimming the lists, but s/optimaize/optimize/ > > Signed-off-by: Stanimir Varbanov > --- >  .../userspace-api/media/v4l/pixfmt-reserved.rst | 12 ++++++++++++ >  drivers/media/v4l2-core/v4l2-ioctl.c | 2 ++ >  include/uapi/linux/videodev2.h | 2 ++ >  3 files changed, 16 insertions(+) > > diff --git a/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst b/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst > index 0b879c0da713..30b9cef4cbf0 100644 > --- a/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst > +++ b/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst > @@ -260,6 +260,18 @@ please make a proposal on the linux-media mailing list. >   of tiles, resulting in 32-aligned resolutions for the luminance plane >   and 16-aligned resolutions for the chrominance plane (with 2x2 >   subsampling). > + * .. _V4L2-PIX-FMT-QC8C: > + > + - ``V4L2_PIX_FMT_QC8C`` > + - 'QC8C' > + - Compressed Macro-tile 8Bit YUV420 format used by Qualcomm platforms. > + The compression is lossless. It contains four planes. Would be nice to document if the bytesperline is meaningful or not. Basically, what information need to be carried to other drivers ? > + * .. _V4L2-PIX-FMT-QC10C: > + > + - ``V4L2_PIX_FMT_QC10C`` > + - 'QC10C' > + - Compressed Macro-tile 10Bit YUV420 format used by Qualcomm platforms. > + The compression is lossless. It contains four planes. >   > > > > > > > >  .. raw:: latex >   > > > > > > > > diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c > index 6a5d1c6d11d6..33ee12b97aa0 100644 > --- a/drivers/media/v4l2-core/v4l2-ioctl.c > +++ b/drivers/media/v4l2-core/v4l2-ioctl.c > @@ -1455,6 +1455,8 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt) >   case V4L2_PIX_FMT_S5C_UYVY_JPG: descr = "S5C73MX interleaved UYVY/JPEG"; break; >   case V4L2_PIX_FMT_MT21C: descr = "Mediatek Compressed Format"; break; >   case V4L2_PIX_FMT_SUNXI_TILED_NV12: descr = "Sunxi Tiled NV12 Format"; break; > + case V4L2_PIX_FMT_QC8C: descr = "QCOM Compressed 8bit Format"; break; > + case V4L2_PIX_FMT_QC10C: descr = "QCOM Compressed 10bit Format"; break; >   default: >   if (fmt->description[0]) >   return; > diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h > index 311a01cc5775..c57628a16cf4 100644 > --- a/include/uapi/linux/videodev2.h > +++ b/include/uapi/linux/videodev2.h > @@ -737,6 +737,8 @@ struct v4l2_pix_format { >  #define V4L2_PIX_FMT_SUNXI_TILED_NV12 v4l2_fourcc('S', 'T', '1', '2') /* Sunxi Tiled NV12 Format */ >  #define V4L2_PIX_FMT_CNF4 v4l2_fourcc('C', 'N', 'F', '4') /* Intel 4-bit packed depth confidence information */ >  #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H', 'I', '2', '4') /* BTTV 8-bit dithered RGB */ > +#define V4L2_PIX_FMT_QC8C v4l2_fourcc('Q', '0', '8', 'C') /* Qualcomm 8-bit compressed */ > +#define V4L2_PIX_FMT_QC10C v4l2_fourcc('Q', '1', '0', 'C') /* Qualcomm 10-bit compresed */ >   > > > > > > > >  /* 10bit raw bayer packed, 32 bytes for every 25 pixels, last LSB 6 bits unused */ >  #define V4L2_PIX_FMT_IPU3_SBGGR10 v4l2_fourcc('i', 'p', '3', 'b') /* IPU3 packed 10-bit BGGR bayer */