Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1737400ybt; Sat, 27 Jun 2020 18:54:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuiYcFbioZZiqMdENOOhA3K4bxKrPchaFo5zuwWQ+El7++wrFSJ+PNX/3PJmBYqQbi+OUi X-Received: by 2002:a17:907:1059:: with SMTP id oy25mr9161806ejb.90.1593309267863; Sat, 27 Jun 2020 18:54:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593309267; cv=none; d=google.com; s=arc-20160816; b=GWrExSUcFwbcxAgEFyUC8Dlva0s4jThI0lQ8fRRc8nFaV3Kr7h2MfqUCy7acnjCTZg LqKfbMPP3yXgQ9mDxB40/M967wMrId9NiVF+TTW5yScFnlsYKWHKEd8OvOQ8y1Ey1OoI sX1IwIpef6UXKSAqBv5bxSaS0tgelGMwugRlAwJDaQ5qojY22AZ1JsDdsU/umLjYZb5p Yv8mZ+uWwSDjyXLd5qCJqyNODMXaBpJXjVfTWz05mJbzNyzh5Xykx8Lao0QBg560Ibt4 mwMlHAjXNgqVc/KwrZyeXW8TTQoPRpkiaCziXu5QYbTE2Z+rgQbmssu04ugdhG7RYduV 7WUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:references:cc:to:subject :from; bh=rfH5Cdgx0KnRPOL4MBENYoVD+bV+a4k88QPglGjwr1Q=; b=Q/lC7PPkmGkHoTNmZgArPDII4/8ySgqxfd/IG5VxJecJ1DJfGwisAtL4IF4eff6DSL uBOpTqAhrR3/xO/7e4QWmsMuG5WDGd+wf4pZ8ZPeAHvDEoPOIvHMbNL0YeqQEOJLse8k TCiL7Xe7dxPIgk8t6NseZuiY+J8ohEgbPGTJonsvL8P2EDorARYBd2Dmip/T4a37cwni 3OFU1oXk0823o2SVaCOfvvC90alcfvOuuOaO6X7lwwDePrPHZkhgp9bAsk9exQad+SJZ c1pG+sRKdtGbFkIiHQy01IZ1ygR9+7dooy2ybG8f+pW3pDSbkmTZFa7sy7jtrMPaCJyz sECQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f22si9320188edw.472.2020.06.27.18.54.05; Sat, 27 Jun 2020 18:54:27 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726732AbgF1Bvm (ORCPT + 99 others); Sat, 27 Jun 2020 21:51:42 -0400 Received: from regular1.263xmail.com ([211.150.70.197]:50748 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726378AbgF1Bvm (ORCPT ); Sat, 27 Jun 2020 21:51:42 -0400 Received: from localhost (unknown [192.168.167.69]) by regular1.263xmail.com (Postfix) with ESMTP id E9D49B2B; Sun, 28 Jun 2020 09:51:31 +0800 (CST) X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-ADDR-CHECKED4: 1 X-ANTISPAM-LEVEL: 2 X-SKE-CHECKED: 1 X-ABS-CHECKED: 1 Received: from [172.16.12.76] (unknown [58.22.7.114]) by smtp.263.net (postfix) whith ESMTP id P15430T140188661573376S1593309088919980_; Sun, 28 Jun 2020 09:51:30 +0800 (CST) X-IP-DOMAINF: 1 X-UNIQUE-TAG: X-RL-SENDER: hjc@rock-chips.com X-SENDER: hjc@rock-chips.com X-LOGIN-NAME: hjc@rock-chips.com X-FST-TO: hjc@rock-chips.com X-SENDER-IP: 58.22.7.114 X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 X-System-Flag: 0 From: Huang Jiachai Subject: =?UTF-8?Q?Re=3a_=5bPATCH_1/2=5d_drm=3a_drm=5ffourcc=3a_add_NV20_YUV?= =?UTF-8?B?IGZvcm1hdOOAkOivt+azqOaEj++8jOmCruS7tueUsWxpbnV4LXJvY2tjaGlwLWJv?= =?UTF-8?Q?unces+sandy=2ehuang=3drock-chips=2ecom=40lists=2einfradead=2eorg?= =?UTF-8?B?5Luj5Y+R44CR?= To: Jonas Karlman , =?UTF-8?Q?Heiko_St=c3=bcbner?= Cc: Thomas Zimmermann , David Airlie , Maarten Lankhorst , linux-kernel@vger.kernel.org, Maxime Ripard , linux-rockchip@lists.infradead.org, dri-devel@lists.freedesktop.org, Daniel Vetter , =?UTF-8?B?6Zer5a2d5Yab?= , Brian Starkey , Ben Davis , =?UTF-8?B?5p2o5Yev?= , Tao Huang References: <20200607202521.18438-1-jonas@kwiboo.se> <20200607202521.18438-2-jonas@kwiboo.se> Message-ID: Date: Sun, 28 Jun 2020 09:51:29 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jonas Karlman, 在 2020/6/26 22:19, Jonas Karlman 写道: > On 2020-06-17 14:07, Huang Jiachai wrote: >> Hi Jonas Karlman, >> >>     Is there an another yuv 10bit format with 4:4:4 sub-simpling but >> has no padding? >> >>  Maybe we can call it DRM_FORMAT_NV30: >> >> { .format = DRM_FORMAT_NV30, .depth = 0, >> .num_planes = 2, .char_per_block = { 5, 5, 0 }, >> .block_w = { 4, 2, 0 }, .block_h = { 1, 1, 0 }, .hsub = 1, >> .vsub = 1, .is_yuv = true }, >> >> this format can supported by rockchip rk3288/rk3399... platform, can you >> add this format at this series patches? > I will send a v2 including this 4:4:4 format later this weekend. > > Is there any hw block on rk3288/rk3399 that can produce a buffer in such format? > If I am not mistaken rkvdec only support 10-bit h264 in 4:2:0/4:2:2 and > hevc 4:2:0 10-bit, those are the formats I have been able to test so far. > > Regards, > Jonas yes,rockchip platform hw video decoder 10-bit yuv format only can support 4:2:0/4:2:2 so far, but the software decoder path maybe output 4:4:4-10 format to VOP. > >> 在 2020/6/8 4:25, Jonas Karlman 写道: >>> DRM_FORMAT_NV20 is a 2 plane format suitable for linear memory layout. >>> The format is similar to P210 with 4:2:2 sub-sampling but has no padding >>> between components. Instead, luminance and chrominance samples are grouped >>> into 4s so that each group is packed into an integer number of bytes: >>> >>> YYYY = UVUV = 4 * 10 bits = 40 bits = 5 bytes >>> >>> The '20' suffix refers to the optimum effective bits per pixel which is >>> achieved when the total number of luminance samples is a multiple of 4. >>> >>> Signed-off-by: Jonas Karlman >>> --- >>> drivers/gpu/drm/drm_fourcc.c | 4 ++++ >>> include/uapi/drm/drm_fourcc.h | 1 + >>> 2 files changed, 5 insertions(+) >>> >>> diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c >>> index 722c7ebe4e88..2a9c8ae719ed 100644 >>> --- a/drivers/gpu/drm/drm_fourcc.c >>> +++ b/drivers/gpu/drm/drm_fourcc.c >>> @@ -278,6 +278,10 @@ const struct drm_format_info *__drm_format_info(u32 format) >>> .num_planes = 2, .char_per_block = { 5, 5, 0 }, >>> .block_w = { 4, 2, 0 }, .block_h = { 1, 1, 0 }, .hsub = 2, >>> .vsub = 2, .is_yuv = true }, >>> + { .format = DRM_FORMAT_NV20, .depth = 0, >>> + .num_planes = 2, .char_per_block = { 5, 5, 0 }, >>> + .block_w = { 4, 2, 0 }, .block_h = { 1, 1, 0 }, .hsub = 2, >>> + .vsub = 1, .is_yuv = true }, >>> { .format = DRM_FORMAT_Q410, .depth = 0, >>> .num_planes = 3, .char_per_block = { 2, 2, 2 }, >>> .block_w = { 1, 1, 1 }, .block_h = { 1, 1, 1 }, .hsub = 0, >>> diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h >>> index b5bf1c0e630e..244d32433a67 100644 >>> --- a/include/uapi/drm/drm_fourcc.h >>> +++ b/include/uapi/drm/drm_fourcc.h >>> @@ -242,6 +242,7 @@ extern "C" { >>> * index 1 = Cr:Cb plane, [39:0] Cr1:Cb1:Cr0:Cb0 little endian >>> */ >>> #define DRM_FORMAT_NV15 fourcc_code('N', 'V', '1', '5') /* 2x2 subsampled Cr:Cb plane */ >>> +#define DRM_FORMAT_NV20 fourcc_code('N', 'V', '2', '0') /* 2x1 subsampled Cr:Cb plane */ >>> >>> /* >>> * 2 plane YCbCr MSB aligned > _______________________________________________ > Linux-rockchip mailing list > Linux-rockchip@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-rockchip -- Best Regard 黄家钗 Sandy Huang Addr: 福州市鼓楼区铜盘路软件大道89号福州软件园A区21号楼(350003) No. 21 Building, A District, No.89,software Boulevard Fuzhou,Fujian,PRC Tel:+86 0591-87884919 8690 E-mail:hjc@rock-chips.com