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
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature
_______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linuxfoundation.org/mailman/listinfo/virtualization