2020-11-04 08:20:50

by Andre Muller

[permalink] [raw]
Subject: [Regression]: Commit 74d905d2 breaks the touchpad and touchscreen of Google Chromebook "samus"

Hi,

commit 74d905d2: Input: atmel_mxt_ts - only read messages in
mxt_acquire_irq() when necessary

breaks the touchpad and touchscreen of the 2015 Chromebook Pixel "Samus".

Reverting the commit from the current git tree gets them to work again.

I am not at all shure what info to include, but I will happily provide
it on request.

The dmesgs of a boot with commit 74d905d2 show "Enabling RETRIGEN
workaround", but otherwise looks the same as a boot without.

Here is the relevant bit (with 74d905d2):

atmel_mxt_ts i2c-ATML0000:01: Family: 164 Variant: 17 Firmware V1.0.AA
Objects: 32
atmel_mxt_ts i2c-ATML0000:01: Enabling RETRIGEN workaround
atmel_mxt_ts i2c-ATML0000:01: Direct firmware load for maxtouch.cfg
failed with error -2
atmel_mxt_ts i2c-ATML0000:01: Touchscreen size X960Y540
input: Atmel maXTouch Touchpad as
/devices/pci0000:00/INT3432:00/i2c-0/i2c-ATML0000:01/input/input4
atmel_mxt_ts i2c-ATML0001:01: Family: 164 Variant: 13 Firmware V1.0.AA
Objects: 41
atmel_mxt_ts i2c-ATML0001:01: Enabling RETRIGEN workaround
atmel_mxt_ts i2c-ATML0001:01: Direct firmware load for maxtouch.cfg
failed with error -2

Thank you,
Andre M?ller


2020-11-05 13:28:57

by Jiada Wang

[permalink] [raw]
Subject: Re: [Regression]: Commit 74d905d2 breaks the touchpad and touchscreen of Google Chromebook "samus"

Hi Andre

Thanks for your report,
could you also please post the log when with this commit reverted?

Thanks,
Jiada

On 2020/11/04 17:13, Andre wrote:
> Hi,
>
> commit 74d905d2: Input: atmel_mxt_ts - only read messages in
> mxt_acquire_irq() when necessary
>
> breaks the touchpad and touchscreen of the 2015 Chromebook Pixel "Samus".
>
> Reverting the commit from the current git tree gets them to work again.
>
> I am not at all shure what info to include, but I will happily provide
> it on request.
>
> The dmesgs of a boot with commit 74d905d2 show "Enabling RETRIGEN
> workaround", but otherwise looks the same as a boot without.
>
> Here is the relevant bit (with 74d905d2):
>
> atmel_mxt_ts i2c-ATML0000:01: Family: 164 Variant: 17 Firmware V1.0.AA
> Objects: 32
> atmel_mxt_ts i2c-ATML0000:01: Enabling RETRIGEN workaround
> atmel_mxt_ts i2c-ATML0000:01: Direct firmware load for maxtouch.cfg
> failed with error -2
> atmel_mxt_ts i2c-ATML0000:01: Touchscreen size X960Y540
> input: Atmel maXTouch Touchpad as
> /devices/pci0000:00/INT3432:00/i2c-0/i2c-ATML0000:01/input/input4
> atmel_mxt_ts i2c-ATML0001:01: Family: 164 Variant: 13 Firmware V1.0.AA
> Objects: 41
> atmel_mxt_ts i2c-ATML0001:01: Enabling RETRIGEN workaround
> atmel_mxt_ts i2c-ATML0001:01: Direct firmware load for maxtouch.cfg
> failed with error -2
>
> Thank you,
> Andre M?ller

2020-11-05 14:25:59

by Andre Muller

[permalink] [raw]
Subject: Re: [Regression]: Commit 74d905d2 breaks the touchpad and touchscreen of Google Chromebook "samus"

On 05/11/2020 14.25, Wang, Jiada wrote:
> Hi Andre
>
> Thanks for your report,
> could you also please post the log when with this commit reverted?
>
> Thanks,
> Jiada

Shure!
The full dmesg with the revert is attached.

The atmel_mxt bits are:

