mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 04:42:04 -04:00
Merge "msm: kgsl: Use non-atomic snapshot memory if it is unused"
This commit is contained in:
commit
fbb7d8a475
1 changed files with 11 additions and 6 deletions
|
|
@ -687,13 +687,18 @@ static void kgsl_device_snapshot_atomic(struct kgsl_device *device)
|
|||
}
|
||||
|
||||
device->snapshot_memory_atomic.size = device->snapshot_memory.size;
|
||||
device->snapshot_memory_atomic.ptr = devm_kzalloc(&device->pdev->dev,
|
||||
device->snapshot_memory_atomic.size, GFP_ATOMIC);
|
||||
if (!device->snapshot_faultcount) {
|
||||
/* Use non-atomic snapshot memory if it is unused */
|
||||
device->snapshot_memory_atomic.ptr = device->snapshot_memory.ptr;
|
||||
} else {
|
||||
device->snapshot_memory_atomic.ptr = devm_kzalloc(&device->pdev->dev,
|
||||
device->snapshot_memory_atomic.size, GFP_ATOMIC);
|
||||
|
||||
if (!device->snapshot_memory_atomic.ptr) {
|
||||
dev_err(device->dev,
|
||||
"KGSL failed to allocate memory for atomic snapshot\n");
|
||||
return;
|
||||
if (!device->snapshot_memory_atomic.ptr) {
|
||||
dev_err(device->dev,
|
||||
"KGSL failed to allocate memory for atomic snapshot\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* Allocate memory for the snapshot instance */
|
||||
|
|
|
|||
Loading…
Reference in a new issue