From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org
Subject: [PATCH 1/5] drm/i915/gmbus: Stop frobbing with pin direction in .getsda()/.getscl()
Date: Thu, 8 Oct 2026 01:23:10 +0300 [thread overview]
Message-ID: <20261007222314.5714-2-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>
i2c .getscl() and .getsda() are just supposed to report the state
of the pin without changing its state in any way. So nuke the
bogus register writes from there that configure the pin as an
input (ie. tri-state the pin).
Given how i2c works the pin will already be tri-stated when
.getsda()/.getscl() are called so these writes are in fact
redundant. And even if that weren't the case the input bit
does appear to reflect the state of the pin, even when driven
as an output.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_gmbus.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_gmbus.c b/drivers/gpu/drm/i915/display/intel_gmbus.c
index 13bc6ab6b2f6..d23422e12aa4 100644
--- a/drivers/gpu/drm/i915/display/intel_gmbus.c
+++ b/drivers/gpu/drm/i915/display/intel_gmbus.c
@@ -269,10 +269,6 @@ static int get_clock(void *data)
{
struct intel_gmbus *bus = data;
struct intel_display *display = bus->display;
- u32 reserved = get_reserved(bus);
-
- intel_de_write_fw(display, bus->gpio_reg, reserved | GPIO_CLOCK_DIR_MASK);
- intel_de_write_fw(display, bus->gpio_reg, reserved);
return (intel_de_read_fw(display, bus->gpio_reg) & GPIO_CLOCK_VAL_IN) != 0;
}
@@ -281,10 +277,6 @@ static int get_data(void *data)
{
struct intel_gmbus *bus = data;
struct intel_display *display = bus->display;
- u32 reserved = get_reserved(bus);
-
- intel_de_write_fw(display, bus->gpio_reg, reserved | GPIO_DATA_DIR_MASK);
- intel_de_write_fw(display, bus->gpio_reg, reserved);
return (intel_de_read_fw(display, bus->gpio_reg) & GPIO_DATA_VAL_IN) != 0;
}
--
2.55.0
next prev parent reply other threads:[~2026-10-07 22:23 UTC|newest]
Thread overview: 15+ 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 ` Ville Syrjala [this message]
2026-10-08 9:34 ` [PATCH 1/5] drm/i915/gmbus: Stop frobbing with pin direction in .getsda()/.getscl() Sebastian Brzezinka
2026-10-07 22:23 ` [PATCH 2/5] drm/i915/gmbus: Handle the internal pullup disable bits more sensibly Ville Syrjala
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 22:33 ` ✓ CI.KUnit: success for drm/i915/gmbus: Fix PTL+ i2c bit banging Patchwork
2026-10-07 23:36 ` ✓ i915.CI.BAT: " Patchwork
2026-10-07 23:54 ` ✓ Xe.CI.BAT: " Patchwork
2026-10-08 3:36 ` ✓ Xe.CI.FULL: " 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-2-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.