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