All of lore.kernel.org
 help / color / mirror / Atom feed
* touchscreen event not rescaling to display resolution
@ 2022-03-28  8:52 Liberado, Selso
  2022-03-29  0:42 ` Jeff LaBundy
  0 siblings, 1 reply; 2+ messages in thread
From: Liberado, Selso @ 2022-03-28  8:52 UTC (permalink / raw)
  To: linux-input

Hello,

We have a 120x800 display with a touchscreen panel embedding the Ilitek 2511 chip.
Kernel version is 5.14.85
We selected the compatible driver building ili210x.c (there are specific function for our chip family).

We modified the dtb file as follow, expecting the touchscreen driver would rescale his coords with the display dimensions.

/* Capacitive touch controller */
touchscreen@41{
compatible = "ilitek,ili251x";
reg = <0x41>;
interrupt-parent = <&gpio5>;
interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
reset-gpios = <&gpio5 5 GPIO_ACTIVE_LOW>;
touchscreen-min-x = <0>;
touchscreen-min-y = <0>;
touchscreen-size-x = <1280>;
touchscreen-size-y = <800>;
};

When testing with evtest, the driver always returns values that are in the chip resolution range (about 16000).
A dirty patch which applies proportional correction is working, meaning this is not about inverted axis or swap issue.
We tried the Weston calibration tool and that works.

The 4 latest parameters are processed in a common file input/touchscreen.c. We don't see where those properties are reused, though.
Do we use this input properties correctly ? Is an input driver expected to do rescale ?
We worked with focaltech and "DT "Polytouch" chips and never needed to apply applicative correction.

Best regards,




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: touchscreen event not rescaling to display resolution
  2022-03-28  8:52 touchscreen event not rescaling to display resolution Liberado, Selso
@ 2022-03-29  0:42 ` Jeff LaBundy
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff LaBundy @ 2022-03-29  0:42 UTC (permalink / raw)
  To: Liberado, Selso; +Cc: linux-input

Hi Selso,

On Mon, Mar 28, 2022 at 08:52:33AM +0000, Liberado, Selso wrote:
> Hello,
> 
> We have a 120x800 display with a touchscreen panel embedding the Ilitek 2511 chip.
> Kernel version is 5.14.85
> We selected the compatible driver building ili210x.c (there are specific function for our chip family).
> 
> We modified the dtb file as follow, expecting the touchscreen driver would rescale his coords with the display dimensions.
> 
> /* Capacitive touch controller */
> touchscreen@41{
> compatible = "ilitek,ili251x";
> reg = <0x41>;
> interrupt-parent = <&gpio5>;
> interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
> reset-gpios = <&gpio5 5 GPIO_ACTIVE_LOW>;
> touchscreen-min-x = <0>;
> touchscreen-min-y = <0>;
> touchscreen-size-x = <1280>;
> touchscreen-size-y = <800>;
> };
> 
> When testing with evtest, the driver always returns values that are in the chip resolution range (about 16000).
> A dirty patch which applies proportional correction is working, meaning this is not about inverted axis or swap issue.
> We tried the Weston calibration tool and that works.
> 
> The 4 latest parameters are processed in a common file input/touchscreen.c. We don't see where those properties are reused, though.
> Do we use this input properties correctly ? Is an input driver expected to do rescale ?
> We worked with focaltech and "DT "Polytouch" chips and never needed to apply applicative correction.
> 
> Best regards,
> 
> 
> 

This is expected behavior; the touchscreen helpers merely save each
driver the trouble of parsing common properties. They do not do any
processing outside of axis swapping or inversion.

Some drivers give the appearance of scaling by writing max_x/y back
to resolution registers in the hardware, if they are available. The
ili210x driver does not appear to do this.

Kind regards,
Jeff LaBundy

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-29  0:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-28  8:52 touchscreen event not rescaling to display resolution Liberado, Selso
2022-03-29  0:42 ` Jeff LaBundy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.