Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp2063676imm; Thu, 21 Jun 2018 06:44:32 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLOS3SElH06NRNPIES2YRFJRJwv7/jpaYpfzU+Sxj8cWeyTB6jd7DI+lOgvk+Hubaybb8ue X-Received: by 2002:a63:318c:: with SMTP id x134-v6mr6663791pgx.60.1529588672267; Thu, 21 Jun 2018 06:44:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529588672; cv=none; d=google.com; s=arc-20160816; b=FPp4dZzrWoqRWHMJk9fycEY7m94O3odq1XC/0aKPR/PuCIuxiLmUSwYyyMPrQscaJh dRyNuxInu4x/+AL2aXh5nLFVhkFui9MEUzAa4rGGt3CEu0g48CLqAUj5ZtVhtEr1XoU5 268/qL5vs0qYTtwj+Cl8J764WFhoPtnFOSsvpsC9xBzHum2Zh/ptcvsjUlqopTEpAns7 jFRLIof3yzuKbmEINx8awNHIvSQwJO9XLqGHLTx26LHcau/nULtJk6V6dOGJ8SNf//UD kQWkv2/tCg5ltX86dRrk1Bb1sxKV+gXgszoZtIgvbyjc0qCmIkmytZjhCslWrYzgfEI5 OWBA== 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=09Ha5GOZ5AojY4/avLXXgZLKnN7sGWJ1vzUpq8dZDGI=; b=yyZ9ZfDUyY/vj6j99O+CtjAXPSCONpNd/DkaquS1p+pEP4SvHRhS/d06drUd9txgxH 1/MURIB1xpYggHli+55eYyoL2b+R2DMckkfu0HlxHcDFL3LQSuaE0jg+MNAaOBAD4gvS 4QvJ85vDlRECmy5iiWAJ1WVRgoFPfmS13RpdMm8R5dyr0xR019mTyTDVPKOZat6ocCp5 FCSknh3sfEMGW3M6UOFPaVEaOM7HXOQ8E4tbIFwoznfPrIrNbI7BsVUPT/U/ig0FHmnK hBNMwr+axiw0uDPXBwM0Bh6HxQIUqEfWTUotliarmaz6fMVpovQO4vJGQ+PHV9/Btjs8 5+FA== 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 k2-v6si4805213plt.374.2018.06.21.06.44.17; Thu, 21 Jun 2018 06:44:32 -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 S933549AbeFUNnM (ORCPT + 99 others); Thu, 21 Jun 2018 09:43:12 -0400 Received: from kozue.soulik.info ([108.61.200.231]:40782 "EHLO kozue.soulik.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932964AbeFUNnK (ORCPT ); Thu, 21 Jun 2018 09:43:10 -0400 Received: from misaki.sumomo.pri (unknown [IPv6:2001:470:b30d:2:ec4:7aff:fe92:7ff4]) by kozue.soulik.info (Postfix) with ESMTPA id C2C831020E7; Thu, 21 Jun 2018 22:43:52 +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, seanpaul@chromium.org, airlied@linux.ie Subject: [PATCH v2 1/2] drm/fourcc: add a 10bits fully packed variant of NV12 Date: Thu, 21 Jun 2018 21:42:42 +0800 Message-Id: <20180621134243.9557-2-ayaka@soulik.info> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180621134243.9557-1-ayaka@soulik.info> References: <20180621134243.9557-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.4