linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff LaBundy <jeff@labundy.com>
To: "Liberado, Selso" <selso.liberado@guerbet.com>
Cc: "linux-input@vger.kernel.org" <linux-input@vger.kernel.org>
Subject: Re: touchscreen event not rescaling to display resolution
Date: Mon, 28 Mar 2022 19:42:25 -0500	[thread overview]
Message-ID: <20220329004225.GA64746@nixie71> (raw)
In-Reply-To: <DU0PR01MB8928F41059ACB5940834D60D911D9@DU0PR01MB8928.eurprd01.prod.exchangelabs.com>

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

      reply	other threads:[~2022-03-29  0:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-28  8:52 touchscreen event not rescaling to display resolution Liberado, Selso
2022-03-29  0:42 ` Jeff LaBundy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220329004225.GA64746@nixie71 \
    --to=jeff@labundy.com \
    --cc=linux-input@vger.kernel.org \
    --cc=selso.liberado@guerbet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).