[PATCH 2/7] drm/logicvc: Fix preferred fbdev cpp

Thomas Zimmermann tzimmermann at suse.de
Fri Nov 18 13:48:17 UTC 2022


Hi

Am 18.11.22 um 14:41 schrieb Javier Martinez Canillas:
> On 11/18/22 14:22, Thomas Zimmermann wrote:
> 
> [...]
> 
>>>
>>> I'm also not sure if this is needed. Since IIUC in logicvc_mode_init() the
>>> driver does:
>>>
>>> 	preferred_depth = layer_primary->formats->depth;
>>>
>>> 	/* DRM counts alpha in depth, our driver doesn't. */
>>> 	if (layer_primary->formats->alpha)
>>> 		preferred_depth += 8;
>>>
>>> 	...
>>> 	mode_config->preferred_depth = preferred_depth;
>>>
>>> So it seems this patch is not needed? Unless I'm misunderstanding the code.
>>
>> The driver uses XRGB8888, so the 24-bit color depth has a 32-bit bpp
>> value. Hence the switch.
>>
> 
> Ah, I see. So is to set 32-bit bpp for both XRGB8888 and ARGB8888. But then
> I think that you also need to fix logicvc_mode_init() to remove that += 8?
> 
> Because right now the preferred_depth += 8 would set a preferred_depth of 32
> when should be just 24 even if alpha is enabled?
> 
> Or am I confusing again the meaning of the color depth?

For DRM, it's defined in drm_fourcc.c. ARGB8888 has a depth of 32 and 
XRGB8888 has a depth of 24. Both have a bpp of 32.

BUT in logicvc's internal data structure, both formats have a color 
depth of 24 and a bpp of 32.

Best regards
Thomas

> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20221118/4016f3e3/attachment-0001.sig>


More information about the dri-devel mailing list