Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1340404imm; Tue, 22 May 2018 02:26:48 -0700 (PDT) X-Google-Smtp-Source: AB8JxZorp6i+34d4/wHI1sDdP0Q2L5S+ydZJK3mPnbUaYSf4xqrrFR9YrZbukdsSSRHMQzLT2ymp X-Received: by 2002:a62:9d5a:: with SMTP id i87-v6mr23661725pfd.190.1526981208612; Tue, 22 May 2018 02:26:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526981208; cv=none; d=google.com; s=arc-20160816; b=tPu+KFHN1GHY3FIvI/tw2AJjC+yf+0tPxNazj7HHQlFnI8P8McT0kXOhhdqVZtAjcL ECUzUOfGaY7Z/dmDvjTx84u+YRlzwTJZ43pNML4hdiM/mjHxbG7MYLMXjKxUdgueYGEI HZ7QIBf6RFyCh1I5ElcVVgodNXGX1wSn1/1OBh//xRsUX+wqzjYX7zbu2fy02Qwf1bOh bW0tS55dG8YbyD+D1c7gLi47MIJ0nM76b7z9S6vrtZf3Tl91cpL2GYIssmYAsuf0I2v2 7KNfzimaJkr6eq7HtunsHCRAp0znERVDoY7CpfTNS9j0vDzHEBBqh7r5qHcmNMuVVrF9 XlqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=17Ql1Yi9TcG9Gds3jpvk34Sovj5zl6iAWrmA1vSrUmo=; b=YceKijOhz1y9rRLDP9BAso123WKCXH0xyYmdkia67v8/4XfwCcHtiqxGhA5S5sXv4V zrZaXi/Myid1VYQ6CgnnqDnxssxhZ6trZUMXvEMSMIOknQFZzOejjuGoNivV1iO4v+Gb GIatSljozxkl2oAhjcXX6+yoSWJLPnSliMOoekD0uccxS049L6H2rI+eDkBSEzZjco9t 6Kc2QbtSAMSN/S0/5fgD+gkUBX2zSwLjmT5RtXOgGozBoqThgBbrJ8cBG1X8/Jn4KHez zfYsyfR3OvkXlVHdymEiVfJADjzyyPKkYfs1XGJMpC6IKV1P07a9dnnZ+YO8QrZpPT91 /APg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r4-v6si12790809pgp.103.2018.05.22.02.26.33; Tue, 22 May 2018 02:26:48 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751279AbeEVJ0T (ORCPT + 99 others); Tue, 22 May 2018 05:26:19 -0400 Received: from mga06.intel.com ([134.134.136.31]:18099 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750707AbeEVJ0Q (ORCPT ); Tue, 22 May 2018 05:26:16 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 May 2018 02:26:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,429,1520924400"; d="scan'208";a="226267419" Received: from avital-mobl2.ger.corp.intel.com (HELO [10.252.35.162]) ([10.252.35.162]) by orsmga005.jf.intel.com with ESMTP; 22 May 2018 02:26:13 -0700 Subject: Re: [PATCH 1/2] drm/fourcc: add a 10bits fully packed variant of NV12 To: Randy Li , dri-devel@lists.freedesktop.org Cc: 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 References: <20180520171705.29690-1-ayaka@soulik.info> <20180520171705.29690-2-ayaka@soulik.info> From: Maarten Lankhorst Message-ID: <303c89b8-e24f-cacb-c305-65d17c58c597@linux.intel.com> Date: Tue, 22 May 2018 11:26:12 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180520171705.29690-2-ayaka@soulik.info> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Op 20-05-18 om 19:17 schreef Randy Li: > 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 }, Hm, the cpp value might give problems because it rounds down, not sure how we should handle that? Set to zero? > }; > > 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