* [PATCH v2] drm/msm/disp/dpu1: avoid clearing hw interrupts if hw_intr is null during drm uninit
@ 2022-05-02 16:44 ` Vinod Polimera
0 siblings, 0 replies; 6+ messages in thread
From: Vinod Polimera @ 2022-05-02 16:44 UTC (permalink / raw)
To: dri-devel, linux-arm-msm, freedreno, devicetree
Cc: Vinod Polimera, linux-kernel, robdclark, dianders, swboyd,
quic_kalyant, quic_abhinavk, dmitry.baryshkov
If edp modeset init is failed due to panel being not ready and
probe defers during drm bind, avoid clearing irqs and derefernce
hw_intr when hw_intr is null.
BUG: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
Call trace:
dpu_core_irq_uninstall+0x50/0xb0
dpu_irq_uninstall+0x18/0x24
msm_drm_uninit+0xd8/0x16c
msm_drm_bind+0x580/0x5fc
try_to_bring_up_master+0x168/0x1c0
__component_add+0xb4/0x178
component_add+0x1c/0x28
dp_display_probe+0x38c/0x400
platform_probe+0xb0/0xd0
really_probe+0xcc/0x2c8
__driver_probe_device+0xbc/0xe8
driver_probe_device+0x48/0xf0
__device_attach_driver+0xa0/0xc8
bus_for_each_drv+0x8c/0xd8
__device_attach+0xc4/0x150
device_initial_probe+0x1c/0x28
Changes in V2:
- Update commit message and coreect fixes tag.
Fixes: f25f656608e3 ("drm/msm/dpu: merge struct dpu_irq into struct dpu_hw_intr")
Signed-off-by: Vinod Polimera <quic_vpolimer@quicinc.com>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c
index c515b7c..ab28577 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c
@@ -599,6 +599,9 @@ void dpu_core_irq_uninstall(struct dpu_kms *dpu_kms)
{
int i;
+ if (!dpu_kms->hw_intr)
+ return;
+
pm_runtime_get_sync(&dpu_kms->pdev->dev);
for (i = 0; i < dpu_kms->hw_intr->total_irqs; i++)
if (!list_empty(&dpu_kms->hw_intr->irq_cb_tbl[i]))
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2] drm/msm/disp/dpu1: avoid clearing hw interrupts if hw_intr is null during drm uninit
@ 2022-05-02 16:44 ` Vinod Polimera
0 siblings, 0 replies; 6+ messages in thread
From: Vinod Polimera @ 2022-05-02 16:44 UTC (permalink / raw)
To: dri-devel, linux-arm-msm, freedreno, devicetree
Cc: quic_kalyant, quic_abhinavk, dianders, linux-kernel,
dmitry.baryshkov, swboyd, Vinod Polimera
If edp modeset init is failed due to panel being not ready and
probe defers during drm bind, avoid clearing irqs and derefernce
hw_intr when hw_intr is null.
BUG: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
Call trace:
dpu_core_irq_uninstall+0x50/0xb0
dpu_irq_uninstall+0x18/0x24
msm_drm_uninit+0xd8/0x16c
msm_drm_bind+0x580/0x5fc
try_to_bring_up_master+0x168/0x1c0
__component_add+0xb4/0x178
component_add+0x1c/0x28
dp_display_probe+0x38c/0x400
platform_probe+0xb0/0xd0
really_probe+0xcc/0x2c8
__driver_probe_device+0xbc/0xe8
driver_probe_device+0x48/0xf0
__device_attach_driver+0xa0/0xc8
bus_for_each_drv+0x8c/0xd8
__device_attach+0xc4/0x150
device_initial_probe+0x1c/0x28
Changes in V2:
- Update commit message and coreect fixes tag.
Fixes: f25f656608e3 ("drm/msm/dpu: merge struct dpu_irq into struct dpu_hw_intr")
Signed-off-by: Vinod Polimera <quic_vpolimer@quicinc.com>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c
index c515b7c..ab28577 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c
@@ -599,6 +599,9 @@ void dpu_core_irq_uninstall(struct dpu_kms *dpu_kms)
{
int i;
+ if (!dpu_kms->hw_intr)
+ return;
+
pm_runtime_get_sync(&dpu_kms->pdev->dev);
for (i = 0; i < dpu_kms->hw_intr->total_irqs; i++)
if (!list_empty(&dpu_kms->hw_intr->irq_cb_tbl[i]))
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] drm/msm/disp/dpu1: avoid clearing hw interrupts if hw_intr is null during drm uninit
2022-05-02 16:44 ` Vinod Polimera
@ 2022-05-02 17:12 ` Dmitry Baryshkov
-1 siblings, 0 replies; 6+ messages in thread
From: Dmitry Baryshkov @ 2022-05-02 17:12 UTC (permalink / raw)
To: Vinod Polimera, dri-devel, linux-arm-msm, freedreno, devicetree
Cc: linux-kernel, robdclark, dianders, swboyd, quic_kalyant, quic_abhinavk
On 02/05/2022 19:44, Vinod Polimera wrote:
> If edp modeset init is failed due to panel being not ready and
> probe defers during drm bind, avoid clearing irqs and derefernce
> hw_intr when hw_intr is null.
>
> BUG: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
>
> Call trace:
> dpu_core_irq_uninstall+0x50/0xb0
> dpu_irq_uninstall+0x18/0x24
> msm_drm_uninit+0xd8/0x16c
> msm_drm_bind+0x580/0x5fc
> try_to_bring_up_master+0x168/0x1c0
> __component_add+0xb4/0x178
> component_add+0x1c/0x28
> dp_display_probe+0x38c/0x400
> platform_probe+0xb0/0xd0
> really_probe+0xcc/0x2c8
> __driver_probe_device+0xbc/0xe8
> driver_probe_device+0x48/0xf0
> __device_attach_driver+0xa0/0xc8
> bus_for_each_drv+0x8c/0xd8
> __device_attach+0xc4/0x150
> device_initial_probe+0x1c/0x28
>
> Changes in V2:
> - Update commit message and coreect fixes tag.
>
> Fixes: f25f656608e3 ("drm/msm/dpu: merge struct dpu_irq into struct dpu_hw_intr")
> Signed-off-by: Vinod Polimera <quic_vpolimer@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c
> index c515b7c..ab28577 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c
> @@ -599,6 +599,9 @@ void dpu_core_irq_uninstall(struct dpu_kms *dpu_kms)
> {
> int i;
>
> + if (!dpu_kms->hw_intr)
> + return;
> +
> pm_runtime_get_sync(&dpu_kms->pdev->dev);
> for (i = 0; i < dpu_kms->hw_intr->total_irqs; i++)
> if (!list_empty(&dpu_kms->hw_intr->irq_cb_tbl[i]))
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] drm/msm/disp/dpu1: avoid clearing hw interrupts if hw_intr is null during drm uninit
@ 2022-05-02 17:12 ` Dmitry Baryshkov
0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Baryshkov @ 2022-05-02 17:12 UTC (permalink / raw)
To: Vinod Polimera, dri-devel, linux-arm-msm, freedreno, devicetree
Cc: quic_kalyant, dianders, quic_abhinavk, linux-kernel, swboyd
On 02/05/2022 19:44, Vinod Polimera wrote:
> If edp modeset init is failed due to panel being not ready and
> probe defers during drm bind, avoid clearing irqs and derefernce
> hw_intr when hw_intr is null.
>
> BUG: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
>
> Call trace:
> dpu_core_irq_uninstall+0x50/0xb0
> dpu_irq_uninstall+0x18/0x24
> msm_drm_uninit+0xd8/0x16c
> msm_drm_bind+0x580/0x5fc
> try_to_bring_up_master+0x168/0x1c0
> __component_add+0xb4/0x178
> component_add+0x1c/0x28
> dp_display_probe+0x38c/0x400
> platform_probe+0xb0/0xd0
> really_probe+0xcc/0x2c8
> __driver_probe_device+0xbc/0xe8
> driver_probe_device+0x48/0xf0
> __device_attach_driver+0xa0/0xc8
> bus_for_each_drv+0x8c/0xd8
> __device_attach+0xc4/0x150
> device_initial_probe+0x1c/0x28
>
> Changes in V2:
> - Update commit message and coreect fixes tag.
>
> Fixes: f25f656608e3 ("drm/msm/dpu: merge struct dpu_irq into struct dpu_hw_intr")
> Signed-off-by: Vinod Polimera <quic_vpolimer@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c
> index c515b7c..ab28577 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c
> @@ -599,6 +599,9 @@ void dpu_core_irq_uninstall(struct dpu_kms *dpu_kms)
> {
> int i;
>
> + if (!dpu_kms->hw_intr)
> + return;
> +
> pm_runtime_get_sync(&dpu_kms->pdev->dev);
> for (i = 0; i < dpu_kms->hw_intr->total_irqs; i++)
> if (!list_empty(&dpu_kms->hw_intr->irq_cb_tbl[i]))
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] drm/msm/disp/dpu1: avoid clearing hw interrupts if hw_intr is null during drm uninit
2022-05-02 16:44 ` Vinod Polimera
@ 2022-05-02 20:42 ` Stephen Boyd
-1 siblings, 0 replies; 6+ messages in thread
From: Stephen Boyd @ 2022-05-02 20:42 UTC (permalink / raw)
To: Vinod Polimera, devicetree, dri-devel, freedreno, linux-arm-msm
Cc: linux-kernel, robdclark, dianders, quic_kalyant, quic_abhinavk,
dmitry.baryshkov
Quoting Vinod Polimera (2022-05-02 09:44:06)
> If edp modeset init is failed due to panel being not ready and
> probe defers during drm bind, avoid clearing irqs and derefernce
s/derefernce/dereference/
> hw_intr when hw_intr is null.
>
> BUG: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
>
> Call trace:
> dpu_core_irq_uninstall+0x50/0xb0
> dpu_irq_uninstall+0x18/0x24
> msm_drm_uninit+0xd8/0x16c
> msm_drm_bind+0x580/0x5fc
> try_to_bring_up_master+0x168/0x1c0
> __component_add+0xb4/0x178
> component_add+0x1c/0x28
> dp_display_probe+0x38c/0x400
> platform_probe+0xb0/0xd0
> really_probe+0xcc/0x2c8
> __driver_probe_device+0xbc/0xe8
> driver_probe_device+0x48/0xf0
> __device_attach_driver+0xa0/0xc8
> bus_for_each_drv+0x8c/0xd8
> __device_attach+0xc4/0x150
> device_initial_probe+0x1c/0x28
>
> Changes in V2:
> - Update commit message and coreect fixes tag.
>
> Fixes: f25f656608e3 ("drm/msm/dpu: merge struct dpu_irq into struct dpu_hw_intr")
> Signed-off-by: Vinod Polimera <quic_vpolimer@quicinc.com>
> ---
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] drm/msm/disp/dpu1: avoid clearing hw interrupts if hw_intr is null during drm uninit
@ 2022-05-02 20:42 ` Stephen Boyd
0 siblings, 0 replies; 6+ messages in thread
From: Stephen Boyd @ 2022-05-02 20:42 UTC (permalink / raw)
To: Vinod Polimera, devicetree, dri-devel, freedreno, linux-arm-msm
Cc: quic_kalyant, dianders, linux-kernel, quic_abhinavk, dmitry.baryshkov
Quoting Vinod Polimera (2022-05-02 09:44:06)
> If edp modeset init is failed due to panel being not ready and
> probe defers during drm bind, avoid clearing irqs and derefernce
s/derefernce/dereference/
> hw_intr when hw_intr is null.
>
> BUG: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
>
> Call trace:
> dpu_core_irq_uninstall+0x50/0xb0
> dpu_irq_uninstall+0x18/0x24
> msm_drm_uninit+0xd8/0x16c
> msm_drm_bind+0x580/0x5fc
> try_to_bring_up_master+0x168/0x1c0
> __component_add+0xb4/0x178
> component_add+0x1c/0x28
> dp_display_probe+0x38c/0x400
> platform_probe+0xb0/0xd0
> really_probe+0xcc/0x2c8
> __driver_probe_device+0xbc/0xe8
> driver_probe_device+0x48/0xf0
> __device_attach_driver+0xa0/0xc8
> bus_for_each_drv+0x8c/0xd8
> __device_attach+0xc4/0x150
> device_initial_probe+0x1c/0x28
>
> Changes in V2:
> - Update commit message and coreect fixes tag.
>
> Fixes: f25f656608e3 ("drm/msm/dpu: merge struct dpu_irq into struct dpu_hw_intr")
> Signed-off-by: Vinod Polimera <quic_vpolimer@quicinc.com>
> ---
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-05-02 20:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-02 16:44 [PATCH v2] drm/msm/disp/dpu1: avoid clearing hw interrupts if hw_intr is null during drm uninit Vinod Polimera
2022-05-02 16:44 ` Vinod Polimera
2022-05-02 17:12 ` Dmitry Baryshkov
2022-05-02 17:12 ` Dmitry Baryshkov
2022-05-02 20:42 ` Stephen Boyd
2022-05-02 20:42 ` Stephen Boyd
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.