We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 611dc3b commit 400ce61Copy full SHA for 400ce61
1 file changed
rust/kernel/drm/gem/mod.rs
@@ -257,6 +257,20 @@ pub trait BaseObject: IntoGEMObject {
257
// SAFETY: The arguments are valid per the type invariant.
258
Ok(unsafe { bindings::drm_vma_node_offset_addr(&raw mut (*self.as_raw()).vma_node) })
259
}
260
+
261
+ /// Lock the gpuva lock
262
+ fn lock_gpuva(&self) {
263
+ unsafe {
264
+ bindings::mutex_lock(&raw mut (*self.as_raw()).gpuva.lock);
265
+ }
266
267
268
269
+ fn unlock_gpuva(&self) {
270
271
+ bindings::mutex_unlock(&raw mut (*self.as_raw()).gpuva.lock);
272
273
274
275
276
impl<T: IntoGEMObject> BaseObject for T {}
0 commit comments