drm: Reset primary plane rotation to DRM_MODE_ROTATE_0

System Internals / Plymouth - Hans de Goede [redhat.com] - 10 April 2018 15:32 EDT

On devices where the (LCD) panel is mounted upside-down in the case the kernel's drm_fb_helper code may have set up rotation on the primary plane to make the text-console (and other fbdev using apps) show the right way up.

We inherit this rotation from the text-mode and since we do our own rotation where necessary we end up rotating twice and showing the boot-splash upside-down again.

Dealing with hardware rotation may require using a specific framebuffer tiling which we do not support, so we should just disable the hardware rotation and keep using our own software rotation.

This commit adds code to find the primary plane and its rotation property and if it is not DRM_MODE_ROTATE_0 then sets it to DRM_MODE_ROTATE_0. fixing the double rotation issue.

https://bugs.freedesktop.org/show_bug.cgi?id=104714

d769f11 drm: Reset primary plane rotation to DRM_MODE_ROTATE_0
src/plugins/renderers/drm/plugin.c | 86 ++++++++++++++++++++++++++++++++++++++
1 file changed, 86 insertions(+)

Upstream: cgit.freedesktop.org


  • Share