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

Javier Martinez Canillas javierm at redhat.com
Fri Nov 18 13:41:21 UTC 2022


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?

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat



More information about the dri-devel mailing list