hi Linus,
On 30/09/2020 16:51, Linus Walleij wrote:
On Wed, Sep 30, 2020 at 12:47 PM Nikhil Devshatwar <nikhil.nd@xxxxxx> wrote:
I am getting a kernel crash on K3 j721e common processor board
when HDMI is plugged in. Following is the full log with crash
for NULL pointer derefence
https://pastebin.ubuntu.com/p/wBPS2ymmqR/
Upon inspection, I found that the "irq_find_mapping" call
in the "pca953x_irq_handler" returns 0 and the same is passed
to "handle_nested_irq"
This would typically happen if the driver using an IRQ
from the PCA953x does not properly request it.
Is this caused by this IRQ 504 from your /proc/interrupts:
504: 0 0 4-0021 10 Edge HPD
This seems to be requested directly by the HDMI bridge
and not by the TI display controller.
I look in the k3-am654-base-board.dts in the upstream
kernel and I find this:
&main_i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&main_i2c0_pins_default>;
clock-frequency = <400000>;
pca9555: gpio@21 {
compatible = "nxp,pca9555";
reg = <0x21>;
gpio-controller;
#gpio-cells = <2>;
};
};
This is the GPIO controller used here, right?
I notice the following:
- There are no HDMI bridges using this GPIO controller in
the upstream kernel.
- The PCA9555 here lacks necessary attributes such as
parent IRQ (another GPIO) and the "interrupt-controller"
and "#interrupt-cells".
So this can not be the device tree you are using.
Can you point us to:
- The actual device tree you are booting from?
- The actual bridge that is requesting the HPD IRQ?
- The upstream code for this bridge?
We've just got another similar report, don't know the root cause, but it's not HDMI
There is one i see with this patch
- ret = devm_gpiochip_add_data(&client->dev, &chip->gpio_chip, chip);
[GS] before: GPIO chip fully initialized
+ ret = pca953x_irq_setup(chip, irq_base);
[GS] after: IRQ chip related data initialized and Parent IRQ requested
if (ret)
goto err_exit;
- ret = pca953x_irq_setup(chip, irq_base);
+ ret = devm_gpiochip_add_data(&client->dev, &chip->gpio_chip, chip);
[GS] after: But GPIO chip and IRQ chip are fully initialized only here, so any IRQ before devm_gpiochip_add_data may crash.
if (ret)
goto err_exit;
--
Best regards,
grygorii