From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=195.135.223.130 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794817278; b=pw8x1ShOiloLK81ZglH0fHox7oNx6ogskn+j07AZGDVRi7eQ7YFDxT7Er+MfWoRR3RUF MGGemrQLq5wkt5ylB58aRRO+7eI0VTuq+nWtyyorOfhz8aaz/G7qpdAf88lj5U3RaK+Y+ 9KWWScUBnaMgnLhkGlM0JfPKvHC5jc8OTgTNDB8nACqdhvUD1hgj4dVAuk41zheZgKG0V GMtdDdTsZTddlV/IrVBsZh2jtpjC7FI5xfjuc6374w7gnZtJTg1m/tI8y0fhR49Xnq5t/ x9kpUAw7EhQJiyQ6GGFd6M+gIaKnRn7xXrDhh/YD/OeJtmiEoAgyGVFDs2t1vsYOfRQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794817278; h=DMARC-Filter:Received:DKIM-Signature:DKIM-Signature:DKIM-Signature: DKIM-Signature:Received:Received:Message-ID:Date:MIME-Version: User-Agent:Subject:To:Cc:References:Content-Language:From:Autocrypt: In-Reply-To:Content-Type:Content-Transfer-Encoding:X-Spam-Flag: X-Spam-Level:X-Spamd-Result:X-Spam-Score; bh=WUNOTLa1PiW/Ymr1qh+rJCrmXq9rz99FqsgZAVSytb4=; b=i4+PJgl2cUegpT47Kpft8pNp1XimVe4ZY29V5/BQI+C6KJdxDHiBELBWfk2uDVB0kzrd Qz0WOhQ+wM1F7aSYUbod8v955ROriediBWfzmT/ZVyi1koOnC7Wgm45Jz+ZV3sK/s68ix quoWXWINGFqxdX+XC+tiMCbtcex34BUC9Vi9lElF92NgTm31o6JQZVqyyeDrdU5Sv5vz2 HohfAYJNbb4eX+9H68jwXVUE48ZqOAnNM+da7Ehg9HD4cAjB01lmr4m5lMPuT4Ka09YmK zEVcZuwKSXTxxo+VMytxodRIDHTsg8WlE0U6FuFw3KCe1c9Naz1PtquO9FFELYenLFQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=xJrBgcWq; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=6b9QoIvZ; dkim=pass header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=j56eF0j4; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=Zn42YtSI; arc=none smtp.remote-ip=195.135.223.130 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF720606A31C; Mon, 16 Nov 2026 08:21:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org AF720606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=xJrBgcWq; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=6b9QoIvZ; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=j56eF0j4; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=Zn42YtSI Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 79576222B3; Mon, 16 Nov 2026 08:21:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1794817275; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=WUNOTLa1PiW/Ymr1qh+rJCrmXq9rz99FqsgZAVSytb4=; b=xJrBgcWqQrfO3rF8HZGi0vLkvsyDkmvibhxLusLGkFIRkdOcH5kH29NAJ/k+Haa2pxOQ7k zQgp9vRd+ue8Pe6xHZAEW+PngZnsIlJgIHr5T2KjYSHXo1Bx9N6lVw1dj7w08o1bDu0CUA TmqcocP4Sb7hOW8Fh7SY49CoqMOuNMo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1794817275; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=WUNOTLa1PiW/Ymr1qh+rJCrmXq9rz99FqsgZAVSytb4=; b=6b9QoIvZPLTokHvhzwpOswwLlNdGskrzkYHrYONJ1InNF069a7j/Ra5Ni9cnPhE/Q28Hdk y0AqEzuepurUJBBQ== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1794817274; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=WUNOTLa1PiW/Ymr1qh+rJCrmXq9rz99FqsgZAVSytb4=; b=j56eF0j4axD9H0w/XmA80aR8lirfeAaiply8flEKf/2vTRsM4A01gLcvtnLSZtZNTIl7hK fKoF0U04YYj5viaU63rHK/zH7Go5U0JQf7xDZwHDy+sA++U0RcjS81+Zk/zAaNhyL0+QMp 0E62L8VQAVkGQWGRtHmooluZfcInIss= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1794817274; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=WUNOTLa1PiW/Ymr1qh+rJCrmXq9rz99FqsgZAVSytb4=; b=Zn42YtSIsTQc3q7GnoPKfvgQjdrVM9QhVHJdcweudK5Fo7s9eH+KIkA1ayj5sul/e7KY5q n0QMyr2ZhOsRT4Bg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id E90D31334C; Mon, 16 Nov 2026 08:21:13 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id G72mIvm8+mpqXwAAD6G6ig (envelope-from ); Mon, 16 Nov 2026 08:21:13 +0000 Message-ID: <57ae6b8a-0a34-4093-bf63-e40a0bc2c904@suse.de> Date: Mon, 16 Nov 2026 09:21:13 +0100 X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] dt-bindings: display: simple-framebuffer: Document mono format To: Sebastian Raase Cc: Sebastian Raase , Hans de Goede , Maarten Lankhorst , Maxime Ripard , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Helge Deller References: <258a1228601ab9b5dbb8f077dacf61121b641f15.1793758480.git.linux@sraa.de> <8a697d14-18c3-454c-979b-7042f16c66ba@suse.de> <20261116030028.32753ba3@ryzen> Content-Language: en-US From: Thomas Zimmermann Autocrypt: addr=tzimmermann@suse.de; keydata= xsBNBFs50uABCADEHPidWt974CaxBVbrIBwqcq/WURinJ3+2WlIrKWspiP83vfZKaXhFYsdg XH47fDVbPPj+d6tQrw5lPQCyqjwrCPYnq3WlIBnGPJ4/jreTL6V+qfKRDlGLWFjZcsrPJGE0 BeB5BbqP5erN1qylK9i3gPoQjXGhpBpQYwRrEyQyjuvk+Ev0K1Jc5tVDeJAuau3TGNgah4Yc hdHm3bkPjz9EErV85RwvImQ1dptvx6s7xzwXTgGAsaYZsL8WCwDaTuqFa1d1jjlaxg6+tZsB 9GluwvIhSezPgnEmimZDkGnZRRSFiGP8yjqTjjWuf0bSj5rUnTGiyLyRZRNGcXmu6hjlABEB AAHNJ1Rob21hcyBaaW1tZXJtYW5uIDx0emltbWVybWFubkBzdXNlLmRlPsLAjgQTAQgAOAIb AwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgBYhBHIX+6yM6c9jRKFo5WgNwR1TC3ojBQJftODH AAoJEGgNwR1TC3ojx1wH/0hKGWugiqDgLNXLRD/4TfHBEKmxIrmfu9Z5t7vwUKfwhFL6hqvo lXPJJKQpQ2z8+X2vZm/slsLn7J1yjrOsoJhKABDi+3QWWSGkaGwRJAdPVVyJMfJRNNNIKwVb U6B1BkX2XDKDGffF4TxlOpSQzdtNI/9gleOoUA8+jy8knnDYzjBNOZqLG2FuTdicBXblz0Mf vg41gd9kCwYXDnD91rJU8tzylXv03E75NCaTxTM+FBXPmsAVYQ4GYhhgFt8S2UWMoaaABLDe 7l5FdnLdDEcbmd8uLU2CaG4W2cLrUaI4jz2XbkcPQkqTQ3EB67hYkjiEE6Zy3ggOitiQGcqp j//OwE0EWznS4AEIAMYmP4M/V+T5RY5at/g7rUdNsLhWv1APYrh9RQefODYHrNRHUE9eosYb T6XMryR9hT8XlGOYRwKWwiQBoWSDiTMo/Xi29jUnn4BXfI2px2DTXwc22LKtLAgTRjP+qbU6 3Y0xnQN29UGDbYgyyK51DW3H0If2a3JNsheAAK+Xc9baj0LGIc8T9uiEWHBnCH+RdhgATnWW GKdDegUR5BkDfDg5O/FISymJBHx2Dyoklv5g4BzkgqTqwmaYzsl8UxZKvbaxq0zbehDda8lv hFXodNFMAgTLJlLuDYOGLK2AwbrS3Sp0AEbkpdJBb44qVlGm5bApZouHeJ/+n+7r12+lqdsA EQEAAcLAdgQYAQgAIAIbDBYhBHIX+6yM6c9jRKFo5WgNwR1TC3ojBQJftOH6AAoJEGgNwR1T C3ojVSkIALpAPkIJPQoURPb1VWjh34l0HlglmYHvZszJWTXYwavHR8+k6Baa6H7ufXNQtThR yIxJrQLW6rV5lm7TjhffEhxVCn37+cg0zZ3j7zIsSS0rx/aMwi6VhFJA5hfn3T0TtrijKP4A SAQO9xD1Zk9/61JWk8OysuIh7MXkl0fxbRKWE93XeQBhIJHQfnc+YBLprdnxR446Sh8Wn/2D Ya8cavuWf2zrB6cZurs048xe0UbSW5AOSo4V9M0jzYI4nZqTmPxYyXbm30Kvmz0rYVRaitYJ 4kyYYMhuULvrJDMjZRvaNe52tkKAvMevcGdt38H4KSVXAylqyQOW5zvPc4/sq9c= In-Reply-To: <20261116030028.32753ba3@ryzen> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Flag: NO X-Spam-Level: X-Spamd-Result: default: False [-11.79 / 50.00]; SUSE_INTERNAL_BYPASS(-9.00)[]; BAYES_HAM(-3.00)[100.00%]; SUSPICIOUS_RECIPS(1.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; XM_UA_NO_VERSION(0.01)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; TAGGED_RCPT(0.00)[dt]; RCPT_COUNT_TWELVE(0.00)[15]; RCVD_TLS_ALL(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[sraa.de,kernel.org,linux.intel.com,gmail.com,ffwll.ch,vger.kernel.org,lists.freedesktop.org,gmx.de]; MID_RHS_MATCH_FROM(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:url,suse.de:email,sraa.de:email,imap1.dmz-prg2.suse.org:helo,bootlin.com:url] X-Spam-Score: -11.79 Hi Am 15.11.26 um 20:00 schrieb Sebastian Raase: > Hi, > > On Thu, 12 Nov 2026 08:35:59 +0100 > Thomas Zimmermann wrote: > >> Hi >> >> Am 04.11.26 um 03:34 schrieb Sebastian Raase: >>> This is a 1 bit-per-pixel monochrome format, with 8 pixels/byte. >>> >>> Signed-off-by: Sebastian Raase >>> --- >>> .../devicetree/bindings/display/simple-framebuffer.yaml | >>> 2 ++ 1 file changed, 2 insertions(+) >>> >>> diff --git >>> a/Documentation/devicetree/bindings/display/simple-framebuffer.yaml >>> b/Documentation/devicetree/bindings/display/simple-framebuffer.yaml >>> index 45ffdebc9d86..c627ec088434 100644 --- >>> a/Documentation/devicetree/bindings/display/simple-framebuffer.yaml >>> +++ >>> b/Documentation/devicetree/bindings/display/simple-framebuffer.yaml >>> @@ -94,6 +94,7 @@ properties: format: description: > Format of the >>> framebuffer: >>> + * `mono` - 1-bit packed pixels, 8 pixels/byte >> I don't object the change, but I really object the naming. > I fully agree, but could not think of a better name at the time. > > As Sashiko pointed out, "mono" neither describes the endianness nor the > polarity. > >> Mono is not a good name because it doesn't describe the format's >> pixel layout. For example, RGB with only 2 colors is also mono in >> some sense. > A two-color RGB format sounds like a contradiction, although bi-color > LEDs are very common. > >> The common names used in the Linux kernel for this type of color >> format are C1 and R1. More generally speaking, >> >>  - Cn describes an n-bit format with a palette. The pixel bits index >> into the palette.  Pixels are packed. >>  - Rn describes an n-bit format with a single color channel. The >> channel has linear color gradient. Pixels are packed. >> >> In your case, you'd define 'r1'. While at it, we can also define r2, >> r4, and r8.  The terminal supports up to 16 colors, so implementing >> r4 might be of interest to some simple hardware. > Sounds like a good idea; I can test those for simplefb (not simpledrm). > Do you have a suggestion on endianness and polarity in the name? See [1] for what we use in DRM.  - Cn: Index into color LUT  - Rn: Linear gradient, 0 means dark  - Dn: Linear gradient, 0 means full brightness For what you want to do, 'r1' seams like the right choice, as I outlined before. [1] https://elixir.bootlin.com/linux/v7.3.1/source/include/uapi/drm/drm_fourcc.h#L95 > > Today, we have grayscale/color in mind, so the obvious polarity is > 0=dark and 1=bright. But the other approach uses 0=paper (white) and That's Rn > 1=ink (black), which leads to reverse video hardware. It's uncommon, so > we can probably ignore this. That's Dn.  I'm not aware of any hardware that would implement this and use simple-framebuffer. No need to add this for now. > > Endianness is basically the same difference as RGBA vs. ABGR in 32-bit > color formats. Our conversion logic from 8-bit grayscale to 1-bit mono is at [2]. It encodes from LSB to MSB.  AFIAK, that's the usual convention. [2] https://elixir.bootlin.com/linux/v7.3.1/source/drivers/gpu/drm/drm_format_helper.c#L1187 > > So far, I have only tried stride values which were multiples of 8, to > align them with byte boundaries. Any restriction would apply to r1, r2 > and r4 formats. Stride and display resolution needs to be aligned to byte boundaries. It's usually not a problem in practice. > > If I send a v2 patch, should that be a follow-up of this email thread, > or a completely new thread? A new thread please. Best regards Thomas > >> Best regards >> Thomas >> >> >>> * `a1r5g5b5` - 16-bit pixels, d[15]=a, d[14:10]=r, >>> d[9:5]=g, d[4:0]=b >>> * `a2r10g10b10` - 32-bit pixels, d[31:30]=a, d[29:20]=r, >>> d[19:10]=g, d[9:0]=b >>> * `a8b8g8r8` - 32-bit pixels, d[31:24]=a, d[23:16]=b, >>> d[15:8]=g, d[7:0]=r @@ -106,6 +107,7 @@ properties: >>> * `x8r8g8b8` - 32-bit pixels, d[23:16]=r, d[15:8]=g, >>> d[7:0]=b >>> * `x8b8g8r8` - 32-bit pixels, d[23:16]=b, d[15:8]=g, >>> d[7:0]=r enum: >>> + - mono >>> - a1r5g5b5 >>> - a2r10g10b10 >>> - a8b8g8r8 > Best Regards, > Sebastian -- -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com GF: Stefan Gaiser, Jochen Jaser, Abhinav Puri, (HRB 36809, AG Nürnberg)