drm/verisilicon: vs_dc: Fix to disable interrupt on probe
authorHoegeun Kwon <hoegeun.kwon@samsung.com>
Mon, 29 Jan 2024 02:45:44 +0000 (11:45 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Mon, 19 Feb 2024 00:14:01 +0000 (09:14 +0900)
There is a case where interrupt enable is set in decon req before
decon probe is completed. There is a problem that a kernel panic
occurs if an interrupt is executed before the decon is bound. Disable
interrupts before registering interrupts. Also, irq generated when the
interrupt state is disabled is ignored.

Change-Id: I0b611aadf6c16ea8f850eb570f569e7bad792ce1
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
drivers/gpu/drm/verisilicon/vs_dc.c

index 4cf57fc0d71bfadec6bdc21f1c6f28530a7112ca..97d08a113be12cef18d1da855b6cbfbe28a3f81c 100644 (file)
@@ -985,6 +985,8 @@ static irqreturn_t dc_isr(int irq, void *data)
                return IRQ_HANDLED;
 
        ret = dc_hw_get_interrupt(&dc->hw);
+       if (!ret)
+               return IRQ_HANDLED;
 
        for (i = 0; i < dc_info->panel_num; i++)
                drm_crtc_handle_vblank(&dc->crtc[i]->base);
@@ -1163,6 +1165,8 @@ static int dc_probe(struct platform_device *pdev)
                return ret;
        }
 
+       dc_hw_enable_interrupt(&dc->hw, 0);
+
        dc->irq = platform_get_irq(pdev, 0);
 
        /* do not autoenable, will be enabled later */