[PATCH] drm/simpledrm: Add "panel orientation" property on non-upright mounted LCD panels
Thomas Zimmermann
tzimmermann at suse.de
Tue Feb 22 19:14:40 UTC 2022
Hi
Am 21.02.22 um 23:00 schrieb Hans de Goede:
> Some devices use e.g. a portrait panel in a standard laptop casing made
> for landscape panels. efifb calls drm_get_panel_orientation_quirk() and
> sets fb_info.fbcon_rotate_hint to make fbcon rotate the console so that
> it shows up-right instead of on its side.
>
> When switching to simpledrm to fbcon renders on its side. Call the
Maybe '... fbcon renders sidewards.'
> drm_connector_set_panel_orientation_with_quirk() helper to add
> a "panel orientation" property on devices listed in the quirk table,
> to make the fbcon (and aware userspace apps) rotate the image to
> display properly.
>
> Cc: Javier Martinez Canillas <javierm at redhat.com>
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
Acked-by: Thomas Zimmermann <tzimmermann at suse.de>
Best regards
Thomas
> ---
> drivers/gpu/drm/tiny/simpledrm.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/tiny/simpledrm.c b/drivers/gpu/drm/tiny/simpledrm.c
> index 04146da2d1d8..11576e0297e4 100644
> --- a/drivers/gpu/drm/tiny/simpledrm.c
> +++ b/drivers/gpu/drm/tiny/simpledrm.c
> @@ -798,6 +798,9 @@ static int simpledrm_device_init_modeset(struct simpledrm_device *sdev)
> if (ret)
> return ret;
> drm_connector_helper_add(connector, &simpledrm_connector_helper_funcs);
> + drm_connector_set_panel_orientation_with_quirk(connector,
> + DRM_MODE_PANEL_ORIENTATION_UNKNOWN,
> + mode->hdisplay, mode->vdisplay);
>
> formats = simpledrm_device_formats(sdev, &nformats);
>
--
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20220222/dfd6e01b/attachment.sig>
More information about the dri-devel
mailing list