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 @@ -1435,8 +1435,15 @@ void a6xx_gmu_remove(struct a6xx_gpu *a6xx_gpu)
1435
1435
struct a6xx_gmu * gmu = & a6xx_gpu -> gmu ;
1436
1436
struct platform_device * pdev = to_platform_device (gmu -> dev );
1437
1437
1438
- if (!gmu -> initialized )
1438
+ mutex_lock (& gmu -> lock );
1439
+ if (!gmu -> initialized ) {
1440
+ mutex_unlock (& gmu -> lock );
1439
1441
return ;
1442
+ }
1443
+
1444
+ gmu -> initialized = false;
1445
+
1446
+ mutex_unlock (& gmu -> lock );
1440
1447
1441
1448
pm_runtime_force_suspend (gmu -> dev );
1442
1449
@@ -1466,8 +1473,6 @@ void a6xx_gmu_remove(struct a6xx_gpu *a6xx_gpu)
1466
1473
1467
1474
/* Drop reference taken in of_find_device_by_node */
1468
1475
put_device (gmu -> dev );
1469
-
1470
- gmu -> initialized = false;
1471
1476
}
1472
1477
1473
1478
static int cxpd_notifier_cb (struct notifier_block * nb ,
Original file line number Diff line number Diff line change @@ -2091,9 +2091,7 @@ static void a6xx_destroy(struct msm_gpu *gpu)
2091
2091
2092
2092
a6xx_llc_slices_destroy (a6xx_gpu );
2093
2093
2094
- mutex_lock (& a6xx_gpu -> gmu .lock );
2095
2094
a6xx_gmu_remove (a6xx_gpu );
2096
- mutex_unlock (& a6xx_gpu -> gmu .lock );
2097
2095
2098
2096
adreno_gpu_cleanup (adreno_gpu );
2099
2097
You can’t perform that action at this time.
0 commit comments