* [PATCH] platform/x86: silead_dmi: Fix GP-electronic T701 entry
@ 2017-10-19 7:44 Hans de Goede
2017-10-27 16:48 ` Andy Shevchenko
0 siblings, 1 reply; 2+ messages in thread
From: Hans de Goede @ 2017-10-19 7:44 UTC (permalink / raw)
To: Darren Hart, Andy Shevchenko
Cc: Hans de Goede, platform-driver-x86, linux-kernel
The GP-electronic T701 has its LCD panel mounted upside-down, initially
my plan was to fix this by transparently rotating the image in the i915
driver (my "drm/i915: Deal with upside-down mounted LCD" patch), but
that approach has been rejected instead the kernel will now export
a "panel orientation" property on the drm-connector for the panel and
let userspace deal with it.
But userspace expects the touchscreen coordinates to match the panel
coordinates *before* applying any rotation, so now that we no longer hide
the upside-down-ness of the LCD panel from userspace the coordinates being
generated are wrong and we need to apply a rotation of 180 degrees to the
coordinates to fix this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/platform/x86/silead_dmi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/platform/x86/silead_dmi.c b/drivers/platform/x86/silead_dmi.c
index a0f80f971081..ac304f2318cc 100644
--- a/drivers/platform/x86/silead_dmi.c
+++ b/drivers/platform/x86/silead_dmi.c
@@ -85,6 +85,8 @@ static const struct silead_ts_dmi_data surftab_wintron70_st70416_6_data = {
static const struct property_entry gp_electronic_t701_props[] = {
PROPERTY_ENTRY_U32("touchscreen-size-x", 960),
PROPERTY_ENTRY_U32("touchscreen-size-y", 640),
+ PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
+ PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
PROPERTY_ENTRY_STRING("firmware-name",
"gsl1680-gp-electronic-t701.fw"),
{ }
--
2.14.2
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] platform/x86: silead_dmi: Fix GP-electronic T701 entry
2017-10-19 7:44 [PATCH] platform/x86: silead_dmi: Fix GP-electronic T701 entry Hans de Goede
@ 2017-10-27 16:48 ` Andy Shevchenko
0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2017-10-27 16:48 UTC (permalink / raw)
To: Hans de Goede; +Cc: Darren Hart, Andy Shevchenko, Platform Driver, linux-kernel
On Thu, Oct 19, 2017 at 10:44 AM, Hans de Goede <hdegoede@redhat.com> wrote:
> The GP-electronic T701 has its LCD panel mounted upside-down, initially
> my plan was to fix this by transparently rotating the image in the i915
> driver (my "drm/i915: Deal with upside-down mounted LCD" patch), but
> that approach has been rejected instead the kernel will now export
> a "panel orientation" property on the drm-connector for the panel and
> let userspace deal with it.
>
> But userspace expects the touchscreen coordinates to match the panel
> coordinates *before* applying any rotation, so now that we no longer hide
> the upside-down-ness of the LCD panel from userspace the coordinates being
> generated are wrong and we need to apply a rotation of 180 degrees to the
> coordinates to fix this.
>
Pushed to my review and testing queue, thanks!
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> drivers/platform/x86/silead_dmi.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/platform/x86/silead_dmi.c b/drivers/platform/x86/silead_dmi.c
> index a0f80f971081..ac304f2318cc 100644
> --- a/drivers/platform/x86/silead_dmi.c
> +++ b/drivers/platform/x86/silead_dmi.c
> @@ -85,6 +85,8 @@ static const struct silead_ts_dmi_data surftab_wintron70_st70416_6_data = {
> static const struct property_entry gp_electronic_t701_props[] = {
> PROPERTY_ENTRY_U32("touchscreen-size-x", 960),
> PROPERTY_ENTRY_U32("touchscreen-size-y", 640),
> + PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
> + PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
> PROPERTY_ENTRY_STRING("firmware-name",
> "gsl1680-gp-electronic-t701.fw"),
> { }
> --
> 2.14.2
>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-27 16:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-19 7:44 [PATCH] platform/x86: silead_dmi: Fix GP-electronic T701 entry Hans de Goede
2017-10-27 16:48 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®