]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm/dpu: Remove dpu_mdss_isr when dpu_mdss_destroy is called
authorJordan Crouse <jcrouse@codeaurora.org>
Tue, 28 Aug 2018 21:23:04 +0000 (15:23 -0600)
committerRob Clark <robdclark@gmail.com>
Thu, 4 Oct 2018 00:24:50 +0000 (20:24 -0400)
commit92bfc309f7f0296be05f1c4c093971a5e942c719
tree1e011c86691eb714aff4d7bb574c2132b3e4de72
parentfe8865d6723bd42da440ff564a1359918948caa5
drm/msm/dpu: Remove dpu_mdss_isr when dpu_mdss_destroy is called

The MDSS device is created before the MSM driver attempts to bind the
sub components. If any of the components return -EPROBE_DEFER the MDSS
device is destroyed and tried again later.

If this happens the dpu_mdss_isr interrupt created from the DPU MDSS
is not freed when the MDSS device is destroyed and has a risk of
triggering later and hitting a fault by accessing a mmio region that
no longer exists. Even if the interrupt isn't triggered by
accident when the device attempts to reprobe it would error out
when it tries to re-register the interrupt so unconditionally removing
it in the destroy is the right move.

Switch the device managed dpu_mdss_isr to be unmanaged and add a
free_irq() in the mdss destroy function.

Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c