mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
drm/i915/sbi: move sbi_lock under struct intel_display
With SBI under display, also move sbi_lock to display->sbi.lock. Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/838fa712fc8a691a3f9427e5f4ed551bd1c62c49.1748343520.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
parent
a737ab4a87
commit
9ab17ede10
|
|
@ -538,6 +538,11 @@ struct intel_display {
|
|||
u32 block_time_us;
|
||||
} sagv;
|
||||
|
||||
struct {
|
||||
/* LPT/WPT IOSF sideband protection */
|
||||
struct mutex lock;
|
||||
} sbi;
|
||||
|
||||
struct {
|
||||
/*
|
||||
* DG2: Mask of PHYs that were not calibrated by the firmware
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ static int intel_sbi_rw(struct intel_display *display, u16 reg,
|
|||
struct intel_uncore *uncore = &i915->uncore;
|
||||
u32 cmd;
|
||||
|
||||
lockdep_assert_held(&i915->sbi_lock);
|
||||
lockdep_assert_held(&display->sbi.lock);
|
||||
|
||||
if (intel_wait_for_register_fw(uncore,
|
||||
SBI_CTL_STAT, SBI_BUSY, 0,
|
||||
|
|
@ -59,16 +59,12 @@ static int intel_sbi_rw(struct intel_display *display, u16 reg,
|
|||
|
||||
void intel_sbi_lock(struct intel_display *display)
|
||||
{
|
||||
struct drm_i915_private *i915 = to_i915(display->drm);
|
||||
|
||||
mutex_lock(&i915->sbi_lock);
|
||||
mutex_lock(&display->sbi.lock);
|
||||
}
|
||||
|
||||
void intel_sbi_unlock(struct intel_display *display)
|
||||
{
|
||||
struct drm_i915_private *i915 = to_i915(display->drm);
|
||||
|
||||
mutex_unlock(&i915->sbi_lock);
|
||||
mutex_unlock(&display->sbi.lock);
|
||||
}
|
||||
|
||||
u32 intel_sbi_read(struct intel_display *display, u16 reg,
|
||||
|
|
@ -89,14 +85,10 @@ void intel_sbi_write(struct intel_display *display, u16 reg, u32 value,
|
|||
|
||||
void intel_sbi_init(struct intel_display *display)
|
||||
{
|
||||
struct drm_i915_private *i915 = to_i915(display->drm);
|
||||
|
||||
mutex_init(&i915->sbi_lock);
|
||||
mutex_init(&display->sbi.lock);
|
||||
}
|
||||
|
||||
void intel_sbi_fini(struct intel_display *display)
|
||||
{
|
||||
struct drm_i915_private *i915 = to_i915(display->drm);
|
||||
|
||||
mutex_destroy(&i915->sbi_lock);
|
||||
mutex_destroy(&display->sbi.lock);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -223,9 +223,6 @@ struct drm_i915_private {
|
|||
|
||||
bool irqs_enabled;
|
||||
|
||||
/* LPT/WPT IOSF sideband protection */
|
||||
struct mutex sbi_lock;
|
||||
|
||||
/* VLV/CHV IOSF sideband */
|
||||
struct {
|
||||
struct mutex lock; /* protect sideband access */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user