diff options
author | Luca Coelho <luciano.coelho@intel.com> | 2023-12-01 12:00:32 +0200 |
---|---|---|
committer | Jouni Högander <jouni.hogander@intel.com> | 2023-12-07 12:07:58 +0200 |
commit | dcdf1bbe82f4b2a301a3692a0b1942c3fda70644 (patch) | |
tree | 421880bd20562ea3ad9ee41085eba1abbc8551cf /drivers/gpu/drm/imx | |
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 <tvrto.ursulin@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231201100032.1367589-1-luciano.coelho@intel.com
Diffstat (limited to 'drivers/gpu/drm/imx')
0 files changed, 0 insertions, 0 deletions