Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp6779257imm; Sun, 20 May 2018 10:25:46 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo8WwTvrMhS1Y37+dYTREzygKTIe2fLx3o09HIyN5fK1z7iLqi1L65H1+DrOwXSj2ssf4Wz X-Received: by 2002:a17:902:14cb:: with SMTP id y11-v6mr17109619plg.229.1526837145996; Sun, 20 May 2018 10:25:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526837145; cv=none; d=google.com; s=arc-20160816; b=dJCaOim+4MFCL2rNWVwb+94VGVVvJxs4HiHemhMgIqZlZfNSTqCfFJ3FTn6lghWRSd MfuujsSwb3en9cEX1CcsZtbvz2S/WXHwI/9X1UquOhB1WxJ1ya/DgayFLTKabg0MezT0 Tzv42tjS1N7oql4Gd551F2WGVHyjdCYeo0bmrn15t5Q8jQ/8DDFvtxEXv4y3a+BffK/E psOXtONFkuOBWeuxvymPMNEoJuPZQwJZDuSMMpFj+ubmHjP63A4ZOn4jeCtZpMHAgOUr zjQ+ufnZzb6enOQerTM0G6SlYIRD8lZK49aaBTvzzWlhvr+kbA3WtiaijZ7x08YX6Rev uHJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=W2Mc6o2KpnfhA7g5LuUZE3YtLacLIwI4YI0fXvc3VEo=; b=W3LOKFbtNMtqqk3ADZwmJNBj3cf7RGobCj3CpBImm/G2K5N71G2pN0teHsALICxrOm gnih9Q5u1Sl91HBDnkvWH1jqWbMo2dJ/DKLPKyBnkcUQzeDCYUQJf3qZi/PTGd8ShqzT M4JiB5OzdbnxZKbQsvmMFCCNBWOIxZHasLh4IyUL1p076CClB44bt6VaIybOE25rfbcY 0GK84ShrTmaPgpM5U1yT5nSP2SPUekv6gSYnHU/wrCLIccVfaevjaSZBDRq3E6BdBkRW 82O0wKPIzN36vSLUSpjuWUo+ugbVuLNpkTM26A/SArM96rORhSAaonQvDv7UeUIJOaFv xVjw== ARC-Authentication-Results: i=1; mx.google.com; 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 t70-v6si3592641pgc.141.2018.05.20.10.25.31; Sun, 20 May 2018 10:25:45 -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; 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 S1752634AbeETRXU (ORCPT + 99 others); Sun, 20 May 2018 13:23:20 -0400 Received: from kozue.soulik.info ([108.61.200.231]:37396 "EHLO kozue.soulik.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751902AbeETRXO (ORCPT ); Sun, 20 May 2018 13:23:14 -0400 Received: from misaki.sumomo.pri (unknown [IPv6:2001:470:b30d:2:ec4:7aff:fe92:7ff4]) by kozue.soulik.info (Postfix) with ESMTPA id 510CB100CC8; Mon, 21 May 2018 02:17:35 +0900 (JST) From: Randy Li To: dri-devel@lists.freedesktop.org Cc: Randy Li , hjc@rock-chips.com, heiko@sntech.de, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, nicolas.dufresne@collabora.com, gustavo@padovan.org, maarten.lankhorst@linux.intel.com, seanpaul@chromium.org, airlied@linux.ie Subject: [PATCH 1/2] drm/fourcc: add a 10bits fully packed variant of NV12 Date: Mon, 21 May 2018 01:17:04 +0800 Message-Id: <20180520171705.29690-2-ayaka@soulik.info> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180520171705.29690-1-ayaka@soulik.info> References: <20180520171705.29690-1-ayaka@soulik.info> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This pixel format is a fully packed and 10bits variant of NV12. A luma pixel would take 10bits in memory, without any filled bits between pixels in a stride. The color gamut follows the BT.2020 standard. Signed-off-by: Randy Li --- drivers/gpu/drm/drm_fourcc.c | 1 + include/uapi/drm/drm_fourcc.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c index 5ca6395cd4d3..1f43967c4013 100644 --- a/drivers/gpu/drm/drm_fourcc.c +++ b/drivers/gpu/drm/drm_fourcc.c @@ -173,6 +173,7 @@ const struct drm_format_info *__drm_format_info(u32 format) { .format = DRM_FORMAT_UYVY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, { .format = DRM_FORMAT_VYUY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, { .format = DRM_FORMAT_AYUV, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, + { .format = DRM_FORMAT_NV12_10LE40, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .hsub = 2, .vsub = 2 }, }; unsigned int i; diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h index e04613d30a13..8eabf01e966f 100644 --- a/include/uapi/drm/drm_fourcc.h +++ b/include/uapi/drm/drm_fourcc.h @@ -140,6 +140,9 @@ extern "C" { #define DRM_FORMAT_NV61 fourcc_code('N', 'V', '6', '1') /* 2x1 subsampled Cb:Cr plane */ #define DRM_FORMAT_NV24 fourcc_code('N', 'V', '2', '4') /* non-subsampled Cr:Cb plane */ #define DRM_FORMAT_NV42 fourcc_code('N', 'V', '4', '2') /* non-subsampled Cb:Cr plane */ +/* A fully packed variant of NV12_10LE32 */ +#define DRM_FORMAT_NV12_10LE40 fourcc_code('R', 'K', '2', '0') /* 2x2 subsampled Cr:Cb plane */ + /* * 3 plane YCbCr -- 2.14.3