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