Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org
Subject: [PATCH 2/2] drm/i915/gmbus: Swap locks vs. wakeref in intel_gmbus_output_aksv()
Date: Tue, 21 Apr 2026 00:48:43 +0300	[thread overview]
Message-ID: <20260420214843.17514-3-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20260420214843.17514-1-ville.syrjala@linux.intel.com>

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Normal GMBUS transfers lock the mutexes first, the grab the power
domain wakeref. Do it the same way around for the HDCP stuff,
for consistency.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_gmbus.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_gmbus.c b/drivers/gpu/drm/i915/display/intel_gmbus.c
index 4d0b8c82f6ff..66f1366e74ef 100644
--- a/drivers/gpu/drm/i915/display/intel_gmbus.c
+++ b/drivers/gpu/drm/i915/display/intel_gmbus.c
@@ -833,10 +833,10 @@ int intel_gmbus_output_aksv(struct i2c_adapter *adapter)
 	struct ref_tracker *wakeref;
 	int ret;
 
-	wakeref = intel_display_power_get(display, POWER_DOMAIN_GMBUS);
-
 	adapter->lock_ops->lock_bus(adapter, 0);
 
+	wakeref = intel_display_power_get(display, POWER_DOMAIN_GMBUS);
+
 	/*
 	 * In order to output Aksv to the receiver, use an indexed write to
 	 * pass the i2c command, and tell GMBUS to use the HW-provided value
@@ -844,10 +844,10 @@ int intel_gmbus_output_aksv(struct i2c_adapter *adapter)
 	 */
 	ret = do_gmbus_xfer(adapter, msgs, ARRAY_SIZE(msgs), GMBUS_AKSV_SELECT);
 
+	intel_display_power_put(display, POWER_DOMAIN_GMBUS, wakeref);
+
 	adapter->lock_ops->unlock_bus(adapter, 0);
 
-	intel_display_power_put(display, POWER_DOMAIN_GMBUS, wakeref);
-
 	return ret;
 }
 
-- 
2.52.0


  parent reply	other threads:[~2026-04-20 21:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-20 21:48 [PATCH 0/2] drm/i915/gmbus: Try to fix AUX software timeouts Ville Syrjala
2026-04-20 21:48 ` [PATCH 1/2] drm/i915/gmbus: Lock AUX CH during GMBUS transfers Ville Syrjala
2026-04-20 21:48 ` Ville Syrjala [this message]
2026-04-21  4:17 ` ✗ CI.checkpatch: warning for drm/i915/gmbus: Try to fix AUX software timeouts Patchwork
2026-04-21  4:18 ` ✓ CI.KUnit: success " Patchwork
2026-04-21  5:05 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-21  7:10 ` ✓ Xe.CI.FULL: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260420214843.17514-3-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox