From patchwork Tue Aug 21 18:30:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru-Cosmin Gheorghe X-Patchwork-Id: 10572289 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 93954109C for ; Tue, 21 Aug 2018 18:31:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F17B2AD30 for ; Tue, 21 Aug 2018 18:31:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7848A2AD83; Tue, 21 Aug 2018 18:31:04 +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=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 038AF2AD54 for ; Tue, 21 Aug 2018 18:31:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4303D6E21A; Tue, 21 Aug 2018 18:31:01 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70041.outbound.protection.outlook.com [40.107.7.41]) by gabe.freedesktop.org (Postfix) with ESMTPS id F0CE56E21A for ; Tue, 21 Aug 2018 18:30:58 +0000 (UTC) Received: from e114479-lin.cambridge.arm.com (217.140.106.49) by AM5PR0802MB2548.eurprd08.prod.outlook.com (2603:10a6:203:a1::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1059.23; Tue, 21 Aug 2018 18:30:51 +0000 From: Alexandru Gheorghe To: seanpaul@chromium.org, airlied@linux.ie, dri-devel@lists.freedesktop.org, liviu.dudau@arm.com, brian.starkey@arm.com, malidp@foss.arm.com, gustavo@padovan.org, maarten.lankhorst@linux.intel.com, ayan.halder@arm.com, daniel.vetter@ffwll.ch Subject: [PATCH v2 2/5] drm/fourcc: Add tile width and height to drm_format_info Date: Tue, 21 Aug 2018 19:30:01 +0100 Message-Id: <20180821183004.6775-3-alexandru-cosmin.gheorghe@arm.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180821183004.6775-1-alexandru-cosmin.gheorghe@arm.com> References: <20180821183004.6775-1-alexandru-cosmin.gheorghe@arm.com> MIME-Version: 1.0 X-Originating-IP: [217.140.106.49] X-ClientProxiedBy: MWHPR2001CA0020.namprd20.prod.outlook.com (2603:10b6:301:15::30) To AM5PR0802MB2548.eurprd08.prod.outlook.com (2603:10a6:203:a1::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7317ddc8-7a29-46a7-54ca-08d607943bbe X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM5PR0802MB2548; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0802MB2548; 3:13DmmxQ+oBFMWw81j/sX4U1rqgILl96vtqN8sCqYiee0p/fnxfI058TMzYPC6aRh+O/ZXKXFE7jNY/o3kaqjquIb7f5S7h/4ID1by4m0jz3Jrm4EVv+zZWdjJLiuQ9Dk0fsuOq1Q6B4cHbL09k8qQAnP37VSIkXm3IEl6DzT5vzkAMW5FFWICzrMJ97mlQWulSO2rQu+hYTAc9/b0W/Pcd3GDQr5YPO0WFDnB4spW3Cx/Uu7OXaOpQfQT/leuac/; 25:T22O0KS17xRJrs1fbQV08f7qQUaPMDu+KU9sGDz8Oe79lZUXEDHOiGpNkmEmIbnBUIIjsqXBYPAz5TDKT2jM7PJMEhac05HSN4bOiTPyFgb04qnv60d3a2C6rejpSNsAUtB/C5zDLw/LHYtEHeOWbxLSU5LnHnQjgKVj9sJM0RRWB1GJTgSG+UyflhcF6YJETWxK40R7kc1vU6qjc2kfOekZiyNd9G9kAylGeArfbswAW07VkUrAv8SM/LUJjfJuIxc1mC7HVDtiwppoSSy/5A3kBpox8NVVcv19CJDiEgT7MNv1AJ/1nuDJsuYsmS9AshNMUbeJr/tCxcfFculWSQ==; 31:nWq6gvAtd4gsdNVs48LVb7lGYJJ3jJmYTP4SZM4CNfn5ocpMD3xCBTtCQx6nIclhgp4jzqSJRNwjOSLSA899EQXiekt48OJeDiIzd01VhsRAzHBJtqdjwjbdjtOAoY9kFo3oEs5g+lTz1fn8AeMZUJ8jiSN/Pjf3spmLhCMylgLwb8JUyUaU38cpRyxHtitIS6Keu3Q5x64WmrW2cZk/I826r50utp4pmugDcCHsxAA= X-MS-TrafficTypeDiagnostic: AM5PR0802MB2548: NoDisclaimer: True X-Microsoft-Exchange-Diagnostics: 1; AM5PR0802MB2548; 20:eK7N1qMd8C2Pz8ROpRsRK/pGUcxmVDPxaxKO77sQyghr3M0i4FDPdUpOz+Ekd7r2ID1HG9s8OYDWsTeoNifqLsKSO7vpnWq4qSRX1KFVwWs4MZ0a1a67GNIC7fx232gI5+zz7Q/OoI6KHcvvNm89FyX+EsB9l/EFD/aw+XpwqKZxuL7VOi11PP+UAz00GwogJ94fRTJ6rz4Ic8C57tGvStJzcsFl4B2wKfaQ9Z/IKpXVCTrF8I/Q1OUo1HLZJDC2i7OC8byOlBwf+IBLkf7NlsrGBR9r9n1Z/q7sCtQV8DQ/Sl4CoMyI0FphQn40d/gjju0cUlJytms/eWmq9UQ3aA==; 4:2L0buRTeeC2PEnE0siF4cAs3uRL2od6Sas5HF0uGRzmdU6iMA2Jb25XjZUgf01HUaxJ5nPyCV+wOngaonbVBs3Egze/Hdl1Mw/LhLYQ4Pn8DxaOh1j7g6QG8UuOLygQCIIGVdOny80TwQi8JrH+KwRsZsI+PANhlFHAc1rAigBAmj2ggRnUuLmfMCV7LXNVuRzfY14PGBlnw5ps8dE6Y8CDlVP2D/xdbBCvNUtzGcwfTxIf8AKzgsldE+q372wt67cxdmDvBLSmRf226oLWSQ+X8Cz45f4R2jNIbk6uNEj/rM4ZSpx5id/a+lwgXi453 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(180628864354917); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(823301075)(3002001)(10201501046)(3231311)(944501410)(52105095)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(201708071742011)(7699016); SRVR:AM5PR0802MB2548; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0802MB2548; X-Forefront-PRVS: 0771670921 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(979002)(346002)(39860400002)(136003)(396003)(376002)(366004)(189003)(199004)(8676002)(68736007)(72206003)(97736004)(50226002)(36756003)(106356001)(53936002)(6666003)(105586002)(47776003)(16586007)(316002)(6116002)(575784001)(66066001)(2906002)(86362001)(8936002)(3846002)(478600001)(4326008)(1076002)(25786009)(6486002)(7736002)(81156014)(81166006)(476003)(76176011)(50466002)(26005)(186003)(11346002)(2616005)(48376002)(51416003)(486006)(7696005)(956004)(52116002)(446003)(386003)(16526019)(5660300001)(14444005)(305945005)(921003)(1121003)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0802MB2548; H:e114479-lin.cambridge.arm.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0802MB2548; 23:cGNdFJ94ycUhLm/C0PcCIhRW2qBZspWMvoPNq7Y?= 6tcegujgY69THExKqvLi8ECBlLUqn6Y0Je6dkz5sJHzligZIKjBrB8grHolVOP/rmf0dAAObHpirP/YKBxYlDy8wwFCnA2zqGXODQeIyu+PpysMQ8ldYYjxaqUb6ydMpy6e7IT98aALFlqyNfKd5M716g4M3nKebJA8cgbc6oNMKvEs0G17DErGEcbkw0GG5A1w7A+XtCNaXOWwDSmkv7JTHhu8hk0mwt9ZbtBrrjus2/aZad6eu5iApYzxxNDrZV8ZHSRWt9VUFJzJQNBgws837enxAS9XvvP5rtzSjbgwtGWToaYh5odn/cGHKXDXyAxreCXHQaQq39E/uZGOLGK/ObXG825DZfA+IUf4eYWOT9PWgSaTJzWMOHUh7QFgL5XmmPljhXBJwGA+A/FN0GPVL/M5fz5HhpBCvgRHCiejrlCUDe/qcjeriOZW179TXTb+V37N2mchHiqFchGnqWWEhO/DtguosY+8bmeTVOxZ98y85GHB9LHswiCZ1cw2MbeeBGJ86PyMOWaWOhELWfTXFuYwvvH3sonxYYMWz20dFWSoZQhW/VhXy5lWcF8m0g9b2yJmqSOIJQNM8LUM2XXiRdn1CAx8L0j81aMyjc81qm5NoKFlFw/TFVYnSkCI/Dzrk+bVO5ZJ/XCgMtKwLBVp+InX4Q6OmyhB148w+dBNebLio5Lek7YMurGwKv+oqkHsjw51ph+z7Fg9jzGS/tEmaZQ5nq+JDbsvsF3Dxz3M363ZkhKT+ORg1SLemQwbl9k6eBKtnVw6WtpMUPLPh9NBIzDtPggydUFCAS2NIQYmunVNLi872B4DC491ItCCOvJUDEapvzul6OsPhCDmKC7FypgXEaFzEyfWRd60AKxl/9o3zUoC6fVw6IXq7/SZoGzegngU2i6h1ld161ZjB3smVZ2qfMcto9jGz79aTq7UKNBJAw1+xyo7yVtKmwvG9FLFDrchtnOAPE8BT4Evjv1k+DSmqLVvs72LBWh8pmk7KktjaNbvmq3a8FwEzai98fQkAJEUema/7DE8rG15TWGHWOntXgxnCV+fDAcz3D2+nSzJ5v25w8FkkgP3aIk2fi1n2SxZUYoa2kU8ZU3r+OKJP4A86YBwi3Rj/zoHthn04f2iqLpfOqXcrx3FGVG7lBbDmDb4cLQ6BYFGxjxkkkGEt4qfl/Yl1BWLNRu4SZBwkUg3lWGSxHtWfb/tOF3S6GpBqfQVenzka5C0rgGt9Fd0Wg+9InUfEqRArXqHZoqP3CcV09XIflsOX+isoqYqL0VcXUqbvnPh9wJ5Z+xq0nKlne X-Microsoft-Antispam-Message-Info: 25mUCFr9Hq0Bp1dGA+2jrJRCzJN2DqKshacL5f52UEhlmCbRi3dK1wba+MorPDpvy3Zh3+PBCvP0xkTM1Zkpb09aQc9MCr9aM1CCqol9gddSGtkTtw6WTqR6j8wkhH88mHiS3ZCCaJHF2DsSluxZMZ8Kyh/NVP3+eV7vVgiwfAWc5vz6Q9EOJUJb53Cokr1yC9uEQxaPulszjs+TtRS8onnq9z4JsjN7wl2IANe0fA+q6TBw04o+M9q8/s7qk4fqJ/sGCUOCKf9cTovXMvM7aU2of3ZMO/H8zXoPx/AiW50hY7j8McY1A5RmRg7xS7w1NbGk/6QU0OTchQM+sFl5ju8WDoh2HWRIOEg+esb/nQg= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0802MB2548; 6:RDdopxRYktld0xyoOAC110QqUs+XboSDSeTCoURZY5whvQKOhChdEVvoMcTDW/uUMNcxMnvXX5mldU6OhCw5epPKEM32BvbQYD1EKs406WmPPqLVDUSv9IDGw5eN5ntCsx95HszGy847m4vIyMsWWOMcZed+d76OvoWkAUppmCU/Nlz5z5R5mocBrOh52GQd+NeT5nY6DtonzxMcd8O2ZFmoHY46xBP0c/FaHD4AF1YaifSMPD/y6J0H5dFWVLsFojW/bZfpiUN9GKXx8mRGeAF09FWEc4aLdnXhmTr/HruuVmMbFW5oRwDyS5aVG/dz/BK0efULDK9U9KA400cXvdb8s77V9WHWkzQZfPUQSVQ2ZvVG3w7Xn4pmDzUzyjd0vOM+VoVv2mW7plTsgZPp1mKiOn9L+Rp4MCAf465vfaAWvOaVNto7SOC4hLTYfZ6YrFDcDOVC7XYd7Iubs+297Q==; 5:sZA+JSBQXhlZCUYOtmWB+ihjSyYnxtZl1B2BqJR//ebs9tDrbv4A4nerfxdpTWCmH8LTP6uOWIXd0ewMY9arhFcYc85sXLt2mvuUrV2xV6vvI/lJj7nb6FAPd4+USZUOd9KXR3WK66XT++RwKMsQcF5s8f/icTT/j1TPVmDkolE=; 7:RuFYUTFGqgQeZgQ5YyHGq8wxAZHJZnSe4dIaRqUBQPshFJPj9DXqBabQCYN3sV5noguL29jHramt0mFCeSeFJrLmCUnaAOFh3xSHv781kaOgrzDePb/cFYJp7VFti1wnjav2DF5887LAnLkww/StOBSNXW3CXJzMYJ0h8UPt7p6eJKKktQJX2J+y8tmzEpXMHCwfbP/hn8d1mcImcTCFbHRjT40wyOsXuVxHFWjNH9tNmSN0NswQhsXHZuDSczDf SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Aug 2018 18:30:51.6672 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7317ddc8-7a29-46a7-54ca-08d607943bbe X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2548 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: nd@arm.com, Alexandru Gheorghe Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Add two new fields(tile_w and tile_h) to drm_format_info, which represent the horizontal and vertical sizes of a tile in tiled formats. This fields will be used by the next patch to add support in drm core for handling framebuffer restrictions and to correctly handle source cropping. Additionally, since I was touching drm_format_info table I decided to break the lines to the 80 characters limit, they were already getting out of hand, but let's not focus on that, I don't have any problem going back to the original line sizes or style them other way, if someone wants me to. Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/drm_fourcc.c | 352 +++++++++++++++++++++++++++-------- include/drm/drm_fourcc.h | 4 + 2 files changed, 281 insertions(+), 75 deletions(-) diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c index 18bb960e9943..f55cd93ba2d0 100644 --- a/drivers/gpu/drm/drm_fourcc.c +++ b/drivers/gpu/drm/drm_fourcc.c @@ -105,81 +105,283 @@ 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 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_RGB332, .depth = 8, .num_planes = 1, .cpp = { 1, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_BGR233, .depth = 8, .num_planes = 1, .cpp = { 1, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_XRGB4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_XBGR4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_RGBX4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_BGRX4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_ARGB4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, - { .format = DRM_FORMAT_ABGR4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, - { .format = DRM_FORMAT_RGBA4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, - { .format = DRM_FORMAT_BGRA4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, - { .format = DRM_FORMAT_XRGB1555, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_XBGR1555, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_RGBX5551, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_BGRX5551, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_ARGB1555, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, - { .format = DRM_FORMAT_ABGR1555, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, - { .format = DRM_FORMAT_RGBA5551, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, - { .format = DRM_FORMAT_BGRA5551, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, - { .format = DRM_FORMAT_RGB565, .depth = 16, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_BGR565, .depth = 16, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_RGB888, .depth = 24, .num_planes = 1, .cpp = { 3, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_BGR888, .depth = 24, .num_planes = 1, .cpp = { 3, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_XRGB8888, .depth = 24, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_XBGR8888, .depth = 24, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_RGBX8888, .depth = 24, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_BGRX8888, .depth = 24, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_RGB565_A8, .depth = 24, .num_planes = 2, .cpp = { 2, 1, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, - { .format = DRM_FORMAT_BGR565_A8, .depth = 24, .num_planes = 2, .cpp = { 2, 1, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, - { .format = DRM_FORMAT_XRGB2101010, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_XBGR2101010, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_RGBX1010102, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_BGRX1010102, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1 }, - { .format = DRM_FORMAT_ARGB2101010, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, - { .format = DRM_FORMAT_ABGR2101010, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, - { .format = DRM_FORMAT_RGBA1010102, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, - { .format = DRM_FORMAT_BGRA1010102, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, - { .format = DRM_FORMAT_ARGB8888, .depth = 32, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, - { .format = DRM_FORMAT_ABGR8888, .depth = 32, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, - { .format = DRM_FORMAT_RGBA8888, .depth = 32, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, - { .format = DRM_FORMAT_BGRA8888, .depth = 32, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, - { .format = DRM_FORMAT_RGB888_A8, .depth = 32, .num_planes = 2, .cpp = { 3, 1, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, - { .format = DRM_FORMAT_BGR888_A8, .depth = 32, .num_planes = 2, .cpp = { 3, 1, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, - { .format = DRM_FORMAT_XRGB8888_A8, .depth = 32, .num_planes = 2, .cpp = { 4, 1, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, - { .format = DRM_FORMAT_XBGR8888_A8, .depth = 32, .num_planes = 2, .cpp = { 4, 1, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, - { .format = DRM_FORMAT_RGBX8888_A8, .depth = 32, .num_planes = 2, .cpp = { 4, 1, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, - { .format = DRM_FORMAT_BGRX8888_A8, .depth = 32, .num_planes = 2, .cpp = { 4, 1, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, - { .format = DRM_FORMAT_YUV410, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .hsub = 4, .vsub = 4, .is_yuv = true }, - { .format = DRM_FORMAT_YVU410, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .hsub = 4, .vsub = 4, .is_yuv = true }, - { .format = DRM_FORMAT_YUV411, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .hsub = 4, .vsub = 1, .is_yuv = true }, - { .format = DRM_FORMAT_YVU411, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .hsub = 4, .vsub = 1, .is_yuv = true }, - { .format = DRM_FORMAT_YUV420, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .hsub = 2, .vsub = 2, .is_yuv = true }, - { .format = DRM_FORMAT_YVU420, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .hsub = 2, .vsub = 2, .is_yuv = true }, - { .format = DRM_FORMAT_YUV422, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .hsub = 2, .vsub = 1, .is_yuv = true }, - { .format = DRM_FORMAT_YVU422, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .hsub = 2, .vsub = 1, .is_yuv = true }, - { .format = DRM_FORMAT_YUV444, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .hsub = 1, .vsub = 1, .is_yuv = true }, - { .format = DRM_FORMAT_YVU444, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .hsub = 1, .vsub = 1, .is_yuv = true }, - { .format = DRM_FORMAT_NV12, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .hsub = 2, .vsub = 2, .is_yuv = true }, - { .format = DRM_FORMAT_NV21, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .hsub = 2, .vsub = 2, .is_yuv = true }, - { .format = DRM_FORMAT_NV16, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true }, - { .format = DRM_FORMAT_NV61, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true }, - { .format = DRM_FORMAT_NV24, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true }, - { .format = DRM_FORMAT_NV42, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true }, - { .format = DRM_FORMAT_YUYV, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true }, - { .format = DRM_FORMAT_YVYU, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true }, - { .format = DRM_FORMAT_UYVY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true }, - { .format = DRM_FORMAT_VYUY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true }, - { .format = DRM_FORMAT_AYUV, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true, .is_yuv = true }, - { .format = DRM_FORMAT_XYUV8888, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true }, - { .format = DRM_FORMAT_XVYU2101010, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true }, - { .format = DRM_FORMAT_Y0L0, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 2, .has_alpha = true, .is_yuv = true }, - { .format = DRM_FORMAT_X0L0, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 2, .is_yuv = true }, - { .format = DRM_FORMAT_Y0L2, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 2, .has_alpha = true, .is_yuv = true }, - { .format = DRM_FORMAT_X0L2, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 2, .is_yuv = true }, - { .format = DRM_FORMAT_P010, .depth = 0, .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2, .is_yuv = true }, + { .format = DRM_FORMAT_C8, + .depth = 8, .num_planes = 1, .cpp = { 1, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1 }, + { .format = DRM_FORMAT_RGB332, + .depth = 8, .num_planes = 1, .cpp = { 1, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1 }, + { .format = DRM_FORMAT_BGR233, + .depth = 8, .num_planes = 1, .cpp = { 1, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1 }, + { .format = DRM_FORMAT_XRGB4444, + .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1 }, + { .format = DRM_FORMAT_XBGR4444, + .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1 }, + { .format = DRM_FORMAT_RGBX4444, + .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1 }, + { .format = DRM_FORMAT_BGRX4444, + .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1 }, + { .format = DRM_FORMAT_ARGB4444, + .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .has_alpha = true }, + { .format = DRM_FORMAT_ABGR4444, + .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .has_alpha = true }, + { .format = DRM_FORMAT_RGBA4444, + .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .has_alpha = true }, + { .format = DRM_FORMAT_BGRA4444, + .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .has_alpha = true }, + { .format = DRM_FORMAT_XRGB1555, + .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1 }, + { .format = DRM_FORMAT_XBGR1555, + .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1 }, + { .format = DRM_FORMAT_RGBX5551, + .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1 }, + { .format = DRM_FORMAT_BGRX5551, + .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, }, + { .format = DRM_FORMAT_ARGB1555, + .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .has_alpha = true }, + { .format = DRM_FORMAT_ABGR1555, + .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .has_alpha = true }, + { .format = DRM_FORMAT_RGBA5551, + .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .has_alpha = true }, + { .format = DRM_FORMAT_BGRA5551, + .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .has_alpha = true }, + { .format = DRM_FORMAT_RGB565, + .depth = 16, .num_planes = 1, .cpp = { 2, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1 }, + { .format = DRM_FORMAT_BGR565, + .depth = 16, .num_planes = 1, .cpp = { 2, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1 }, + { .format = DRM_FORMAT_RGB888, + .depth = 24, .num_planes = 1, .cpp = { 3, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1 }, + { .format = DRM_FORMAT_BGR888, + .depth = 24, .num_planes = 1, .cpp = { 3, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1 }, + { .format = DRM_FORMAT_XRGB8888, + .depth = 24, .num_planes = 1, .cpp = { 4, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1 }, + { .format = DRM_FORMAT_XBGR8888, + .depth = 24, .num_planes = 1, .cpp = { 4, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1 }, + { .format = DRM_FORMAT_RGBX8888, + .depth = 24, .num_planes = 1, .cpp = { 4, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1 }, + { .format = DRM_FORMAT_BGRX8888, + .depth = 24, .num_planes = 1, .cpp = { 4, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1 }, + { .format = DRM_FORMAT_RGB565_A8, + .depth = 24, .num_planes = 2, .cpp = { 2, 1, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .has_alpha = true }, + { .format = DRM_FORMAT_BGR565_A8, + .depth = 24, .num_planes = 2, .cpp = { 2, 1, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .has_alpha = true }, + { .format = DRM_FORMAT_XRGB2101010, + .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1 }, + { .format = DRM_FORMAT_XBGR2101010, + .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1 }, + { .format = DRM_FORMAT_RGBX1010102, + .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1 }, + { .format = DRM_FORMAT_BGRX1010102, + .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1 }, + { .format = DRM_FORMAT_ARGB2101010, + .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .has_alpha = true }, + { .format = DRM_FORMAT_ABGR2101010, + .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .has_alpha = true }, + { .format = DRM_FORMAT_RGBA1010102, + .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .has_alpha = true }, + { .format = DRM_FORMAT_BGRA1010102, + .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .has_alpha = true }, + { .format = DRM_FORMAT_ARGB8888, + .depth = 32, .num_planes = 1, .cpp = { 4, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .has_alpha = true }, + { .format = DRM_FORMAT_ABGR8888, + .depth = 32, .num_planes = 1, .cpp = { 4, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .has_alpha = true }, + { .format = DRM_FORMAT_RGBA8888, + .depth = 32, .num_planes = 1, .cpp = { 4, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .has_alpha = true }, + { .format = DRM_FORMAT_BGRA8888, + .depth = 32, .num_planes = 1, .cpp = { 4, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .has_alpha = true }, + { .format = DRM_FORMAT_RGB888_A8, + .depth = 32, .num_planes = 2, .cpp = { 3, 1, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .has_alpha = true }, + { .format = DRM_FORMAT_BGR888_A8, + .depth = 32, .num_planes = 2, .cpp = { 3, 1, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .has_alpha = true }, + { .format = DRM_FORMAT_XRGB8888_A8, + .depth = 32, .num_planes = 2, .cpp = { 4, 1, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .has_alpha = true }, + { .format = DRM_FORMAT_XBGR8888_A8, + .depth = 32, .num_planes = 2, .cpp = { 4, 1, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .has_alpha = true }, + { .format = DRM_FORMAT_RGBX8888_A8, + .depth = 32, .num_planes = 2, .cpp = { 4, 1, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .has_alpha = true }, + { .format = DRM_FORMAT_BGRX8888_A8, + .depth = 32, .num_planes = 2, .cpp = { 4, 1, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .has_alpha = true }, + { .format = DRM_FORMAT_YUV410, + .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, + .hsub = 4, .vsub = 4, .tile_w = 1, .tile_h = 1, + .is_yuv = true }, + { .format = DRM_FORMAT_YVU410, + .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, + .hsub = 4, .vsub = 4, .tile_w = 1, .tile_h = 1, + .is_yuv = true }, + { .format = DRM_FORMAT_YUV411, + .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, + .hsub = 4, .vsub = 1, .tile_w = 1, .tile_h = 1, + .is_yuv = true }, + { .format = DRM_FORMAT_YVU411, + .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, + .hsub = 4, .vsub = 1, .tile_w = 1, .tile_h = 1, + .is_yuv = true }, + { .format = DRM_FORMAT_YUV420, + .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, + .hsub = 2, .vsub = 2, .tile_w = 1, .tile_h = 1, + .is_yuv = true }, + { .format = DRM_FORMAT_YVU420, + .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, + .hsub = 2, .vsub = 2, .tile_w = 1, .tile_h = 1, + .is_yuv = true }, + { .format = DRM_FORMAT_YUV422, + .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, + .hsub = 2, .vsub = 1, .tile_w = 1, .tile_h = 1, + .is_yuv = true }, + { .format = DRM_FORMAT_YVU422, + .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, + .hsub = 2, .vsub = 1, .tile_w = 1, .tile_h = 1, + .is_yuv = true }, + { .format = DRM_FORMAT_YUV444, + .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .is_yuv = true }, + { .format = DRM_FORMAT_YVU444, + .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .is_yuv = true }, + { .format = DRM_FORMAT_NV12, + .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, + .hsub = 2, .vsub = 2, .tile_w = 1, .tile_h = 1, + .is_yuv = true }, + { .format = DRM_FORMAT_NV21, + .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, + .hsub = 2, .vsub = 2, .tile_w = 1, .tile_h = 1, + .is_yuv = true }, + { .format = DRM_FORMAT_NV16, + .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, + .hsub = 2, .vsub = 1, .tile_w = 1, .tile_h = 1, + .is_yuv = true }, + { .format = DRM_FORMAT_NV61, + .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, + .hsub = 2, .vsub = 1, .tile_w = 1, .tile_h = 1, + .is_yuv = true }, + { .format = DRM_FORMAT_NV24, + .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .is_yuv = true }, + { .format = DRM_FORMAT_NV42, + .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .is_yuv = true }, + { .format = DRM_FORMAT_YUYV, + .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, + .hsub = 2, .vsub = 1, .tile_w = 1, .tile_h = 1, + .is_yuv = true }, + { .format = DRM_FORMAT_YVYU, + .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, + .hsub = 2, .vsub = 1, .tile_w = 1, .tile_h = 1, + .is_yuv = true }, + { .format = DRM_FORMAT_UYVY, + .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, + .hsub = 2, .vsub = 1, .tile_w = 1, .tile_h = 1, + .is_yuv = true }, + { .format = DRM_FORMAT_VYUY, + .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, + .hsub = 2, .vsub = 1, .tile_w = 1, .tile_h = 1, + .is_yuv = true }, + { .format = DRM_FORMAT_AYUV, + .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .has_alpha = true, .is_yuv = true }, + { .format = DRM_FORMAT_XYUV8888, + .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .is_yuv = true }, + { .format = DRM_FORMAT_XVYU2101010, + .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, + .hsub = 1, .vsub = 1, .tile_w = 1, .tile_h = 1, + .is_yuv = true }, + { .format = DRM_FORMAT_Y0L0, + .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, + .hsub = 2, .vsub = 2, .tile_w = 2, .tile_h = 2, + .has_alpha = true, .is_yuv = true }, + { .format = DRM_FORMAT_X0L0, + .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, + .hsub = 2, .vsub = 2, .tile_w = 2, .tile_h = 2, + .is_yuv = true }, + { .format = DRM_FORMAT_Y0L2, + .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, + .hsub = 2, .vsub = 2, .tile_w = 2, .tile_h = 2, + .has_alpha = true, .is_yuv = true }, + { .format = DRM_FORMAT_X0L2, + .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, + .hsub = 2, .vsub = 2, .tile_w = 2, .tile_h = 2, + .is_yuv = true }, + { .format = DRM_FORMAT_P010, + .depth = 0, .num_planes = 2, .cpp = { 2, 4, 0 }, + .hsub = 2, .vsub = 2, .tile_w = 1, .tile_h = 1, + .is_yuv = true }, }; unsigned int i; diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_fourcc.h index f9c15845f465..41681cf2b140 100644 --- a/include/drm/drm_fourcc.h +++ b/include/drm/drm_fourcc.h @@ -38,6 +38,8 @@ struct drm_mode_fb_cmd2; * @cpp: Number of bytes per pixel (per plane) * @hsub: Horizontal chroma subsampling factor * @vsub: Vertical chroma subsampling factor + * @tile_w: Width of a tile in pixels, for non-tiled formats this should be 1 + * @tile_h: Height of a tile in pixels, for non-tiled formats this should be 1 * @has_alpha: Does the format embeds an alpha component? * @is_yuv: Is it a YUV format? */ @@ -48,6 +50,8 @@ struct drm_format_info { u8 cpp[3]; u8 hsub; u8 vsub; + u8 tile_w; + u8 tile_h; bool has_alpha; bool is_yuv; };