mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
msm: kgsl: Initialize drawctxt active node earlier
gpudev->preemption_context_init() can fail and invoke adreno_drawctxt_detach(). This causes a crash because drawctxt->active_node is not initialized. Change-Id: I201759316cfa5dc831e1987d209c73efb97bb9ee Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
This commit is contained in:
parent
817655d509
commit
c79cda3408
1 changed files with 7 additions and 7 deletions
|
|
@ -401,6 +401,13 @@ adreno_drawctxt_create(struct kgsl_device_private *dev_priv,
|
|||
|
||||
adreno_context_debugfs_init(ADRENO_DEVICE(device), drawctxt);
|
||||
|
||||
if (!test_bit(GMU_DISPATCH, &device->gmu_core.flags)) {
|
||||
/* set the context ringbuffer */
|
||||
drawctxt->rb = adreno_ctx_get_rb(adreno_dev, drawctxt);
|
||||
|
||||
INIT_LIST_HEAD(&drawctxt->active_node);
|
||||
}
|
||||
|
||||
if (gpudev->preemption_context_init) {
|
||||
ret = gpudev->preemption_context_init(&drawctxt->base);
|
||||
if (ret != 0) {
|
||||
|
|
@ -412,13 +419,6 @@ adreno_drawctxt_create(struct kgsl_device_private *dev_priv,
|
|||
/* copy back whatever flags we dediced were valid */
|
||||
*flags = drawctxt->base.flags;
|
||||
|
||||
if (!test_bit(GMU_DISPATCH, &device->gmu_core.flags)) {
|
||||
/* set the context ringbuffer */
|
||||
drawctxt->rb = adreno_ctx_get_rb(adreno_dev, drawctxt);
|
||||
|
||||
INIT_LIST_HEAD(&drawctxt->active_node);
|
||||
}
|
||||
|
||||
return &drawctxt->base;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue