-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
fix(drm): Default to XRGB8888 framebuffer #5851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The ARGB8888 framebuffer format for base canvas makes little sense as the base canvas is unlikely to be transparent and require alpha. Use XRGB8888 framebuffer format which is more widely supported by DRM drivers as base plane pixel format. This makes e.g. i.MX8M Nano work by default. Signed-off-by: Marek Vasut <marex@denx.de> --- This is identical fix to lv_drivers lvgl/lv_drivers#282
6171cca
to
73c941f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It really makes sense. And it's faster too!
Co-authored-by: Marek Vasut <marex@denx.de>
In the meantime, I can imagine one use case where base plane with alpha would make sense, chroma keying (single color background with some object in front), but in that case, I think the user would configure the library accordingly. On which platform is XRGB8888 base plane faster than ARGB8888 ? Base plane alpha should be resolved in the CRTC only, since that would be the chroma key . Unless, on this platform where it is now faster, the alpha is handled by reading in two planes unconditionally , while without alpha only one plane is read , that might explain why it is faster without alpha . |
Note that v9 doesn't support chroma keying. We have dropped it as it wasn't really used. Rendering to ARGB8888 is slower in LVGL because when 2 colors are mixed LVGL needs to mix both the RGB colors and the alpha channel. As a reference this function mixes colors with and ARGB destination. And this is for an XRGRB8888. |
OK
I was writing about hardware variant of this, where the CRTC samples multiple input planes and does the mixing for you, this stuff:
There you can usually turn the input planes on/off , so the CRTC wouldn't sample them and waste DRAM bandwidth.
Right, sure, software blending is obviously going to be more expensive. |
Yeah, I see. Blending the final ARGB layer is really done by the hardware. I mean only the process of LVGL rendering. |
Co-authored-by: Marek Vasut <marex@denx.de>
Co-authored-by: Marek Vasut <marex@denx.de>
The ARGB8888 framebuffer format for base canvas makes little sense as the base canvas is unlikely to be transparent and require alpha. Use XRGB8888 framebuffer format which is more widely supported by DRM drivers as base plane pixel format.
This makes e.g. i.MX8M Nano work by default.
This is identical fix to lv_drivers lvgl/lv_drivers#282