File tree Expand file tree Collapse file tree 3 files changed +4
-22
lines changed Expand file tree Collapse file tree 3 files changed +4
-22
lines changed Original file line number Diff line number Diff line change @@ -733,23 +733,6 @@ void xe_device_assert_mem_access(struct xe_device *xe)
733
733
xe_assert (xe , !xe_pm_runtime_suspended (xe ));
734
734
}
735
735
736
- bool xe_device_mem_access_get_if_ongoing (struct xe_device * xe )
737
- {
738
- bool active ;
739
-
740
- if (xe_pm_read_callback_task (xe ) == current )
741
- return true;
742
-
743
- active = xe_pm_runtime_get_if_active (xe );
744
- if (active ) {
745
- int ref = atomic_inc_return (& xe -> mem_access .ref );
746
-
747
- xe_assert (xe , ref != S32_MAX );
748
- }
749
-
750
- return active ;
751
- }
752
-
753
736
void xe_device_mem_access_get (struct xe_device * xe )
754
737
{
755
738
int ref ;
Original file line number Diff line number Diff line change @@ -134,7 +134,6 @@ static inline struct xe_force_wake *gt_to_fw(struct xe_gt *gt)
134
134
}
135
135
136
136
void xe_device_mem_access_get (struct xe_device * xe );
137
- bool xe_device_mem_access_get_if_ongoing (struct xe_device * xe );
138
137
void xe_device_mem_access_put (struct xe_device * xe );
139
138
140
139
void xe_device_assert_mem_access (struct xe_device * xe );
Original file line number Diff line number Diff line change @@ -1210,7 +1210,7 @@ void xe_guc_ct_fast_path(struct xe_guc_ct *ct)
1210
1210
bool ongoing ;
1211
1211
int len ;
1212
1212
1213
- ongoing = xe_device_mem_access_get_if_ongoing (ct_to_xe (ct ));
1213
+ ongoing = xe_pm_runtime_get_if_active (ct_to_xe (ct ));
1214
1214
if (!ongoing && xe_pm_read_callback_task (ct_to_xe (ct )) == NULL )
1215
1215
return ;
1216
1216
@@ -1223,7 +1223,7 @@ void xe_guc_ct_fast_path(struct xe_guc_ct *ct)
1223
1223
spin_unlock (& ct -> fast_lock );
1224
1224
1225
1225
if (ongoing )
1226
- xe_device_mem_access_put (xe );
1226
+ xe_pm_runtime_put (xe );
1227
1227
}
1228
1228
1229
1229
/* Returns less than zero on error, 0 on done, 1 on more available */
@@ -1281,7 +1281,7 @@ static void g2h_worker_func(struct work_struct *w)
1281
1281
* responses, if the worker here is blocked on those callbacks
1282
1282
* completing, creating a deadlock.
1283
1283
*/
1284
- ongoing = xe_device_mem_access_get_if_ongoing (ct_to_xe (ct ));
1284
+ ongoing = xe_pm_runtime_get_if_active (ct_to_xe (ct ));
1285
1285
if (!ongoing && xe_pm_read_callback_task (ct_to_xe (ct )) == NULL )
1286
1286
return ;
1287
1287
@@ -1299,7 +1299,7 @@ static void g2h_worker_func(struct work_struct *w)
1299
1299
} while (ret == 1 );
1300
1300
1301
1301
if (ongoing )
1302
- xe_device_mem_access_put (ct_to_xe (ct ));
1302
+ xe_pm_runtime_put (ct_to_xe (ct ));
1303
1303
}
1304
1304
1305
1305
static void guc_ctb_snapshot_capture (struct xe_device * xe , struct guc_ctb * ctb ,
You can’t perform that action at this time.
0 commit comments