File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
drivers/gpu/drm/msm/adreno Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -1454,8 +1454,15 @@ void a6xx_gmu_remove(struct a6xx_gpu *a6xx_gpu)
1454
1454
struct a6xx_gmu * gmu = & a6xx_gpu -> gmu ;
1455
1455
struct platform_device * pdev = to_platform_device (gmu -> dev );
1456
1456
1457
- if (!gmu -> initialized )
1457
+ mutex_lock (& gmu -> lock );
1458
+ if (!gmu -> initialized ) {
1459
+ mutex_unlock (& gmu -> lock );
1458
1460
return ;
1461
+ }
1462
+
1463
+ gmu -> initialized = false;
1464
+
1465
+ mutex_unlock (& gmu -> lock );
1459
1466
1460
1467
pm_runtime_force_suspend (gmu -> dev );
1461
1468
@@ -1485,8 +1492,6 @@ void a6xx_gmu_remove(struct a6xx_gpu *a6xx_gpu)
1485
1492
1486
1493
/* Drop reference taken in of_find_device_by_node */
1487
1494
put_device (gmu -> dev );
1488
-
1489
- gmu -> initialized = false;
1490
1495
}
1491
1496
1492
1497
static int cxpd_notifier_cb (struct notifier_block * nb ,
Original file line number Diff line number Diff line change @@ -2097,9 +2097,7 @@ static void a6xx_destroy(struct msm_gpu *gpu)
2097
2097
2098
2098
a6xx_llc_slices_destroy (a6xx_gpu );
2099
2099
2100
- mutex_lock (& a6xx_gpu -> gmu .lock );
2101
2100
a6xx_gmu_remove (a6xx_gpu );
2102
- mutex_unlock (& a6xx_gpu -> gmu .lock );
2103
2101
2104
2102
adreno_gpu_cleanup (adreno_gpu );
2105
2103
You can’t perform that action at this time.
0 commit comments