Skip to content

Commit 09c2217

Browse files
committed
drm/asahi: Lock class fixups
Signed-off-by: Asahi Lina <[email protected]>
1 parent 317f610 commit 09c2217

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

drivers/gpu/drm/asahi/alloc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ pub(crate) struct HeapAllocator {
692692
name: CString,
693693
}
694694

695-
static LOCK_KEY: LockClassKey = LockClassKey::new();
695+
static LOCK_KEY: LockClassKey = kernel::static_lock_class!();
696696

697697
impl HeapAllocator {
698698
/// Create a new HeapAllocator for a given `Vm` and address range.
@@ -735,7 +735,7 @@ impl HeapAllocator {
735735
end - start + 1,
736736
inner,
737737
c_str!("HeapAllocator"),
738-
&LOCK_KEY,
738+
LOCK_KEY,
739739
)?;
740740

741741
Ok(HeapAllocator {

drivers/gpu/drm/asahi/queue/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ impl ResultWriter {
341341
}
342342

343343
static QUEUE_NAME: &CStr = c_str!("asahi_fence");
344-
static QUEUE_CLASS_KEY: kernel::sync::LockClassKey = kernel::sync::LockClassKey::new();
344+
static QUEUE_CLASS_KEY: kernel::sync::LockClassKey = kernel::static_lock_class!();
345345

346346
#[versions(AGX)]
347347
impl Queue::ver {
@@ -424,7 +424,7 @@ impl Queue::ver {
424424
notifier_list: Arc::try_new(notifier_list)?,
425425
notifier,
426426
id,
427-
fence_ctx: FenceContexts::new(1, QUEUE_NAME, &QUEUE_CLASS_KEY)?,
427+
fence_ctx: FenceContexts::new(1, QUEUE_NAME, QUEUE_CLASS_KEY)?,
428428
#[ver(V >= V13_0B4)]
429429
counter: AtomicU64::new(0),
430430
};

drivers/gpu/drm/asahi/slotalloc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ impl<T: SlotItem> SlotAllocator<T> {
132132
mut data: T::Data,
133133
mut constructor: impl FnMut(&mut T::Data, u32) -> T,
134134
name: &'static CStr,
135-
lock_key1: &'static LockClassKey,
136-
lock_key2: &'static LockClassKey,
135+
lock_key1: LockClassKey,
136+
lock_key2: LockClassKey,
137137
) -> Result<SlotAllocator<T>> {
138138
let mut slots = Vec::try_with_capacity(num_slots as usize)?;
139139

0 commit comments

Comments
 (0)