From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org
Subject: [PATCH 2/5] drm/i915/gmbus: Handle the internal pullup disable bits more sensibly
Date: Thu, 8 Oct 2026 01:23:11 +0300 [thread overview]
Message-ID: <20261007222314.5714-3-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20261007222314.5714-1-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
On gen2/3 platforms the GPIO register bits 5 and 13 are
documented to be either internal pullup disable bits, or
documented as reserved bits that must be preserved by software.
It seems to be that either way we want to preserve their
state always. That is, if they really are pullup disables, then
presumably the firmware has configured them appropriately for us.
So let's always preserve the state of these pins on gen2/3
platforms.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_gmbus.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_gmbus.c b/drivers/gpu/drm/i915/display/intel_gmbus.c
index d23422e12aa4..e808f5c4106b 100644
--- a/drivers/gpu/drm/i915/display/intel_gmbus.c
+++ b/drivers/gpu/drm/i915/display/intel_gmbus.c
@@ -251,11 +251,13 @@ static u32 get_reserved(struct intel_gmbus *bus)
struct intel_display *display = bus->display;
u32 preserve_bits = 0;
- if (display->platform.i830 || display->platform.i845g)
- return 0;
-
- /* On most chips, these bits must be preserved in software. */
- preserve_bits |= GPIO_DATA_PULLUP_DISABLE | GPIO_CLOCK_PULLUP_DISABLE;
+ /*
+ * On gen2/3 these are either internal pullup disables, or
+ * documented as reserved bits that need to be preserved.
+ */
+ if (DISPLAY_VER(display) < 4)
+ preserve_bits |= GPIO_DATA_PULLUP_DISABLE |
+ GPIO_CLOCK_PULLUP_DISABLE;
/* Wa_16025573575: the masks bits need to be preserved through out */
if (intel_display_wa(display, INTEL_DISPLAY_WA_16025573575))
--
2.55.0
next prev parent reply other threads:[~2026-10-07 22:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-07 22:23 [PATCH 0/5] drm/i915/gmbus: Fix PTL+ i2c bit banging Ville Syrjala
2026-10-07 22:23 ` [PATCH 1/5] drm/i915/gmbus: Stop frobbing with pin direction in .getsda()/.getscl() Ville Syrjala
2026-10-08 9:34 ` Sebastian Brzezinka
2026-10-07 22:23 ` Ville Syrjala [this message]
2026-10-07 22:23 ` [PATCH 3/5] drm/i915/gmbus: Reorder the PNV clock gating GPIO w/a Ville Syrjala
2026-10-08 9:49 ` Sebastian Brzezinka
2026-10-07 22:23 ` [PATCH 4/5] drm/i915/gmbus: Fix i2c bit banging for PTL+ Ville Syrjala
2026-10-08 9:48 ` Sebastian Brzezinka
2026-10-07 22:23 ` [PATCH 5/5] drm/i915/gmbus: Remove the INTEL_DISPLAY_WA_16025573575 leftovers Ville Syrjala
2026-10-08 9:48 ` Sebastian Brzezinka
2026-10-07 23:36 ` ✓ i915.CI.BAT: success for drm/i915/gmbus: Fix PTL+ i2c bit banging Patchwork
2026-10-08 8:50 ` ✗ i915.CI.Full: failure " 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=20261007222314.5714-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