lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z_U5eGy3vLgHZmz1@gmail.com>
Date: Tue, 8 Apr 2025 16:58:00 +0200
From: Marcus Folkesson <marcus.folkesson@...il.com>
To: Thomas Zimmermann <tzimmermann@...e.de>
Cc: Javier Martinez Canillas <javierm@...hat.com>,
	David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
	Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
	Maxime Ripard <mripard@...nel.org>, Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>, dri-devel@...ts.freedesktop.org,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	Thomas Zimmermann <tzimmrmann@...e.de>
Subject: Re: [PATCH v3 2/3] drm/st7571-i2c: add support for Sitronix ST7571
 LCD controller

Hi,

On Tue, Apr 08, 2025 at 03:57:22PM +0200, Thomas Zimmermann wrote:
> Hi
> 
> Am 08.04.25 um 15:20 schrieb Marcus Folkesson:
> [...]
> > > 
> > > > +static int st7571_set_pixel_format(struct st7571_device *st7571,
> > > > +				   u32 pixel_format)
> > > > +{
> > > > +	switch (pixel_format) {
> > > > +	case DRM_FORMAT_C1:
> > > > +		return st7571_set_color_mode(st7571, ST7571_COLOR_MODE_BLACKWHITE);
> > > > +	case DRM_FORMAT_C2:
> > > > +		return st7571_set_color_mode(st7571, ST7571_COLOR_MODE_GRAY);
> > > > +	default:
> > > > +		return -EINVAL;
> > > > +	}
> > > These should be DRM_FORMAT_R1 and DRM_FORMAT_R2 and not C{1,2}. The former
> > > is for displays have a single color (i.e: grey) while the latter is when a
> > > pixel can have different color, whose values are defined by a CLUT table.
> > > 
> > I see.
> > Does fbdev only works with CLUT formats? I get this error when I switch
> > to DRM_FORMAT_R{1,2}:
> > 
> > [drm] Initialized st7571 1.0.0 for 0-003f on minor 0
> > st7571 0-003f: [drm] format C1   little-endian (0x20203143) not supported
> > st7571 0-003f: [drm] No compatible format found
> > st7571 0-003f: [drm] *ERROR* fbdev: Failed to setup emulation (ret=-22)
> 
> For testing purposes, you can add the _R formats to the switch case at
> 
> https://elixir.bootlin.com/linux/v6.13.7/source/drivers/gpu/drm/drm_fb_helper.c#L1246
> 
> and see how it goes.

Still no penguin (same error as above).

The problem is that drm_mode_legacy_fb_format(), which is called from
drm_fbdev_shmem_driver_fbdev_probe -> drm_driver_legacy_fb_format -> drm_mode_legacy_fb_format

Sets the pixel format DRM_FORMAT_C{1,2} when bpp is 1 or 2.
So I don't think it is possible to use the _R formats with fbdev.
But I'm not sure?

> 
> Best regards
> Thomas

Best regards,
Marcus Folkesson

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