Re: touchscreen event not rescaling to display resolution

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux