From patchwork Fri Jan 26 02:03:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hyun Kwon X-Patchwork-Id: 10185011 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B68D460211 for ; Fri, 26 Jan 2018 02:04:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A108628C51 for ; Fri, 26 Jan 2018 02:04:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 958BC28C53; Fri, 26 Jan 2018 02:04:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 30E7628C51 for ; Fri, 26 Jan 2018 02:04:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 444776E124; Fri, 26 Jan 2018 02:04:33 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0059.outbound.protection.outlook.com [104.47.32.59]) by gabe.freedesktop.org (Postfix) with ESMTPS id 48C9D6E0A4 for ; Fri, 26 Jan 2018 02:04:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=YTUXta2iohO5suztSMrvKqQ9SdfbMRO7R9VpxfmBpWk=; b=lzdZ2i9O1FFdPx7noVC8GI9zcpfUyF7EXZhN/b/hNFjAwtet/hukb0R6X47Vke1Ym/FOhwchs1AWKxKtCaV0beA3Uvo2Py07WAAMwJiyDbDeHlm/UoG/1mUUDKh8Nc6QUN2O3c2L1296/i84XxRF0gVVoZGB6q/tQTMVL03fsfI= Received: from CY4PR02CA0027.namprd02.prod.outlook.com (2603:10b6:903:117::13) by DM2PR02MB1337.namprd02.prod.outlook.com (2a01:111:e400:50c8::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Fri, 26 Jan 2018 02:04:17 +0000 Received: from SN1NAM02FT050.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::205) by CY4PR02CA0027.outlook.office365.com (2603:10b6:903:117::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.444.14 via Frontend Transport; Fri, 26 Jan 2018 02:04:16 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; lists.freedesktop.org; dkim=none (message not signed) header.d=none; lists.freedesktop.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by SN1NAM02FT050.mail.protection.outlook.com (10.152.72.128) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.444.13 via Frontend Transport; Fri, 26 Jan 2018 02:04:16 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1eetNH-0005Jq-PN; Thu, 25 Jan 2018 18:04:15 -0800 Received: from [127.0.0.1] (helo=xsj-smtp-dlp1.xlnx.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1eetNH-0002nM-Kn; Thu, 25 Jan 2018 18:04:15 -0800 Received: from xsj-pvapsmtp01 (xsj-smtp1.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w0Q24Ehu016035; Thu, 25 Jan 2018 18:04:14 -0800 Received: from [172.19.2.244] (helo=xsjhyunkubuntu) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1eetNG-0002m8-7D; Thu, 25 Jan 2018 18:04:14 -0800 Received: by xsjhyunkubuntu (Postfix, from userid 13638) id 34A302C697D; Thu, 25 Jan 2018 18:04:14 -0800 (PST) From: Hyun Kwon To: Subject: [RFC v2 02/10] drm: drm_fourcc: Introduce macro-pixel info to drm_format_info Date: Thu, 25 Jan 2018 18:03:59 -0800 Message-ID: <1516932247-10750-3-git-send-email-hyun.kwon@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516932247-10750-1-git-send-email-hyun.kwon@xilinx.com> References: <1516932247-10750-1-git-send-email-hyun.kwon@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23618.006 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39380400002)(39860400002)(396003)(346002)(376002)(2980300002)(438002)(199004)(189003)(90966002)(36756003)(6666003)(54906003)(50226002)(5660300001)(6916009)(42186006)(4326008)(106466001)(47776003)(81166006)(81156014)(16586007)(2950100002)(6266002)(107886003)(8676002)(39060400002)(63266004)(106002)(103686004)(336011)(52956003)(305945005)(356003)(26005)(8936002)(478600001)(76176011)(186003)(2906002)(2351001)(316002)(48376002)(51416003)(50466002)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR02MB1337; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; PTR:unknown-60-83.xilinx.com; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM02FT050; 1:wZdc3hkDm9nbjv9x7v7w+O+0atViuJF5yGklEuESiDdLE49LCHtwul25GWprgm6JH209err09gokhgdeLiLsbQncFNzIM0wRWLpTL09mgIw92W03k0uO0Z7Yj++Qq4sG MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 451c81ee-30f4-4590-84db-08d564611abb X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(4608076)(2017052603307)(7153060); SRVR:DM2PR02MB1337; X-Microsoft-Exchange-Diagnostics: 1; DM2PR02MB1337; 3:DKus26WuZdnm/kTGXo221H+LLyC6WnqLavXSfH6txg4OenatUV0NBjtoHfLTB3QRu+GMl0lhACLUKzvTekQzC9Icb7ntr4he4O/MmW5nFX02Nvq64R2vlWfLvY6l9wnrmzg2oDSo6flwgwmF3hIOT1XS3eKrmdL1Pm0s2xV7r54vyB61VzE3HwOqIFdBaHQZMuPn+PdNp8HawH6/C15O5XsZa0NZPd96K82pHR/IZqHvRvUY+a3atdT9bi3F8MRLvH+R4boKaWOGpZhubVsPYMPGktj1BPpL41y9gNaZalHbmzouctz/Jy6IFK1FcPw+msfoPtiOT/ZyFOfC2F4c7JwO6mxEAl2tawttD78cvR8=; 25:NuYGdx/AtdULDneFL0rnaZa4nuA4F+hofyAjkTnRIIFVn8FkvwFeXZs2IngFELwbLkjyKGeN1bOM4LZ4tkBd+DMRoSzhkgG/NG4HOJCoY7JBe2PjzjVNAb0WwUOmsm1udknOAHp6wEiLGbSfxCutfbII3P/N639F+SPIAFuU+GzKG6qMY0P+7blqRGHHLFqI/EHeFXrx+MbDWIQYmQVN6PBbkt2iujo9JVc5nCzWh9LsVc/ERdKOzj0oj7/ot6O4IX8DoztDWuy5fP0Jx02EbM9li4sncFrDQpLK+5hdFVrYvZqLGuguEJgyt8iwHIpY0gyj4CJZa5paZ+zeRkwXEQ== X-MS-TrafficTypeDiagnostic: DM2PR02MB1337: X-Microsoft-Exchange-Diagnostics: 1; DM2PR02MB1337; 31:LD9bgTTni/9T5OHvtKxnWYQbmIMh/qzihN17TYATA3ZaIE9yYbt47SWYZZilKUxWrcqRWOFy5rj+NjxrUUJcU7eVjq1nUbIeKVnzZ1whb8Ut5+HdYpp/Kf+RMzRv3xklWfHc95ShStDLw9dqF+coDEDrjk6l8ENCA6BEK5JW4865WE1MuwSusutjG0jI349kmibBI7VzCUs/s0spexMPTOZUyxrPYNPNrvrYmoKfKzE=; 20:QaVc7n7oBwTRdnfLqr1zQ3v90PmlVuJGFYHrfiO6xX0HEAZpsaG8Oi4GmEfof9qNwp+6sYzPxZV59KBl8qRDBYooXfqavK7filHN6SZoEdOwKKDwEHDd7vnlwmC8aSE+EtRmazorEqQIlfxOHTHYIcCqP5Kq0XVC2yndEinipGrF/KS3NO0vef4qwdIv845m6R+L2FuChrsMgE2a8yTQo4LcWuXMx14sQ399UmjbOQRN916sGAxIdfYdHzO6U9DJYHflrStqVZd5hqjKFTeUwohxGUGQOCJNlQzjoE6VL3eVo4n7g78Yf4AP4JuahSop/NVz45tqzdSnA1fzPF8difiCS4AsU9kJCNpiT7Tnls/dmVfOhu3XiTlVLg7a/w8Xw+izOXvR8YqKbKVfm3gVSOxvohWFE7JpoHkxscBMyGh6J3JQEl1tapKkwe2SZq7TXy880Ef0BRvm9781H3OF9nnWMsgCVXFo0qgab4M3N9onoDto+7y81WsOCIpFniTs X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(3002001)(10201501046)(3231023)(2400081)(944501161)(93006095)(93004095)(6055026)(6041288)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:DM2PR02MB1337; BCL:0; PCL:0; RULEID:; SRVR:DM2PR02MB1337; X-Microsoft-Exchange-Diagnostics: 1; DM2PR02MB1337; 4:jzc3EVQtuxDRgZZ9+1wd5YMizQSN/jJ5jNzSHsuHrMFgi5/QoHIkSdWbd5uwrcIhTZB1PvY1WHKme2/ZEiWuE72YbtOhDnDyXsB8hlkheiaVzN1VUnzvxFIuXQ1OCaPkeiaNjtcEakFBoqc5kEL1ZBbiTO6Cf98GaJkkZO8LVn0sdKLgN6V8okBBff2Ee4FFX77IN7iIg9qq6DGLPp3NsKLmhlFUJMMGRVZiZDg5YPsHiGs3Ytlg3fyUfmMpsTUu4GJ4qhklJmaRGJ7mVRgjRf8087F2US/NJxmL3ILD84SSnPPeF4p/Tqo9279Vutje X-Forefront-PRVS: 05641FD966 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR02MB1337; 23:kVj03qQp+y4nrq7topfzD0V86QA6LUAb5bFcdE8F3?= =?us-ascii?Q?A1lGykoZ/WbZ2I2KPD6EprPODddDi2+4VQbIfgZzCAEiW/SJ8SqUf8TaKNgY?= =?us-ascii?Q?mUlrMzn6+cdFFYDrbHcu/c3/qXXUOQ1x/yqxygWTBHdDKK9fd/5sknBrn282?= =?us-ascii?Q?9LJTpiVxrNRi2XfDZSUCvqdC+Xh0SGnXhrPkAGB3hY7uzDmbvKTs9t9IQSyc?= =?us-ascii?Q?nAllpT995L+MFlwcU93TgQHvk/1v3eDRkx11Vb0nEmSnrIrh9lk3j+a8Nc8G?= =?us-ascii?Q?fMmhDUU5LNsZJ15wMX6m9ApYoRhk6mAh0CoBSeMCi7izOI6lqBCFcUz0R8+m?= =?us-ascii?Q?Tx10FOWgWmaCSs4dBAVZzC91eLMXvTZ5Rq0whsdc6bs1/ich+u2lAetyomXf?= =?us-ascii?Q?YKHn9q9fOng1szKr1FQ6nKsgY7etbiHkO+0R4/LmZUc8YDnSVmJPHS6lXMhQ?= =?us-ascii?Q?7u/P9PvTPNea0mpL3OuL0IuuxPJANog/sKPpNDN8AeKbIItVMAAGJF0e0Lt7?= =?us-ascii?Q?UMktZ6MMfP4cBkygtbVfsyUwveXXHSU7uhYcYKI0fi8V6UP4rrUA+0uusGWH?= =?us-ascii?Q?ZADSt305mwaNDNU+n31FQRwogcZoWrTBS0HbBt4cjOLyyqDqKV0dxOFc0RV4?= =?us-ascii?Q?qtcn6FoxqGyqneF6JmmRn2gi6CZmAa1zKOvQoeK9KeG2M61at3oqU8YAehyf?= =?us-ascii?Q?qx0dcc8dwYGPjb/BX3WUJWAQQeRvJIaEEPRDKh7m0aEWFp2H0PWx56WMq/Xs?= =?us-ascii?Q?d3znnbgGnHWk0N4LV/Auw5lLLe/hnErEoyJSRGG6QRNaue6VA60qxLHhx2ee?= =?us-ascii?Q?FsWAWHzFNC2laltdYtFj1xWeumSfe1yJVW6gmgsoFWTVIWuhs0p7FM27i9oU?= =?us-ascii?Q?ZcWpmkkfRHVkmTNFyGfGHd4uZM7GENt93KcaAHd0/W66ST9T/9IWpi27Z8vo?= =?us-ascii?Q?34AOaiDNENkaxaWMJihgsCwxznu+C3uUP6VubUA6y80O2EaSC+AX407Lcizr?= =?us-ascii?Q?XBNJzvK+sMGq9fYUGW/FLQPPaQ/Hvo0Wuqy9jwdA99jjMrmQzZl1u0o4j3+E?= =?us-ascii?Q?07H6y+pJzkmzH5Wn0OXJKMY+cvDZRcLtpgzLgPjN+IaMAkZGg=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR02MB1337; 6:ek88qg3a+gHBWpt0bLE8ygQAVKTVKgbHtYhAuCcG81rdaCJPy5i7U/KGONWAjWkN6oHJsJNZZHARI0uaJDJhNbJKnKoP5mCfsZ0dNyjghU1lYqyfgf++OMO4UYVWXWOG1EVCdXL+AQJ7D7dIl9n+GXg231HvQY4AT7hguFW+xS7mf5fFa4LvOujbT1NZ0Lgosh8YOuT6jEMh+t5BoxL+xMiaVFG7RTKcfuVvyPK9Y6iWf+taFDvZsg+CBoxvXSZCGxooZwZhnAC/AeZBZwwkzdufpmIZdKBAO80f+hHwlyQn4tyX66m753JwDUy8awf75/9VGupXZandurWAf5+A7N8gszlwRSO02D6futony5Y=; 5:KAbsIr081AkqIql15GbEQiRb20tp1ZVndfwcH3yG9gLEm0Jt8QfuIo8L/vLh5mEssIEBtGqxVX0BWD0dfej/xqIs10XpNqOGeHZBAl6UpNGhu+nfLp4o8lasPf5bPihrkO8KZB+ePpYjA5Se7h3LEZmBLfC72L21d4nTjT5iFJk=; 24:rEMjFP15bFzjAwFfYH68YP3uqrrOSTJlQBdMlXPbNaBXRJXRMw4ZzopthgqQS5qV8V4HAjkfQu8zpd6HaK7YLpTZvWZbbD6g1EkFfNWohq8=; 7:de4DSfcWP00EVxfHK5atUzslOif46Wc/naBIcUu8kU/rrMlGXVQk1HqbAsZSKMYLOLTdlpBixFzbmtWbnP2QMOiZVSpeWjhMnVlNrN32Gl1WhHIKhur92+rTqcLBC4OreVI4VjlDPmRO6wDCquBMShKre4MKebqIVZm1Ub/WEZEwJb+q1Gcnj1AuFC5voMnSUJC4AWoesis7Je+ruq3+eqa1H8hdci/gL2pGnjvIfEfvYUViiM3EW+F9HRK8E4PW SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jan 2018 02:04:16.2145 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 451c81ee-30f4-4590-84db-08d564611abb X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR02MB1337 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hyun Kwon , Daniel Vetter , Emil Velikov , Michal Simek , Laurent Pinchart Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Multiple pixels can be grouped as a single unit and form a 'macro-pixel'. This is to model formats where multiple pixels are stored together in a specific way, likely byte-algined. For example, if 3 - 10 bit pixels are stored in 32 bit, the 32 bit stroage can be treated as a single macro-pixel with 3 pixels. This aligns non-byte addressable formats with drm core where bpp is expected to be multiple of 8 bit. Add 'ppm', pixels per macro-pixel, to note how many pixels are grouped in a macro-pixel. 'bpm', bits per macro-pixel, specifies how many bits are in a macro-pixel as there can be some extra padding bits. Signed-off-by: Hyun Kwon --- v2 - Introduce macro-pixel over scaling factors --- --- drivers/gpu/drm/drm_fourcc.c | 136 +++++++++++++++++++++---------------------- include/drm/drm_fourcc.h | 9 +++ 2 files changed, 77 insertions(+), 68 deletions(-) diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c index b891fe0..8fc1e35 100644 --- a/drivers/gpu/drm/drm_fourcc.c +++ b/drivers/gpu/drm/drm_fourcc.c @@ -105,74 +105,74 @@ EXPORT_SYMBOL(drm_get_format_name); const struct drm_format_info *__drm_format_info(u32 format) { static const struct drm_format_info formats[] = { - { .format = DRM_FORMAT_C8, .depth = 8, .num_planes = 1, .cpp = { 1, 0, 0 }, .bpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_RGB332, .depth = 8, .num_planes = 1, .cpp = { 1, 0, 0 }, .bpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_BGR233, .depth = 8, .num_planes = 1, .cpp = { 1, 0, 0 }, .bpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_XRGB4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_XBGR4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_RGBX4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_BGRX4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_ARGB4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_ABGR4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_RGBA4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_BGRA4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_XRGB1555, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_XBGR1555, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_RGBX5551, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_BGRX5551, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_ARGB1555, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_ABGR1555, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_RGBA5551, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_BGRA5551, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_RGB565, .depth = 16, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_BGR565, .depth = 16, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_RGB888, .depth = 24, .num_planes = 1, .cpp = { 3, 0, 0 }, .bpp = { 24, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_BGR888, .depth = 24, .num_planes = 1, .cpp = { 3, 0, 0 }, .bpp = { 24, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_XRGB8888, .depth = 24, .num_planes = 1, .cpp = { 1, 0, 0 }, .bpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_XBGR8888, .depth = 24, .num_planes = 1, .cpp = { 1, 0, 0 }, .bpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_RGBX8888, .depth = 24, .num_planes = 1, .cpp = { 1, 0, 0 }, .bpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_BGRX8888, .depth = 24, .num_planes = 1, .cpp = { 1, 0, 0 }, .bpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_RGB565_A8, .depth = 24, .num_planes = 2, .cpp = { 2, 1, 0 }, .bpp = { 16, 8, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_BGR565_A8, .depth = 24, .num_planes = 2, .cpp = { 2, 1, 0 }, .bpp = { 16, 8, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_XRGB2101010, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .bpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_XBGR2101010, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .bpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_RGBX1010102, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .bpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_BGRX1010102, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .bpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_ARGB2101010, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .bpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_ABGR2101010, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .bpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_RGBA1010102, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .bpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_BGRA1010102, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .bpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_ARGB8888, .depth = 32, .num_planes = 1, .cpp = { 4, 0, 0 }, .bpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_ABGR8888, .depth = 32, .num_planes = 1, .cpp = { 4, 0, 0 }, .bpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_RGBA8888, .depth = 32, .num_planes = 1, .cpp = { 4, 0, 0 }, .bpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_BGRA8888, .depth = 32, .num_planes = 1, .cpp = { 4, 0, 0 }, .bpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_RGB888_A8, .depth = 32, .num_planes = 2, .cpp = { 4, 1, 0 }, .bpp = { 24, 8, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_BGR888_A8, .depth = 32, .num_planes = 2, .cpp = { 4, 1, 0 }, .bpp = { 24, 8, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_XRGB8888_A8, .depth = 32, .num_planes = 2, .cpp = { 4, 1, 0 }, .bpp = { 32, 8, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_XBGR8888_A8, .depth = 32, .num_planes = 2, .cpp = { 4, 1, 0 }, .bpp = { 32, 8, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_RGBX8888_A8, .depth = 32, .num_planes = 2, .cpp = { 4, 1, 0 }, .bpp = { 32, 8, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_BGRX8888_A8, .depth = 32, .num_planes = 2, .cpp = { 4, 1, 0 }, .bpp = { 32, 8, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_YUV410, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .bpp = { 8, 8, 8 }, .hsub = 4, .vsub = 4 }, - { .format = DRM_FORMAT_YVU410, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .bpp = { 8, 8, 8 }, .hsub = 4, .vsub = 4 }, - { .format = DRM_FORMAT_YUV411, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .bpp = { 8, 8, 8 }, .hsub = 4, .vsub = 1 }, - { .format = DRM_FORMAT_YVU411, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .bpp = { 8, 8, 8 }, .hsub = 4, .vsub = 1 }, - { .format = DRM_FORMAT_YUV420, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .bpp = { 8, 8, 8 }, .hsub = 2, .vsub = 2 }, - { .format = DRM_FORMAT_YVU420, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .bpp = { 8, 8, 8 }, .hsub = 2, .vsub = 2 }, - { .format = DRM_FORMAT_YUV422, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .bpp = { 8, 8, 8 }, .hsub = 2, .vsub = 1 }, - { .format = DRM_FORMAT_YVU422, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .bpp = { 8, 8, 8 }, .hsub = 2, .vsub = 1 }, - { .format = DRM_FORMAT_YUV444, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .bpp = { 8, 8, 8 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_YVU444, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .bpp = { 8, 8, 8 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_NV12, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .bpp = { 8, 16, 0 }, .hsub = 2, .vsub = 2 }, - { .format = DRM_FORMAT_NV21, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .bpp = { 8, 16, 0 }, .hsub = 2, .vsub = 2 }, - { .format = DRM_FORMAT_NV16, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .bpp = { 8, 16, 0 }, .hsub = 2, .vsub = 1 }, - { .format = DRM_FORMAT_NV61, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .bpp = { 8, 16, 0 }, .hsub = 2, .vsub = 1 }, - { .format = DRM_FORMAT_NV24, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .bpp = { 8, 16, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_NV42, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .bpp = { 8, 16, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_YUYV, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .hsub = 2, .vsub = 1 }, - { .format = DRM_FORMAT_YVYU, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .hsub = 2, .vsub = 1 }, - { .format = DRM_FORMAT_UYVY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .hsub = 2, .vsub = 1 }, - { .format = DRM_FORMAT_VYUY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .hsub = 2, .vsub = 1 }, - { .format = DRM_FORMAT_AYUV, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .bpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_C8, .depth = 8, .num_planes = 1, .cpp = { 1, 0, 0 }, .bpp = { 8, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 8, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_RGB332, .depth = 8, .num_planes = 1, .cpp = { 1, 0, 0 }, .bpp = { 8, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 8, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_BGR233, .depth = 8, .num_planes = 1, .cpp = { 1, 0, 0 }, .bpp = { 8, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 8, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_XRGB4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_XBGR4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_RGBX4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_BGRX4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_ARGB4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_ABGR4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_RGBA4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_BGRA4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_XRGB1555, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_XBGR1555, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_RGBX5551, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_BGRX5551, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_ARGB1555, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_ABGR1555, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_RGBA5551, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_BGRA5551, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_RGB565, .depth = 16, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_BGR565, .depth = 16, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 16, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_RGB888, .depth = 24, .num_planes = 1, .cpp = { 3, 0, 0 }, .bpp = { 24, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 24, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_BGR888, .depth = 24, .num_planes = 1, .cpp = { 3, 0, 0 }, .bpp = { 24, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 24, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_XRGB8888, .depth = 24, .num_planes = 1, .cpp = { 1, 0, 0 }, .bpp = { 8, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 8, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_XBGR8888, .depth = 24, .num_planes = 1, .cpp = { 1, 0, 0 }, .bpp = { 8, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 8, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_RGBX8888, .depth = 24, .num_planes = 1, .cpp = { 1, 0, 0 }, .bpp = { 8, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 8, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_BGRX8888, .depth = 24, .num_planes = 1, .cpp = { 1, 0, 0 }, .bpp = { 8, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 8, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_RGB565_A8, .depth = 24, .num_planes = 2, .cpp = { 2, 1, 0 }, .bpp = { 16, 8, 0 }, .ppm = { 1, 1, 0 }, .bpm = { 16, 8, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_BGR565_A8, .depth = 24, .num_planes = 2, .cpp = { 2, 1, 0 }, .bpp = { 16, 8, 0 }, .ppm = { 1, 1, 0 }, .bpm = { 16, 8, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_XRGB2101010, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .bpp = { 32, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 32, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_XBGR2101010, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .bpp = { 32, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 32, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_RGBX1010102, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .bpp = { 32, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 32, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_BGRX1010102, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .bpp = { 32, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 32, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_ARGB2101010, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .bpp = { 32, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 32, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_ABGR2101010, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .bpp = { 32, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 32, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_RGBA1010102, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .bpp = { 32, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 32, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_BGRA1010102, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .bpp = { 32, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 32, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_ARGB8888, .depth = 32, .num_planes = 1, .cpp = { 4, 0, 0 }, .bpp = { 32, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 32, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_ABGR8888, .depth = 32, .num_planes = 1, .cpp = { 4, 0, 0 }, .bpp = { 32, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 32, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_RGBA8888, .depth = 32, .num_planes = 1, .cpp = { 4, 0, 0 }, .bpp = { 32, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 32, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_BGRA8888, .depth = 32, .num_planes = 1, .cpp = { 4, 0, 0 }, .bpp = { 32, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 32, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_RGB888_A8, .depth = 32, .num_planes = 2, .cpp = { 4, 1, 0 }, .bpp = { 24, 8, 0 }, .ppm = { 1, 1, 0 }, .bpm = { 24, 8, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_BGR888_A8, .depth = 32, .num_planes = 2, .cpp = { 4, 1, 0 }, .bpp = { 24, 8, 0 }, .ppm = { 1, 1, 0 }, .bpm = { 24, 8, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_XRGB8888_A8, .depth = 32, .num_planes = 2, .cpp = { 4, 1, 0 }, .bpp = { 32, 8, 0 }, .ppm = { 1, 1, 0 }, .bpm = { 32, 8, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_XBGR8888_A8, .depth = 32, .num_planes = 2, .cpp = { 4, 1, 0 }, .bpp = { 32, 8, 0 }, .ppm = { 1, 1, 0 }, .bpm = { 32, 8, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_RGBX8888_A8, .depth = 32, .num_planes = 2, .cpp = { 4, 1, 0 }, .bpp = { 32, 8, 0 }, .ppm = { 1, 1, 0 }, .bpm = { 32, 8, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_BGRX8888_A8, .depth = 32, .num_planes = 2, .cpp = { 4, 1, 0 }, .bpp = { 32, 8, 0 }, .ppm = { 1, 1, 0 }, .bpm = { 32, 8, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_YUV410, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .bpp = { 8, 8, 8 }, .ppm = { 1, 1, 1 }, .bpm = { 8, 8, 8 }, .hsub = 4, .vsub = 4 }, + { .format = DRM_FORMAT_YVU410, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .bpp = { 8, 8, 8 }, .ppm = { 1, 1, 1 }, .bpm = { 8, 8, 8 }, .hsub = 4, .vsub = 4 }, + { .format = DRM_FORMAT_YUV411, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .bpp = { 8, 8, 8 }, .ppm = { 1, 1, 1 }, .bpm = { 8, 8, 8 }, .hsub = 4, .vsub = 1 }, + { .format = DRM_FORMAT_YVU411, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .bpp = { 8, 8, 8 }, .ppm = { 1, 1, 1 }, .bpm = { 8, 8, 8 }, .hsub = 4, .vsub = 1 }, + { .format = DRM_FORMAT_YUV420, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .bpp = { 8, 8, 8 }, .ppm = { 1, 1, 1 }, .bpm = { 8, 8, 8 }, .hsub = 2, .vsub = 2 }, + { .format = DRM_FORMAT_YVU420, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .bpp = { 8, 8, 8 }, .ppm = { 1, 1, 1 }, .bpm = { 8, 8, 8 }, .hsub = 2, .vsub = 2 }, + { .format = DRM_FORMAT_YUV422, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .bpp = { 8, 8, 8 }, .ppm = { 1, 1, 1 }, .bpm = { 8, 8, 8 }, .hsub = 2, .vsub = 1 }, + { .format = DRM_FORMAT_YVU422, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .bpp = { 8, 8, 8 }, .ppm = { 1, 1, 1 }, .bpm = { 8, 8, 8 }, .hsub = 2, .vsub = 1 }, + { .format = DRM_FORMAT_YUV444, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .bpp = { 8, 8, 8 }, .ppm = { 1, 1, 1 }, .bpm = { 8, 8, 8 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_YVU444, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .bpp = { 8, 8, 8 }, .ppm = { 1, 1, 1 }, .bpm = { 8, 8, 8 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_NV12, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .bpp = { 8, 16, 0 }, .ppm = { 1, 1, 0 }, .bpm = { 8, 16, 0 }, .hsub = 2, .vsub = 2 }, + { .format = DRM_FORMAT_NV21, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .bpp = { 8, 16, 0 }, .ppm = { 1, 1, 0 }, .bpm = { 8, 16, 0 }, .hsub = 2, .vsub = 2 }, + { .format = DRM_FORMAT_NV16, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .bpp = { 8, 16, 0 }, .ppm = { 1, 1, 0 }, .bpm = { 8, 16, 0 }, .hsub = 2, .vsub = 1 }, + { .format = DRM_FORMAT_NV61, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .bpp = { 8, 16, 0 }, .ppm = { 1, 1, 0 }, .bpm = { 8, 16, 0 }, .hsub = 2, .vsub = 1 }, + { .format = DRM_FORMAT_NV24, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .bpp = { 8, 16, 0 }, .ppm = { 1, 1, 0 }, .bpm = { 8, 16, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_NV42, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .bpp = { 8, 16, 0 }, .ppm = { 1, 1, 0 }, .bpm = { 8, 16, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_YUYV, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 16, 0, 0 }, .hsub = 2, .vsub = 1 }, + { .format = DRM_FORMAT_YVYU, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 16, 0, 0 }, .hsub = 2, .vsub = 1 }, + { .format = DRM_FORMAT_UYVY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 16, 0, 0 }, .hsub = 2, .vsub = 1 }, + { .format = DRM_FORMAT_VYUY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .bpp = { 16, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 16, 0, 0 }, .hsub = 2, .vsub = 1 }, + { .format = DRM_FORMAT_AYUV, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .bpp = { 32, 0, 0 }, .ppm = { 1, 0, 0 }, .bpm = { 32, 0, 0 }, .hsub = 1, .vsub = 1 }, }; unsigned int i; diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_fourcc.h index 752bd43..64038e9 100644 --- a/include/drm/drm_fourcc.h +++ b/include/drm/drm_fourcc.h @@ -37,6 +37,13 @@ struct drm_mode_fb_cmd2; * @num_planes: Number of color planes (1 to 3) * @cpp: Number of bytes per pixel (per plane) * @bpp: Number of bits per pixel (per plane) + * @ppm: Number of pixels per macro-pixel (per plane). A macro-pixel is + * composed of multiple pixels, possibly with some padding bits + * around pixels. For example, some 10 bit format has 3 components + * in every 32 bit, where 3 10bit components are followed by 2 bit padding. + * @bpm: Number of bits per macro-pixel (per plane). Bits per macro-pixel. + * The value is different from bpp * ppm if a macro-pixel has + * extra padding bits. * @hsub: Horizontal chroma subsampling factor * @vsub: Vertical chroma subsampling factor */ @@ -46,6 +53,8 @@ struct drm_format_info { u8 num_planes; u8 cpp[3]; u8 bpp[3]; + u8 ppm[3]; + u8 bpm[3]; u8 hsub; u8 vsub; };