[ 0.195879] atmel_mxt_ts i2c-ATML0000:01: Family: 164 Variant: 17 Firmware V1.0.AA Objects: 32
[ 0.211712] atmel_mxt_ts i2c-ATML0000:01: Direct firmware load for maxtouch.cfg failed with error -2
[ 0.212986] atmel_mxt_ts i2c-ATML0000:01: Touchscreen size X960Y540
[ 0.213025] input: Atmel maXTouch Touchpad as /devices/pci0000:00/INT3432:00/i2c-0/i2c-ATML0000:01/input/input4
[ 0.219208] atmel_mxt_ts i2c-ATML0001:01: Family: 164 Variant: 13 Firmware V1.0.AA Objects: 41
[ 0.238825] atmel_mxt_ts i2c-ATML0001:01: Direct firmware load for maxtouch.cfg failed with error -2
[ 0.238949] intel_rapl_common: Found RAPL domain package
[ 0.238955] intel_rapl_common: Found RAPL domain core
[ 0.238961] intel_rapl_common: Found RAPL domain uncore
[ 0.238966] intel_rapl_common: Found RAPL domain dram
[ 0.240121] atmel_mxt_ts i2c-ATML0001:01: Touchscreen size X2559Y1699
[ 0.240157] input: Atmel maXTouch Touchscreen as /devices/pci0000:00/INT3433:00/i2c-1/i2c-ATML0001:01/input/input5

Regards,
Andre

>
> On 2020/11/04 17:13, Andre wrote:
>> Hi,
>>
>> commit 74d905d2: Input: atmel_mxt_ts - only read messages in
>> mxt_acquire_irq() when necessary
>>
>> breaks the touchpad and touchscreen of the 2015 Chromebook Pixel "Samus".
>>
>> Reverting the commit from the current git tree gets them to work again.
>>
>> I am not at all shure what info to include, but I will happily provide
>> it on request.
>>
>> The dmesgs of a boot with commit 74d905d2 show "Enabling RETRIGEN
>> workaround", but otherwise looks the same as a boot without.
>>
>> Here is the relevant bit (with 74d905d2):
>>
>> atmel_mxt_ts i2c-ATML0000:01: Family: 164 Variant: 17 Firmware V1.0.AA
>> Objects: 32
>> atmel_mxt_ts i2c-ATML0000:01: Enabling RETRIGEN workaround
>> atmel_mxt_ts i2c-ATML0000:01: Direct firmware load for maxtouch.cfg
>> failed with error -2
>> atmel_mxt_ts i2c-ATML0000:01: Touchscreen size X960Y540
>> input: Atmel maXTouch Touchpad as
>> /devices/pci0000:00/INT3432:00/i2c-0/i2c-ATML0000:01/input/input4
>> atmel_mxt_ts i2c-ATML0001:01: Family: 164 Variant: 13 Firmware V1.0.AA
>> Objects: 41
>> atmel_mxt_ts i2c-ATML0001:01: Enabling RETRIGEN workaround
>> atmel_mxt_ts i2c-ATML0001:01: Direct firmware load for maxtouch.cfg
>> failed with error -2
>>
>> Thank you,
>> Andre M?ller


Attachments:
dmesg-5.10_without_74d905d2d (34.52 kB)

2020-11-24 00:43:37

by Linus Walleij

[permalink] [raw]
Subject: Re: [Regression]: Commit 74d905d2 breaks the touchpad and touchscreen of Google Chromebook "samus"

On Wed, Nov 4, 2020 at 9:18 AM Andre <[email protected]> wrote:

> commit 74d905d2: Input: atmel_mxt_ts - only read messages in
> mxt_acquire_irq() when necessary
>
> breaks the touchpad and touchscreen of the 2015 Chromebook Pixel "Samus".

This commit also breaks the touchscreen on the Samsung GT-I9070
mobile phone. All interrupts stop appearing. If I revert the patch
I get interrupts.

dmesg after this commit:

$ dmesg |grep mxt
[ 1.967816] atmel_mxt_ts 3-004a: Family: 129 Variant: 1 Firmware
V1.0.AA Objects: 18
[ 1.975815] atmel_mxt_ts 3-004a: Enabling RETRIGEN workaround
[ 1.982398] atmel_mxt_ts 3-004a: Direct firmware load for
maxtouch.cfg failed with error -2
[ 1.992252] atmel_mxt_ts 3-004a: Touchscreen size X479Y799

dmesg with commit reverted:
$ dmesg |grep mxt
[ 1.967831] atmel_mxt_ts 3-004a: Family: 129 Variant: 1 Firmware
V1.0.AA Objects: 18
[ 1.984195] atmel_mxt_ts 3-004a: Direct firmware load for
maxtouch.cfg failed with error -2
[ 2.007399] atmel_mxt_ts 3-004a: Touchscreen size X479Y799

And I get interrupts.

Tell me if I need to test some more approaches.

Yours,
Linus Walleij

2020-11-24 03:45:17

by Jiada Wang

