Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1289080pxy; Thu, 29 Apr 2021 04:00:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9YTRDewNZJdgWky9xVshV4lX5BcfH1y5TfxaIWFAyz1mvgn1qh/tMaH8GHLnpNWJGkQiy X-Received: by 2002:a17:906:8319:: with SMTP id j25mr27756204ejx.413.1619694002630; Thu, 29 Apr 2021 04:00:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619694002; cv=none; d=google.com; s=arc-20160816; b=ZDxrAeV8TaXdT2JW0XUTOjpAvsWfzFtHjtB/5ge/pnI8jt0vlNsfpR/U0UGnStmf1E 3BfNFn0FgWt/7yjf8H7WaWcngc/8Xd15kAh05vjvPOrkYQj4BsnwOhXUyFuII75/JP1+ 6ht6IzB6vCqxKE+sxgoNJGZSPcu9uoCF1xJz7gYbfBU8EhDFN9MBKWy7LJa4l0Nj3yBc wlF18FsZ0xyOiO3qOHCCGAyA+5TvvkntXwHVKcCUYqKrQ3Ianp7+/5I6/ISBkzQ7iCCa t+bMAZd7/laVoF/bF3WQrtDJ4Mut2CAJkH9j9Na7uaSBK+pTT3HSeIX9icg+u3vLT2O/ aEgw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nBXsu4hoUYVEN5DNp1Kv5q5f0FvqemBCsQCdEh5XBkc=; b=fJw4ZVkJ4Y9rOLSFWoED+ZHqNpdZrXp1FSWQBF7QbREKV0dnwjZDU3c0Fsn3jBkTGO CAxCLVMsGwtCjp2hXWLqHrBjKbGCPllhAcvqBGs7ee+KKhiuBSrKOWVp4zJysHEbGaWX Ai0u9tIiTYcChdu0tadaEGS34ZqKNeEjGQS5f0sY8YbdhPfEpkbXBJy5xJBjOcT10vG9 sSQLvYhWBMljFRTcCvDJ44+FMY0TppkNlJClGGFPbBfc2rq9ak+ZC0yBXJViT6iIV+zm OCOZH+brMyPc1JuIkUl+7uMMXpnBGGygBw6xmcaRoN4wfPwA5TARSbQhGDSe/iIFifp7 zvwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ySv6XmAm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b24si2623599edy.600.2021.04.29.03.59.38; Thu, 29 Apr 2021 04:00:02 -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=@linaro.org header.s=google header.b=ySv6XmAm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240569AbhD2K7Q (ORCPT + 99 others); Thu, 29 Apr 2021 06:59:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231904AbhD2K7J (ORCPT ); Thu, 29 Apr 2021 06:59:09 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9590AC06138B for ; Thu, 29 Apr 2021 03:58:22 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id x5so16156862wrv.13 for ; Thu, 29 Apr 2021 03:58:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nBXsu4hoUYVEN5DNp1Kv5q5f0FvqemBCsQCdEh5XBkc=; b=ySv6XmAm+iC7pw2L7aHI8nQI+7E7BOcbBzQ6MllFX9piRQF3WBxMNgc91BcQzStqOi OBaZ3syju5vPQmmoH6Of9wZOmgB2tpPW48/DkjKv5ZAZf+srv6/EgcRDgyhEKpqM/ymo GR6GByYgtM7wvpM9c3R0WmX+H6BPJ/1icbtwD/ZTv9u5Ajy8V0BjGhPjI/96b5fKRQZd x/UXUjevLcL5qkWeOYtKlk3cF9qRuQTVBQ1l9Rmrt6+b2B0K4kUCw3rf/JaXLU+it4pe KVAbg7gFpbFljqSc2ulL0ZZSZuFbaF0SK0TV3+y8W+z7waamShaXc9VL5r/NVzsx0nMB Wewg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nBXsu4hoUYVEN5DNp1Kv5q5f0FvqemBCsQCdEh5XBkc=; b=DKP2HR0Xu/8Cgfn0e7WucgtJkN6FpMfCkXInwRF1ODC4lde458i6FUQZZPrUBTCRU+ XlPxawsJABujTMrXMP8JyUsXNo6lONAGZ5cPRuST1ddu2xvAX6qTFN4X29gL0sGbqULY 9qYNSy7WSjnYNL2lrVfWnRG/TFpzgLCPv70u2v+uMs1EVT97ESfQIp9WnLoU1HIZMzR2 PV3+aj6NyEDinfKqV5AJyFbzAKHVdTfMrtauMEF1oaWSiUf5v+RYT5kD67tfSjcxkq6n RnQFRtghkDqkayAElxs/7mrZM7N6tZ6gZmUTxixH5Bqiz4C/ZN2UGDn7QNfg29EmgKbd fZUw== X-Gm-Message-State: AOAM532kqTIdH93mfdhQdEpKNab3Z+sdnL5nG165K/gvrdhn49ZosbXQ BjBZ27KBWHJ31i8hO6+tQiE7SA== X-Received: by 2002:a5d:43c1:: with SMTP id v1mr24404406wrr.248.1619693901308; Thu, 29 Apr 2021 03:58:21 -0700 (PDT) Received: from localhost.localdomain (hst-221-29.medicom.bg. [84.238.221.29]) by smtp.gmail.com with ESMTPSA id a9sm3372903wmj.1.2021.04.29.03.58.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Apr 2021 03:58:21 -0700 (PDT) From: Stanimir Varbanov To: 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 , Stanimir Varbanov Subject: [PATCH 1/3] v4l: Add Qualcomm custom compressed pixel formats Date: Thu, 29 Apr 2021 13:58:13 +0300 Message-Id: <20210429105815.2790770-2-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210429105815.2790770-1-stanimir.varbanov@linaro.org> References: <20210429105815.2790770-1-stanimir.varbanov@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Here we add custom Qualcomm raw compressed pixel formats. They are used in Qualcomm SoCs to optimaize the interconnect bandwidth. 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. + * .. _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 */ -- 2.25.1