* [PATCH] drm/simpledrm: Add "panel orientation" property on non-upright mounted LCD panels
@ 2022-02-21 22:00 Hans de Goede
2022-02-22 8:39 ` Javier Martinez Canillas
2022-02-22 19:14 ` Thomas Zimmermann
0 siblings, 2 replies; 5+ messages in thread
From: Hans de Goede @ 2022-02-21 22:00 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: David Airlie, Hans de Goede, dri-devel, Javier Martinez Canillas
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
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@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
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);
--
2.35.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/simpledrm: Add "panel orientation" property on non-upright mounted LCD panels
2022-02-21 22:00 [PATCH] drm/simpledrm: Add "panel orientation" property on non-upright mounted LCD panels Hans de Goede
@ 2022-02-22 8:39 ` Javier Martinez Canillas
2022-02-22 19:14 ` Thomas Zimmermann
1 sibling, 0 replies; 5+ messages in thread
From: Javier Martinez Canillas @ 2022-02-22 8:39 UTC (permalink / raw)
To: Hans de Goede, Thomas Zimmermann; +Cc: David Airlie, dri-devel
Hello Hans,
On 2/21/22 23:00, Hans de Goede wrote:
> 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
This sentence sounds a little off to me. Did you mean:
"the fbcon renders on its side." ?
Maybe you can say something like the following:
When switching to simpledrm, fbcon attachs to the fbdev emulated by
the DRM core instead. And the fb_info.fbcon_rotate_hint field is set
by the emulation layer, if panel orientation was set for a connector.
> 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@redhat.com>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
The patch looks good to me. Thanks a lot for fixing this
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Best regards,
--
Javier Martinez Canillas
Linux Engineering
Red Hat
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/simpledrm: Add "panel orientation" property on non-upright mounted LCD panels
2022-02-21 22:00 [PATCH] drm/simpledrm: Add "panel orientation" property on non-upright mounted LCD panels Hans de Goede
2022-02-22 8:39 ` Javier Martinez Canillas
@ 2022-02-22 19:14 ` Thomas Zimmermann
2022-02-23 11:25 ` Hans de Goede
1 sibling, 1 reply; 5+ messages in thread
From: Thomas Zimmermann @ 2022-02-22 19:14 UTC (permalink / raw)
To: Hans de Goede; +Cc: David Airlie, Javier Martinez Canillas, dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 1792 bytes --]
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@redhat.com>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Thomas Zimmermann <tzimmermann@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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/simpledrm: Add "panel orientation" property on non-upright mounted LCD panels
2022-02-22 19:14 ` Thomas Zimmermann
@ 2022-02-23 11:25 ` Hans de Goede
2022-02-23 14:39 ` Peter Robinson
0 siblings, 1 reply; 5+ messages in thread
From: Hans de Goede @ 2022-02-23 11:25 UTC (permalink / raw)
To: Thomas Zimmermann; +Cc: David Airlie, Javier Martinez Canillas, dri-devel
Hi,
On 2/22/22 20:14, Thomas Zimmermann wrote:
> 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.'
that does not sound entirely right to me, so I've gone with:
"When switching to simpledrm the fbcon renders on its side."
as suggested by Javier (so s/to/the/ ).
>
>> 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@redhat.com>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>
> Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Thank you both for the review/ack. I'm currently doing a
test-build of drm-misc-next with the patch with amended
commit msg applied. Once that is done I'll push this out
to drm-misc-next.
Regards,
Hans
>> ---
>> 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);
>>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/simpledrm: Add "panel orientation" property on non-upright mounted LCD panels
2022-02-23 11:25 ` Hans de Goede
@ 2022-02-23 14:39 ` Peter Robinson
0 siblings, 0 replies; 5+ messages in thread
From: Peter Robinson @ 2022-02-23 14:39 UTC (permalink / raw)
To: Hans de Goede
Cc: David Airlie, dri-devel, Javier Martinez Canillas, Thomas Zimmermann
On Wed, Feb 23, 2022 at 11:25 AM Hans de Goede <hdegoede@redhat.com> wrote:
>
> Hi,
>
> On 2/22/22 20:14, Thomas Zimmermann wrote:
> > 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.'
>
> that does not sound entirely right to me, so I've gone with:
>
> "When switching to simpledrm the fbcon renders on its side."
Not to completely bike shed but you could say "... the fbcon renders
with the incorrect orientation"
> as suggested by Javier (so s/to/the/ ).
>
> >
> >> 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@redhat.com>
> >> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> >
> > Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
>
> Thank you both for the review/ack. I'm currently doing a
> test-build of drm-misc-next with the patch with amended
> commit msg applied. Once that is done I'll push this out
> to drm-misc-next.
>
> Regards,
>
> Hans
>
>
>
> >> ---
> >> 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);
> >>
> >
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-02-23 14:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-21 22:00 [PATCH] drm/simpledrm: Add "panel orientation" property on non-upright mounted LCD panels Hans de Goede
2022-02-22 8:39 ` Javier Martinez Canillas
2022-02-22 19:14 ` Thomas Zimmermann
2022-02-23 11:25 ` Hans de Goede
2022-02-23 14:39 ` Peter Robinson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).