[permalink] [raw]
Subject: Re: [Regression]: Commit 74d905d2 breaks the touchpad and touchscreen of Google Chromebook "samus"

Hello Andre

Thanks for the log,
can you add more debug information like following diff,
and get full log?

diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c
b/drivers/input/touchscreen/atmel_mxt_ts.c
index 98f17fa3a892..60bccd5c42f6 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -1298,21 +1298,29 @@ static int mxt_check_retrigen(struct mxt_data *data)
data->use_retrigen_workaround = false;

irqd = irq_get_irq_data(data->irq);
- if (!irqd)
+ if (!irqd) {
+ dev_warn(&client->dev, "unable to get IRQ data\n");
return -EINVAL;
+ }

- if (irqd_is_level_type(irqd))
+ if (irqd_is_level_type(irqd)) {
+ dev_warn(&client->dev, "IRQ is level type\n");
return 0;
+ }

if (data->T18_address) {
error = __mxt_read_reg(client,
data->T18_address + MXT_COMMS_CTRL,
1, &val);
- if (error)
+ if (error) {
+ dev_warn(&client->dev, "failed to read reg:
MXT_COMMS_CTRL\n");
return error;
+ }

- if (val & MXT_COMMS_RETRIGEN)
+ if (val & MXT_COMMS_RETRIGEN) {
+ dev_warn(&client->dev, "RETRIGEN feature
available\n");
return 0;
+ }
}

dev_warn(&client->dev, "Enabling RETRIGEN workaround\n");


Thanks,
Jiada

On 2020/11/05 23:23, Andre Muller wrote:
> On 05/11/2020 14.25, Wang, Jiada wrote:
>> Hi Andre
>>
>> Thanks for your report,
>> could you also please post the log when with this commit reverted?
>>
>> Thanks,
>> Jiada
>
> Shure!
> The full dmesg with the revert is attached.
>
> The atmel_mxt bits are:
>
> [??? 0.195879] atmel_mxt_ts i2c-ATML0000:01: Family: 164 Variant: 17
> Firmware V1.0.AA Objects: 32
> [??? 0.211712] atmel_mxt_ts i2c-ATML0000:01: Direct firmware load for
> maxtouch.cfg failed with error -2
> [??? 0.212986] atmel_mxt_ts i2c-ATML0000:01: Touchscreen size X960Y540
> [??? 0.213025] input: Atmel maXTouch Touchpad as
> /devices/pci0000:00/INT3432:00/i2c-0/i2c-ATML0000:01/input/input4
> [??? 0.219208] atmel_mxt_ts i2c-ATML0001:01: Family: 164 Variant: 13
> Firmware V1.0.AA Objects: 41
> [??? 0.238825] atmel_mxt_ts i2c-ATML0001:01: Direct firmware load for
> maxtouch.cfg failed with error -2
> [??? 0.238949] intel_rapl_common: Found RAPL domain package
> [??? 0.238955] intel_rapl_common: Found RAPL domain core
> [??? 0.238961] intel_rapl_common: Found RAPL domain uncore
> [??? 0.238966] intel_rapl_common: Found RAPL domain dram
> [??? 0.240121] atmel_mxt_ts i2c-ATML0001:01: Touchscreen size X2559Y1699
> [??? 0.240157] input: Atmel maXTouch Touchscreen as
> /devices/pci0000:00/INT3433:00/i2c-1/i2c-ATML0001:01/input/input5
>
> Regards,
> Andre
>
>>
>> On 2020/11/04 17:13, Andre wrote:
>>> Hi,
>>>
>>> commit 74d905d2: Input: atmel_mxt_ts - only read messages in
>>> mxt_acquire_irq() when necessary
>>>
>>> breaks the touchpad and touchscreen of the 2015 Chromebook Pixel
>>> "Samus".
>>>
>>> Reverting the commit from the current git tree gets them to work again.
>>>
>>> I am not at all shure what info to include, but I will happily provide
>>> it on request.
>>>
>>> The dmesgs of a boot with commit 74d905d2 show "Enabling RETRIGEN
>>> workaround", but otherwise looks the same as a boot without.
>>>
>>> Here is the relevant bit (with 74d905d2):
>>>
>>> atmel_mxt_ts i2c-ATML0000:01: Family: 164 Variant: 17 Firmware V1.0.AA
>>> Objects: 32
>>> atmel_mxt_ts i2c-ATML0000:01: Enabling RETRIGEN workaround
>>> atmel_mxt_ts i2c-ATML0000:01: Direct firmware load for maxtouch.cfg
>>> failed with error -2
>>> atmel_mxt_ts i2c-ATML0000:01: Touchscreen size X960Y540
>>> input: Atmel maXTouch Touchpad as
>>> /devices/pci0000:00/INT3432:00/i2c-0/i2c-ATML0000:01/input/input4
>>> atmel_mxt_ts i2c-ATML0001:01: Family: 164 Variant: 13 Firmware V1.0.AA
>>> Objects: 41
>>> atmel_mxt_ts i2c-ATML0001:01: Enabling RETRIGEN workaround
>>> atmel_mxt_ts i2c-ATML0001:01: Direct firmware load for maxtouch.cfg
>>> failed with error -2
>>>
>>> Thank you,
>>> Andre M?ller
>

2020-11-24 06:17:14

by Andre Muller

[permalink] [raw]
Subject: Re: [Regression]: Commit 74d905d2 breaks the touchpad and touchscreen of Google Chromebook "samus"

On 24/11/2020 04.02, Wang, Jiada wrote:
> Hello Andre
>
> Thanks for the log,
> can you add more debug information like following diff,
> and get full log?

Hi Jiada,

I added the warnings, but none of them triggers.
I double-checked the generated object file, it includes the debug strings.
(Also tested that touchscreen/touchpad don't work, as expected.)

Please find the full log attached.

Thank you,
Andre


>
> diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
> index 98f17fa3a892..60bccd5c42f6 100644
> --- a/drivers/input/touchscreen/atmel_mxt_ts.c
> +++ b/drivers/input/touchscreen/atmel_mxt_ts.c
> @@ -1298,21 +1298,29 @@ static int mxt_check_retrigen(struct mxt_data *data)
> ??????? data->use_retrigen_workaround = false;
>
> ??????? irqd = irq_get_irq_data(data->irq);
> -?????? if (!irqd)
> +?????? if (!irqd) {
> +?????????????? dev_warn(&client->dev, "unable to get IRQ data\n");
> ??????????????? return -EINVAL;
> +?????? }
>
> -?????? if (irqd_is_level_type(irqd))
> +?????? if (irqd_is_level_type(irqd)) {
> +?????????????? dev_warn(&client->dev, "IRQ is level type\n");
> ??????????????? return 0;
> +?????? }
>
> ??????? if (data->T18_address) {
> ??????????????? error = __mxt_read_reg(client,
> ?????????????????????????????????????? data->T18_address + MXT_COMMS_CTRL,
> ?????????????????????????????????????? 1, &val);
> -?????????????? if (error)
> +?????????????? if (error) {
> +?????????????????????? dev_warn(&client->dev, "failed to read reg: MXT_COMMS_CTRL\n");
> ??????????????????????? return error;
> +?????????????? }
>
> -?????????????? if (val & MXT_COMMS_RETRIGEN)
> +?????????????? if (val & MXT_COMMS_RETRIGEN) {
> +?????????????????????? dev_warn(&client->dev, "RETRIGEN feature available\n");
> ??????????????????????? return 0;
> +?????????????? }
> ??????? }
>
> ??????? dev_warn(&client->dev, "Enabling RETRIGEN workaround\n");
>
>
> Thanks,
> Jiada
>
> On 2020/11/05 23:23, Andre Muller wrote:
>> On 05/11/2020 14.25, Wang, Jiada wrote:
>>> Hi Andre
>>>
>>> Thanks for your report,
>>> could you also please post the log when with this commit reverted?
>>>
>>> Thanks,
>>> Jiada
>>
>> Shure!
>> The full dmesg with the revert is attached.
>>
>> The atmel_mxt bits are:
>>
>> [??? 0.195879] atmel_mxt_ts i2c-ATML0000:01: Family: 164 Variant: 17 Firmware V1.0.AA Objects: 32
>> [??? 0.211712] atmel_mxt_ts i2c-ATML0000:01: Direct firmware load for maxtouch.cfg failed with error -2
>> [??? 0.212986] atmel_mxt_ts i2c-ATML0000:01: Touchscreen size X960Y540
>> [??? 0.213025] input: Atmel maXTouch Touchpad as /devices/pci0000:00/INT3432:00/i2c-0/i2c-ATML0000:01/input/input4
>> [??? 0.219208] atmel_mxt_ts i2c-ATML0001:01: Family: 164 Variant: 13 Firmware V1.0.AA Objects: 41
>> [??? 0.238825] atmel_mxt_ts i2c-ATML0001:01: Direct firmware load for maxtouch.cfg failed with error -2
>> [??? 0.238949] intel_rapl_common: Found RAPL domain package
>> [??? 0.238955] intel_rapl_common: Found RAPL domain core
>> [??? 0.238961] intel_rapl_common: Found RAPL domain uncore
>> [??? 0.238966] intel_rapl_common: Found RAPL domain dram
>> [??? 0.240121] atmel_mxt_ts i2c-ATML0001:01: Touchscreen size X2559Y1699
>> [??? 0.240157] input: Atmel maXTouch Touchscreen as /devices/pci0000:00/INT3433:00/i2c-1/i2c-ATML0001:01/input/input5
>>
>> Regards,
>> Andre
>>
>>>
>>> On 2020/11/04 17:13, Andre wrote:
>>>> Hi,
>>>>
>>>> commit 74d905d2: Input: atmel_mxt_ts - only read messages in
>>>> mxt_acquire_irq() when necessary
>>>>
>>>> breaks the touchpad and touchscreen of the 2015 Chromebook Pixel "Samus".
>>>>
>>>> Reverting the commit from the current git tree gets them to work again.
>>>>
>>>> I am not at all shure what info to include, but I will happily provide
>>>> it on request.
>>>>
>>>> The dmesgs of a boot with commit 74d905d2 show "Enabling RETRIGEN
>>>> workaround", but otherwise looks the same as a boot without.
>>>>
>>>> Here is the relevant bit (with 74d905d2):
>>>>
>>>> atmel_mxt_ts i2c-ATML0000:01: Family: 164 Variant: 17 Firmware V1.0.AA
>>>> Objects: 32
>>>> atmel_mxt_ts i2c-ATML0000:01: Enabling RETRIGEN workaround
>>>> atmel_mxt_ts i2c-ATML0000:01: Direct firmware load for maxtouch.cfg
>>>> failed with error -2
>>>> atmel_mxt_ts i2c-ATML0000:01: Touchscreen size X960Y540
>>>> input: Atmel maXTouch Touchpad as
>>>> /devices/pci0000:00/INT3432:00/i2c-0/i2c-ATML0000:01/input/input4
>>>> atmel_mxt_ts i2c-ATML0001:01: Family: 164 Variant: 13 Firmware V1.0.AA
>>>> Objects: 41
>>>> atmel_mxt_ts i2c-ATML0001:01: Enabling RETRIGEN workaround
>>>> atmel_mxt_ts i2c-ATML0001:01: Direct firmware load for maxtouch.cfg
>>>> failed with error -2
>>>>
>>>> Thank you,
>>>> Andre M?ller
>>


Attachments:
dmesg_with_atmel-debug (35.66 kB)

2020-11-24 08:10:48

by Andre Muller

[permalink] [raw]
Subject: Re: [Regression]: Commit 74d905d2 breaks the touchpad and touchscreen of Google Chromebook "samus"

Hi,

just a shot in the dark:

I consulted my notes on the convoluted initial setup of a mainline kernel
for this hardware, and found the Atmel chip needed reprogramming
to start working. The settings are preserved, once set.

I ran "enable-atmel.sh", last in 2017,
from here: https://github.com/raphael/linux-samus/tree/master/scripts/setup/touchpad

I don't see or think this is related to the issue at hand,
but my expertise on this hardware is limited, to put it kindly :)

Thanks,
Andre


On 24/11/2020 07.32, Wang, Jiada wrote:
> Hi Andre
>
> Thanks for the log,
> Hmmm, from the log (also as you have observed)
> Seems "data->use_retrigen_workaround" is true on your device
> so workaround mxt_process_messages_until_invalid() is used.
> which is as same as with the commit reverted,
> I am not sure what caused IRQ get generated.
>
> @dmitry
> I would suggest to revert the commit until we find out the root cause
>
> Thanks,
> Jiada
>
>
> On 2020/11/24 15:15, Andre Muller wrote:
>> On 24/11/2020 04.02, Wang, Jiada wrote:
>>> Hello Andre
>>>
>>> Thanks for the log,
>>> can you add more debug information like following diff,
>>> and get full log?
>>
>> Hi Jiada,
>>
>> I added the warnings, but none of them triggers.
>> I double-checked the generated object file, it includes the debug strings.
>> (Also tested that touchscreen/touchpad don't work, as expected.)
>>
>> Please find the full log attached.
>>
>> Thank you,
>> Andre
>>
>>
>>>
>>> diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
>>> index 98f17fa3a892..60bccd5c42f6 100644
>>> --- a/drivers/input/touchscreen/atmel_mxt_ts.c
>>> +++ b/drivers/input/touchscreen/atmel_mxt_ts.c
>>> @@ -1298,21 +1298,29 @@ static int mxt_check_retrigen(struct mxt_data *data)
>>> ???????? data->use_retrigen_workaround = false;
>>>
>>> ???????? irqd = irq_get_irq_data(data->irq);
>>> -?????? if (!irqd)
>>> +?????? if (!irqd) {
>>> +?????????????? dev_warn(&client->dev, "unable to get IRQ data\n");
>>> ???????????????? return -EINVAL;
>>> +?????? }
>>>
>>> -?????? if (irqd_is_level_type(irqd))
>>> +?????? if (irqd_is_level_type(irqd)) {
>>> +?????????????? dev_warn(&client->dev, "IRQ is level type\n");
>>> ???????????????? return 0;
>>> +?????? }
>>>
>>> ???????? if (data->T18_address) {
>>> ???????????????? error = __mxt_read_reg(client,
>>> ??????????????????????????????????????? data->T18_address + MXT_COMMS_CTRL,
>>> ??????????????????????????????????????? 1, &val);
>>> -?????????????? if (error)
>>> +?????????????? if (error) {
>>> +?????????????????????? dev_warn(&client->dev, "failed to read reg: MXT_COMMS_CTRL\n");
>>> ???????????????????????? return error;
>>> +?????????????? }
>>>
>>> -?????????????? if (val & MXT_COMMS_RETRIGEN)
>>> +?????????????? if (val & MXT_COMMS_RETRIGEN) {
>>> +?????????????????????? dev_warn(&client->dev, "RETRIGEN feature available\n");
>>> ???????????????????????? return 0;
>>> +?????????????? }
>>> ???????? }
>>>
>>> ???????? dev_warn(&client->dev, "Enabling RETRIGEN workaround\n");
>>>
>>>
>>> Thanks,
>>> Jiada
>>>
>>> On 2020/11/05 23:23, Andre Muller wrote:
>>>> On 05/11/2020 14.25, Wang, Jiada wrote:
>>>>> Hi Andre
>>>>>
>>>>> Thanks for your report,
>>>>> could you also please post the log when with this commit reverted?
>>>>>
>>>>> Thanks,
>>>>> Jiada
>>>>
>>>> Shure!
>>>> The full dmesg with the revert is attached.
>>>>
>>>> The atmel_mxt bits are:
>>>>
>>>> [??? 0.195879] atmel_mxt_ts i2c-ATML0000:01: Family: 164 Variant: 17 Firmware V1.0.AA Objects: 32
>>>> [??? 0.211712] atmel_mxt_ts i2c-ATML0000:01: Direct firmware load for maxtouch.cfg failed with error -2
>>>> [??? 0.212986] atmel_mxt_ts i2c-ATML0000:01: Touchscreen size X960Y540
>>>> [??? 0.213025] input: Atmel maXTouch Touchpad as /devices/pci0000:00/INT3432:00/i2c-0/i2c-ATML0000:01/input/input4
>>>> [??? 0.219208] atmel_mxt_ts i2c-ATML0001:01: Family: 164 Variant: 13 Firmware V1.0.AA Objects: 41
>>>> [??? 0.238825] atmel_mxt_ts i2c-ATML0001:01: Direct firmware load for maxtouch.cfg failed with error -2
>>>> [??? 0.238949] intel_rapl_common: Found RAPL domain package
>>>> [??? 0.238955] intel_rapl_common: Found RAPL domain core
>>>> [??? 0.238961] intel_rapl_common: Found RAPL domain uncore
>>>> [??? 0.238966] intel_rapl_common: Found RAPL domain dram
>>>> [??? 0.240121] atmel_mxt_ts i2c-ATML0001:01: Touchscreen size X2559Y1699
>>>> [??? 0.240157] input: Atmel maXTouch Touchscreen as /devices/pci0000:00/INT3433:00/i2c-1/i2c-ATML0001:01/input/input5
>>>>
>>>> Regards,
>>>> Andre
>>>>
>>>>>
>>>>> On 2020/11/04 17:13, Andre wrote:
>>>>>> Hi,
>>>>>>
>>>>>> commit 74d905d2: Input: atmel_mxt_ts - only read messages in
>>>>>> mxt_acquire_irq() when necessary
>>>>>>
>>>>>> breaks the touchpad and touchscreen of the 2015 Chromebook Pixel "Samus".
>>>>>>
>>>>>> Reverting the commit from the current git tree gets them to work again.
>>>>>>
>>>>>> I am not at all shure what info to include, but I will happily provide
>>>>>> it on request.
>>>>>>
>>>>>> The dmesgs of a boot with commit 74d905d2 show "Enabling RETRIGEN
>>>>>> workaround", but otherwise looks the same as a boot without.
>>>>>>
>>>>>> Here is the relevant bit (with 74d905d2):
>>>>>>
>>>>>> atmel_mxt_ts i2c-ATML0000:01: Family: 164 Variant: 17 Firmware V1.0.AA
>>>>>> Objects: 32
>>>>>> atmel_mxt_ts i2c-ATML0000:01: Enabling RETRIGEN workaround
>>>>>> atmel_mxt_ts i2c-ATML0000:01: Direct firmware load for maxtouch.cfg
>>>>>> failed with error -2
>>>>>> atmel_mxt_ts i2c-ATML0000:01: Touchscreen size X960Y540
>>>>>> input: Atmel maXTouch Touchpad as
>>>>>> /devices/pci0000:00/INT3432:00/i2c-0/i2c-ATML0000:01/input/input4
>>>>>> atmel_mxt_ts i2c-ATML0001:01: Family: 164 Variant: 13 Firmware V1.0.AA
>>>>>> Objects: 41
>>>>>> atmel_mxt_ts i2c-ATML0001:01: Enabling RETRIGEN workaround
>>>>>> atmel_mxt_ts i2c-ATML0001:01: Direct firmware load for maxtouch.cfg
>>>>>> failed with error -2
>>>>>>
>>>>>> Thank you,
>>>>>> Andre M?ller
>>>>
>>

2020-11-24 19:51:31

by Jiada Wang

[permalink] [raw]
Subject: Re: [Regression]: Commit 74d905d2 breaks the touchpad and touchscreen of Google Chromebook "samus"

Hi Andre

Thanks for the log,
Hmmm, from the log (also as you have observed)
Seems "data->use_retrigen_workaround" is true on your device
so workaround mxt_process_messages_until_invalid() is used.
which is as same as with the commit reverted,
I am not sure what caused IRQ get generated.

@dmitry
I would suggest to revert the commit until we find out the root cause

Thanks,
Jiada


On 2020/11/24 15:15, Andre Muller wrote:
> On 24/11/2020 04.02, Wang, Jiada wrote:
>> Hello Andre
>>
>> Thanks for the log,
>> can you add more debug information like following diff,
>> and get full log?
>
> Hi Jiada,
>
> I added the warnings, but none of them triggers.
> I double-checked the generated object file, it includes the debug strings.
> (Also tested that touchscreen/touchpad don't work, as expected.)
>
> Please find the full log attached.
>
> Thank you,
> Andre
>
>
>>
>> diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c
>> b/drivers/input/touchscreen/atmel_mxt_ts.c
>> index 98f17fa3a892..60bccd5c42f6 100644
>> --- a/drivers/input/touchscreen/atmel_mxt_ts.c
>> +++ b/drivers/input/touchscreen/atmel_mxt_ts.c
>> @@ -1298,21 +1298,29 @@ static int mxt_check_retrigen(struct mxt_data
>> *data)
>> ???????? data->use_retrigen_workaround = false;
>>
>> ???????? irqd = irq_get_irq_data(data->irq);
>> -?????? if (!irqd)
>> +?????? if (!irqd) {
>> +?????????????? dev_warn(&client->dev, "unable to get IRQ data\n");
>> ???????????????? return -EINVAL;
>> +?????? }
>>
>> -?????? if (irqd_is_level_type(irqd))
>> +?????? if (irqd_is_level_type(irqd)) {
>> +?????????????? dev_warn(&client->dev, "IRQ is level type\n");
>> ???????????????? return 0;
>> +?????? }
>>
>> ???????? if (data->T18_address) {
>> ???????????????? error = __mxt_read_reg(client,
>> ??????????????????????????????????????? data->T18_address +
>> MXT_COMMS_CTRL,
>> ??????????????????????????????????????? 1, &val);
>> -?????????????? if (error)
>> +?????????????? if (error) {
>> +?????????????????????? dev_warn(&client->dev, "failed to read reg:
>> MXT_COMMS_CTRL\n");
>> ???????????????????????? return error;
>> +?????????????? }
>>
>> -?????????????? if (val & MXT_COMMS_RETRIGEN)
>> +?????????????? if (val & MXT_COMMS_RETRIGEN) {
>> +?????????????????????? dev_warn(&client->dev, "RETRIGEN feature
>> available\n");
>> ???????????????????????? return 0;
>> +?????????????? }
>> ???????? }
>>
>> ???????? dev_warn(&client->dev, "Enabling RETRIGEN workaround\n");
>>
>>
>> Thanks,
>> Jiada
>>
>> On 2020/11/05 23:23, Andre Muller wrote:
>>> On 05/11/2020 14.25, Wang, Jiada wrote:
>>>> Hi Andre
>>>>
>>>> Thanks for your report,
>>>> could you also please post the log when with this commit reverted?
>>>>
>>>> Thanks,
>>>> Jiada
>>>
>>> Shure!
>>> The full dmesg with the revert is attached.
>>>
>>> The atmel_mxt bits are:
>>>
>>> [??? 0.195879] atmel_mxt_ts i2c-ATML0000:01: Family: 164 Variant: 17
>>> Firmware V1.0.AA Objects: 32
>>> [??? 0.211712] atmel_mxt_ts i2c-ATML0000:01: Direct firmware load for
>>> maxtouch.cfg failed with error -2
>>> [??? 0.212986] atmel_mxt_ts i2c-ATML0000:01: Touchscreen size X960Y540
>>> [??? 0.213025] input: Atmel maXTouch Touchpad as
>>> /devices/pci0000:00/INT3432:00/i2c-0/i2c-ATML0000:01/input/input4
>>> [??? 0.219208] atmel_mxt_ts i2c-ATML0001:01: Family: 164 Variant: 13
>>> Firmware V1.0.AA Objects: 41
>>> [??? 0.238825] atmel_mxt_ts i2c-ATML0001:01: Direct firmware load for
>>> maxtouch.cfg failed with error -2
>>> [??? 0.238949] intel_rapl_common: Found RAPL domain package
>>> [??? 0.238955] intel_rapl_common: Found RAPL domain core
>>> [??? 0.238961] intel_rapl_common: Found RAPL domain uncore
>>> [??? 0.238966] intel_rapl_common: Found RAPL domain dram
>>> [??? 0.240121] atmel_mxt_ts i2c-ATML0001:01: Touchscreen size X2559Y1699
>>> [??? 0.240157] input: Atmel maXTouch Touchscreen as
>>> /devices/pci0000:00/INT3433:00/i2c-1/i2c-ATML0001:01/input/input5
>>>
>>> Regards,
>>> Andre
>>>
>>>>
>>>> On 2020/11/04 17:13, Andre wrote:
>>>>> Hi,
>>>>>
>>>>> commit 74d905d2: Input: atmel_mxt_ts - only read messages in
>>>>> mxt_acquire_irq() when necessary
>>>>>
>>>>> breaks the touchpad and touchscreen of the 2015 Chromebook Pixel
>>>>> "Samus".
>>>>>
>>>>> Reverting the commit from the current git tree gets them to work
>>>>> again.
>>>>>
>>>>> I am not at all shure what info to include, but I will happily provide
>>>>> it on request.
>>>>>
>>>>> The dmesgs of a boot with commit 74d905d2 show "Enabling RETRIGEN
>>>>> workaround", but otherwise looks the same as a boot without.
>>>>>
>>>>> Here is the relevant bit (with 74d905d2):
>>>>>
>>>>> atmel_mxt_ts i2c-ATML0000:01: Family: 164 Variant: 17 Firmware V1.0.AA
>>>>> Objects: 32
>>>>> atmel_mxt_ts i2c-ATML0000:01: Enabling RETRIGEN workaround
>>>>> atmel_mxt_ts i2c-ATML0000:01: Direct firmware load for maxtouch.cfg
>>>>> failed with error -2
>>>>> atmel_mxt_ts i2c-ATML0000:01: Touchscreen size X960Y540
>>>>> input: Atmel maXTouch Touchpad as
>>>>> /devices/pci0000:00/INT3432:00/i2c-0/i2c-ATML0000:01/input/input4
>>>>> atmel_mxt_ts i2c-ATML0001:01: Family: 164 Variant: 13 Firmware V1.0.AA
>>>>> Objects: 41
>>>>> atmel_mxt_ts i2c-ATML0001:01: Enabling RETRIGEN workaround
>>>>> atmel_mxt_ts i2c-ATML0001:01: Direct firmware load for maxtouch.cfg
>>>>> failed with error -2
>>>>>
>>>>> Thank you,
>>>>> Andre M?ller
>>>
>

2020-11-28 21:54:42

by Linus Walleij

[permalink] [raw]
Subject: Re: [Regression]: Commit 74d905d2 breaks the touchpad and touchscreen of Google Chromebook "samus"

On Tue, Nov 24, 2020 at 12:27 AM Linus Walleij <[email protected]> wrote:

> This commit also breaks the touchscreen on the Samsung GT-I9070
> mobile phone. All interrupts stop appearing. If I revert the patch
> I get interrupts.

I found the bug, I think.
I sent a patch.

Yours,
Linus Walleij