Re: [PATCH v4 2/6] drm/ssd130x: Change SSD133X color format to RGB565 from RGB332

Andy Shevchenko <[email protected]>
Newsgroups org.freedesktop.lists.dri-devel,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel
Organization Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo
Message-ID <[email protected]>
On Tue, Aug 18, 2026 at 11:06:22AM +0300, Amit Barzilai wrote:
> SSD133X screens were driven at 8bpp RGB332 despite supporting 16bpp RGB565.
> Switch the SSD133X data path to RGB565.

> +	/*
> +	 * Horizontal address increment, normal SA,SB,SC (e.g. RGB) sub-pixel
> +	 * order, COM split odd even and 65k (RGB565) color depth.
> +	 */
> +	u8 remap = SSD133X_SET_REMAP_COM_SPLIT |
> +		   FIELD_PREP(SSD133X_SET_REMAP_COLOR_DEPTH_MASK, SSD133X_COLOR_DEPTH_65K);
>  	const u8 cmds[] = {
>  		2, SSD133X_SET_MASTER_CURRENT, 0x06,
>  		3, SSD133X_SET_COL_RANGE, 0x00, ssd130x->width - 1,
>  		3, SSD133X_SET_ROW_RANGE, 0x00, ssd130x->height - 1,
> -		/*
> -		 * Horizontal Address Increment
> -		 * Normal order SA,SB,SC (e.g. RGB)
> -		 * COM Split Odd Even
> -		 * 256 color format
> -		 */
> -		2, SSD13XX_SET_SEG_REMAP, 0x20,
> +		2, SSD13XX_SET_SEG_REMAP, remap,

Strictly speaking this is now initialisation of const object by non-const value
(yes, since it's a simple integer  there is nothing in between to modify it,
 but still...).

>  		2, SSD133X_SET_DISPLAY_START, 0x00,
>  		2, SSD133X_SET_DISPLAY_OFFSET, 0x00,
>  		1, SSD133X_SET_DISPLAY_NORMAL,

-- 
With Best Regards,
Andy Shevchenko
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.