AnsweredAssumed Answered

CTP coordinates do not match screen size

Question asked by Dennis Muhlestein on Nov 26, 2019
Latest reply on Dec 12, 2019 by Dennis Muhlestein

Hello,

 

I've added a custom LCD with touch panel to an imx8m processor.  The LCD is 720x1280.  The CTP has the same size.  Both my custom LCD driver and built in touch screen driver (GT911) seem to work properly.  Android boots and I can see the UI properly.

 

However, once in Android, the touch coordinates do not seem to generate touch events in the correct spot.  Vertical coordinates are fairly close if not right but horizontal coordinates are pretty incorrect.  If I touch the right half of the screen, the UI doesn't respond at all.  If I touch the left half, I get touch events on the UI, but they are offset from the location I touch.

 

At the kernel level, I enabled debugging on the touch driver and can see that all touch events are generated properly.  The delivered events have the right x,y coordinates over the entire panel regardless of what the UI is doing.

 

There appears to be a virtual offset being used and I don't know if it's a problem with the display or something else.  Here is a snippet from 

> dumpsys input

 

 

Motion Ranges:

      X: source=0x00001002, min=-778.000, max=1498.000, flat=0.000, fuzz=0.000, resolution=0.000

      Y: source=0x00001002, min=0.000, max=1279.000, flat=0.000, fuzz=0.000, resolution=0.000

      PRESSURE: source=0x00001002, min=0.000, max=1.000, flat=0.000, fuzz=0.000, resolution=0.000

      SIZE: source=0x00001002, min=0.000, max=1.000, flat=0.000, fuzz=0.000, resolution=0.000

      TOUCH_MAJOR: source=0x00001002, min=0.000, max=2612.112, flat=0.000, fuzz=0.000, resolution=0.000

      TOUCH_MINOR: source=0x00001002, min=0.000, max=2612.112, flat=0.000, fuzz=0.000, resolution=0.000

      TOOL_MAJOR: source=0x00001002, min=0.000, max=2612.112, flat=0.000, fuzz=0.000, resolution=0.000

      TOOL_MINOR: source=0x00001002, min=0.000, max=2612.112, flat=0.000, fuzz=0.000, resolution=0.000

    Touch Input Mapper (mode - direct):

      Parameters:

        GestureMode: multi-touch

        DeviceType: touchScreen

        AssociatedDisplay: hasAssociatedDisplay=true, isExternal=false, displayId=''

        OrientationAware: true

      Raw Touch Axes:

        X: min=0, max=720, flat=0, fuzz=0, resolution=0

        Y: min=0, max=1280, flat=0, fuzz=0, resolution=0

 

It's clear the raw touch axes are correct but I don't know why the Motion range is -778 to 1498.  Is this what's causing the issue?  How do I correct this?

 

Thank you for any input.

Outcomes