From patchwork Fri Jul 28 09:52:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 13331604 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 305EBC001DE for ; Fri, 28 Jul 2023 09:53:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6CC7710E6CA; Fri, 28 Jul 2023 09:53:19 +0000 (UTC) Received: from laurent.telenet-ops.be (laurent.telenet-ops.be [IPv6:2a02:1800:110:4::f00:19]) by gabe.freedesktop.org (Postfix) with ESMTPS id AEC5910E6C9 for ; Fri, 28 Jul 2023 09:52:48 +0000 (UTC) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:12b0:7b7e:d1ff:7873]) by laurent.telenet-ops.be with bizsmtp id SZsm2A00M0d1nm801Zsmsa; Fri, 28 Jul 2023 11:52:46 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1qPK9B-002m52-FX; Fri, 28 Jul 2023 11:52:46 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1qPK9O-00ApUU-K7; Fri, 28 Jul 2023 11:52:46 +0200 From: Geert Uytterhoeven To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm v3 0/9] util, modetest: Add support for low-color frame buffer formats Date: Fri, 28 Jul 2023 11:52:31 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Geert Uytterhoeven Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi all, A long outstanding issue with the DRM subsystem has been the lack of support for low-color displays, as used typically on older desktop systems, and on small embedded displays. This patch series adds support for color-indexed frame buffer formats with 2, 4, and 16 colors. It has been tested on ARAnyM using a work-in-progress Atari DRM driver. Changes compared to v2[1]: - Add Acked-by, - Add Wikipedia link, - Dropped "[RFC] drm_fourcc: Add DRM_FORMAT_C[124]", as these were added in commit 329eebcf32793361 ("drm_fourcc: sync drm_fourcc with latest drm-next kernel") in libdrm-2.4.115. Changes compared to v1[2]: - SMPTE color LUT accuracy, - Factor out smpte color LUT, - Restructure patches, - Improve descriptions. - Store number of colors for indexed formats, - Add SMPTE pattern support for the C1 and C2 formats. I have also opened a merge request at [3]. Thanks for your comments! [1] https://lore.kernel.org/r/cover.1657302034.git.geert@linux-m68k.org/ [2] https://lore.kernel.org/r/cover.1646683737.git.geert@linux-m68k.org/ [3] https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/314 Geert Uytterhoeven (9): util: Improve SMPTE color LUT accuracy util: Factor out and optimize C8 SMPTE color LUT util: Add support for DRM_FORMAT_C[124] util: Store number of colors for indexed formats util: Add SMPTE pattern support for C4 format util: Add SMPTE pattern support for C1 format util: Add SMPTE pattern support for C2 format modetest: Add support for DRM_FORMAT_C[124] modetest: Add SMPTE pattern support for C4 format tests/modetest/buffers.c | 15 ++ tests/modetest/modetest.c | 9 +- tests/util/format.c | 5 +- tests/util/format.h | 1 + tests/util/pattern.c | 416 ++++++++++++++++++++++++++++++++++---- tests/util/pattern.h | 2 +- 6 files changed, 405 insertions(+), 43 deletions(-)