diff options
author | Hans de Goede <j.w.r.degoede@gmail.com> | 2017-11-25 20:35:50 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2017-12-04 23:03:21 +0100 |
commit | 8f0cb418393ba8023c1496eb3ab0a2adca8fbaa2 (patch) | |
tree | f9cc732dbc7dfe2e859d9dc4e3f48f041be3aada /include/drm/drm_fb_helper.h | |
parent | drm: Add support for a panel-orientation connector property, v6 (diff) | |
download | linux-8f0cb418393ba8023c1496eb3ab0a2adca8fbaa2.tar.xz linux-8f0cb418393ba8023c1496eb3ab0a2adca8fbaa2.zip |
drm/fb-helper: Apply panel orientation connector prop to the primary plane, v6.
Apply the "panel orientation" drm connector prop to the primary plane so
that fbcon and fbdev using userspace programs display the right way up.
Changes in v3:
-Use a rotation member in struct drm_fb_helper_crtc and set that from
drm_setup_crtcs instead of looping over all crtc's to find the right one
later
-Since we now no longer look at rotation quirks directly in the fbcon
code, set fb_info.fbcon_rotate_hint when the panel is not mounted upright
and we cannot use hardware rotation
Changes in v4:
-Make drm_fb_helper_init() init drm_fb_helper_crtc.rotation to
DRM_MODE_ROTATE_0 for all crtcs, so that we do not end up setting the
plane_state's rotation to an invalid value for disabled crtcs
(caught by Fi.CI)
Changes in v5:
-Only use hardware (crtc primary plane) rotation for DRM_ROTATE_180,
90 / 270 degree rotation requires special handling which we lack atm
-Add a TODO comment for 90 / 270 degree hardware rotation
-Add some comments to better document the default case when mapping
sw_rotations to fbcon_rotate_hints
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=94894
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171125193553.23986-5-hdegoede@redhat.com
Diffstat (limited to 'include/drm/drm_fb_helper.h')
-rw-r--r-- | include/drm/drm_fb_helper.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h index 877e5b395c02..1494b12a984a 100644 --- a/include/drm/drm_fb_helper.h +++ b/include/drm/drm_fb_helper.h @@ -48,6 +48,7 @@ struct drm_fb_helper_crtc { struct drm_mode_set mode_set; struct drm_display_mode *desired_mode; int x, y; + int rotation; }; /** @@ -159,6 +160,13 @@ struct drm_fb_helper { int connector_count; int connector_info_alloc_count; /** + * @sw_rotations: + * Bitmask of all rotations requested for panel-orientation which + * could not be handled in hardware. If only one bit is set + * fbdev->fbcon_rotate_hint gets set to the requested rotation. + */ + int sw_rotations; + /** * @connector_info: * * Array of per-connector information. Do not iterate directly, but use |