Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1328210imm; Tue, 22 May 2018 02:12:44 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp6Y8Cveqs3qW1FECTCaSv+7chQpuseBS+BD6PInr9PjiwuBiuQjjZm1nJGP5/hp8Mnh065 X-Received: by 2002:a17:902:5304:: with SMTP id b4-v6mr23307407pli.231.1526980364436; Tue, 22 May 2018 02:12:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526980364; cv=none; d=google.com; s=arc-20160816; b=VaZGAH4vZZcbDgG/Frx9FSl7dcTJImA9cT/oxwQTqmh3A3OuXVHKB9GyTJ6tCf9bU0 lcnnV9OxcyRDo7so31WFDpu3KHb3gcC2YoNACmXIto9ohdXqDPnCK5RqGgU7UqQJP1rD RqvCBjJA3mBBYxUkAK6y669PdksqLXPWjPkzMr/4zfHKMkFNW2yWZp9tDGh24JrCyBxR v9KXYtPOD/nLC2stCH5E/K8F+GvLVYSJ3KAsTlGgtqbKAxjaszHFqd3IY3txBah00G8U 9EAXYue6fldr20+ZD5R5lh73UdO9teEwO9hAYk3xkno6bnGcuCRr0vLzYr1A6wCnjJvx 93Xg== 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=AVrSSwUBydNCZl1RBHCdy3AYOzSzT4IyeAe8BWjvtM4=; b=WlbgN/o4cQu5XQ41UJYhjFIUeL6Y9v/kL1bBmNtn5/a6eAZPKTRYBNp/btgFK2SEk7 zC4RQiBy8YUu0XtK4ebR516NjWQgFw9tRrFt2FgdKHZINJi3v5peG8J+gqc0PDFOU+p3 DowasFT885x6dT4SxQ+NPl6dfYKFfmYlkXFz3WZwdaL9KO7ezx+jyquXDUxgDGbWyDbg KeHSkSPzWWVXkOBzLFIO4IZBCwKO3xDoJ6XPunVbYb5p5A3Y72tl9UWEYoP+btprUBRv zJNoy0qDJpF0Etoq8DbTMvrI5tn96cpcW0TZIj2Li2AvZY2Nz4+PdviT5R3datkOLK4d qsZw== 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 c3-v6si16027049pfn.245.2018.05.22.02.12.29; Tue, 22 May 2018 02:12:44 -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 S1751239AbeEVJMO (ORCPT + 99 others); Tue, 22 May 2018 05:12:14 -0400 Received: from mga02.intel.com ([134.134.136.20]:61358 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750707AbeEVJMN (ORCPT ); Tue, 22 May 2018 05:12:13 -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 orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 May 2018 02:12:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,429,1520924400"; d="scan'208";a="226263775" 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:12:09 -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: Date: Tue, 22 May 2018 11:12:06 +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 }, > }; > > 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 I think the description here is slightly too terse for adding a new packed format. I think it would be better to define a new category for 10-bit 2 plane formats. ~Maarten