Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp574661pxb; Tue, 15 Feb 2022 22:33:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJyXY67WEFPhciN5Gdv3Twumvxerl/w7ssnKrrJs2BiWiZe0gRounNzyevzkqeIHiVoYPPZ5 X-Received: by 2002:a17:90b:eca:b0:1b8:a62e:4125 with SMTP id gz10-20020a17090b0eca00b001b8a62e4125mr131608pjb.88.1644993234154; Tue, 15 Feb 2022 22:33:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644993234; cv=none; d=google.com; s=arc-20160816; b=QxVTQwz5n51GACb/q2C3wNQTuCoBpk57j903Umy/D2g14rPURmKXu8IESvklg5S2DK E0Fc6+Pz6Fw4QIRm55wX13lTYqVzINCW4dU0NVxnsOEilLiqM54hchN352A5F0qJ8ni9 PZg1/T8ku0T6s/LFrfcenfJa+umwlMTwvifAlSy6XbKvCEIcCkFi4ge0v5s5/E4tJI+T 6dtTagQOTMPBl9VC2KACYH/dG8VMslDVbOis6YWBa4/A4+aZBjVqzNO5UHgyvavNUSNS B/EjBapJYFCRi+0IDB3MrD6XsP11wesLLM0w2anGhasKnm6fVUsf0oShEmLPVW5x2dJL gEcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=K2qkNvHsDsy9CzavCP30a5GvYvXn1k3PTi1Ff/yFh5w=; b=q2+IVXC0pP9Mr2s9Eu+pYz5OBYE/ff5va88dIU0zVOi5uhTTKNYFGKavM3JmnfviE7 d5HZZyEUESlj5QlSgGctkl/lKJh3Q3js2v4XJknumNhN0zB1gHF3i2Ms3q7h1qpwiSfQ Y0mYkre8FYwqymSlp5gQwEnM63Chf3CfjktAyBYy1uYmksRjS37V2GEgx5B7uCZiynoK whBUED+ge0w+l0oqsLFI1suXOn/H6/OWItxECndz81Fcddnl+8vNHEUrN40ErquD5oj6 tB06z3dYalowHCDxb3COJPfwMBiyiol6kr1jkkKcNQrSWANBOyJY2ZkdmMjOPn0l1sHh hgLA== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id d128si4662756pgc.347.2022.02.15.22.33.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 22:33:54 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7B8581DA0DE; Tue, 15 Feb 2022 22:26:20 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241914AbiBOQwu (ORCPT + 99 others); Tue, 15 Feb 2022 11:52:50 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:60026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240229AbiBOQwp (ORCPT ); Tue, 15 Feb 2022 11:52:45 -0500 Received: from michel.telenet-ops.be (michel.telenet-ops.be [IPv6:2a02:1800:110:4::f00:18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 695129BADD for ; Tue, 15 Feb 2022 08:52:34 -0800 (PST) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:7534:e0be:5adf:2691]) by michel.telenet-ops.be with bizsmtp id vUsV2600518GbK106UsVDG; Tue, 15 Feb 2022 17:52:31 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1nK140-000tUr-LD; Tue, 15 Feb 2022 17:52:28 +0100 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1nK140-00BUSC-3a; Tue, 15 Feb 2022 17:52:28 +0100 From: Geert Uytterhoeven To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Helge Deller , Javier Martinez Canillas Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-m68k@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 8/8] drm/fourcc: Add DRM_FORMAT_D1 Date: Tue, 15 Feb 2022 17:52:26 +0100 Message-Id: <20220215165226.2738568-9-geert@linux-m68k.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220215165226.2738568-1-geert@linux-m68k.org> References: <20220215165226.2738568-1-geert@linux-m68k.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Introduce a fourcc code for a single-channel frame buffer format with two darkness levels. This can be used for two-level dark-on-light displays. As the number of bits per pixel is less than eight, this relies on proper block handling for the calculation of bits per pixel and pitch. Signed-off-by: Geert Uytterhoeven --- drivers/gpu/drm/drm_fourcc.c | 2 ++ include/uapi/drm/drm_fourcc.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c index c12e48ecb1ab8aad..d00ce5d8d1fb9dd3 100644 --- a/drivers/gpu/drm/drm_fourcc.c +++ b/drivers/gpu/drm/drm_fourcc.c @@ -151,6 +151,8 @@ const struct drm_format_info *__drm_format_info(u32 format) { .format = DRM_FORMAT_C4, .depth = 4, .num_planes = 1, .char_per_block = { 1, }, .block_w = { 2, }, .block_h = { 1, }, .hsub = 1, .vsub = 1 }, { .format = DRM_FORMAT_C8, .depth = 8, .num_planes = 1, .cpp = { 1, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_D1, .depth = 1, .num_planes = 1, + .char_per_block = { 1, }, .block_w = { 8, }, .block_h = { 1, }, .hsub = 1, .vsub = 1 }, { .format = DRM_FORMAT_R1, .depth = 1, .num_planes = 1, .char_per_block = { 1, }, .block_w = { 8, }, .block_h = { 1, }, .hsub = 1, .vsub = 1 }, { .format = DRM_FORMAT_R2, .depth = 2, .num_planes = 1, diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h index 8605a1acc6813e6c..c15c6efcc65e5827 100644 --- a/include/uapi/drm/drm_fourcc.h +++ b/include/uapi/drm/drm_fourcc.h @@ -104,6 +104,9 @@ extern "C" { #define DRM_FORMAT_C4 fourcc_code('C', '4', ' ', ' ') /* [3:0] C */ #define DRM_FORMAT_C8 fourcc_code('C', '8', ' ', ' ') /* [7:0] C */ +/* 1 bpp Darkness */ +#define DRM_FORMAT_D1 fourcc_code('D', '1', ' ', ' ') /* [0] D */ + /* 1 bpp Red */ #define DRM_FORMAT_R1 fourcc_code('R', '1', ' ', ' ') /* [0] R */ -- 2.25.1