diff options
author | Luca Coelho <[email protected]> | 2023-12-01 12:00:32 +0200 |
---|---|---|
committer | Jouni Högander <[email protected]> | 2023-12-07 12:07:58 +0200 |
commit | dcdf1bbe82f4b2a301a3692a0b1942c3fda70644 (patch) | |
tree | 421880bd20562ea3ad9ee41085eba1abbc8551cf /scripts/generate_rust_analyzer.py | |
parent | 01a39f1c4f1220a4e6a25729fae87ff5794cbc52 (diff) |
drm/i915: handle uncore spinlock when not available
The uncore code may not always be available (e.g. when we build the
display code with Xe), so we can't always rely on having the uncore's
spinlock.
To handle this, split the spin_lock/unlock_irqsave/restore() into
spin_lock/unlock() followed by a call to local_irq_save/restore() and
create wrapper functions for locking and unlocking the uncore's
spinlock. In these functions, we have a condition check and only
actually try to lock/unlock the spinlock when I915 is defined, and
thus uncore is available.
This keeps the ifdefs contained in these new functions and all such
logic inside the display code.
Cc: Tvrtko Ursulin <[email protected]>
Cc: Jani Nikula <[email protected]>
Cc: Ville Syrjala <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
Reviewed-by: Jouni Högander <[email protected]>
Signed-off-by: Jouni Högander <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions