Commit 4ac277cd authored by Jordan Crouse's avatar Jordan Crouse Committed by Rob Clark

drm/msm: Disable interrupts during init

Disable the interrupt during the init sequence to avoid having
interrupts fired for errors and other things that we are not
ready to handle while initializing.
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
parent 89d777a5
...@@ -145,12 +145,16 @@ struct msm_gpu *adreno_load_gpu(struct drm_device *dev) ...@@ -145,12 +145,16 @@ struct msm_gpu *adreno_load_gpu(struct drm_device *dev)
mutex_lock(&dev->struct_mutex); mutex_lock(&dev->struct_mutex);
gpu->funcs->pm_resume(gpu); gpu->funcs->pm_resume(gpu);
mutex_unlock(&dev->struct_mutex); mutex_unlock(&dev->struct_mutex);
disable_irq(gpu->irq);
ret = gpu->funcs->hw_init(gpu); ret = gpu->funcs->hw_init(gpu);
if (ret) { if (ret) {
dev_err(dev->dev, "gpu hw init failed: %d\n", ret); dev_err(dev->dev, "gpu hw init failed: %d\n", ret);
gpu->funcs->destroy(gpu); gpu->funcs->destroy(gpu);
gpu = NULL; gpu = NULL;
} else { } else {
enable_irq(gpu->irq);
/* give inactive pm a chance to kick in: */ /* give inactive pm a chance to kick in: */
msm_gpu_retire(gpu); msm_gpu_retire(gpu);
} }
......
...@@ -129,11 +129,14 @@ void adreno_recover(struct msm_gpu *gpu) ...@@ -129,11 +129,14 @@ void adreno_recover(struct msm_gpu *gpu)
adreno_gpu->memptrs->wptr = 0; adreno_gpu->memptrs->wptr = 0;
gpu->funcs->pm_resume(gpu); gpu->funcs->pm_resume(gpu);
disable_irq(gpu->irq);
ret = gpu->funcs->hw_init(gpu); ret = gpu->funcs->hw_init(gpu);
if (ret) { if (ret) {
dev_err(dev->dev, "gpu hw init failed: %d\n", ret); dev_err(dev->dev, "gpu hw init failed: %d\n", ret);
/* hmm, oh well? */ /* hmm, oh well? */
} }
enable_irq(gpu->irq);
} }
void adreno_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit, void adreno_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment