From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH 2/8] drm/i915/lvds: Use intel_de_rmw()
Date: Mon, 30 Jan 2023 20:05:34 +0200 [thread overview]
Message-ID: <20230130180540.8972-3-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20230130180540.8972-1-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Replace the hand rolled rmw stuff with intel_de_rmw().
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_lvds.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_lvds.c b/drivers/gpu/drm/i915/display/intel_lvds.c
index 49b6cddeb67e..86a100eabd0d 100644
--- a/drivers/gpu/drm/i915/display/intel_lvds.c
+++ b/drivers/gpu/drm/i915/display/intel_lvds.c
@@ -320,11 +320,9 @@ static void intel_enable_lvds(struct intel_atomic_state *state,
struct intel_lvds_encoder *lvds_encoder = to_lvds_encoder(encoder);
struct drm_i915_private *dev_priv = to_i915(dev);
- intel_de_write(dev_priv, lvds_encoder->reg,
- intel_de_read(dev_priv, lvds_encoder->reg) | LVDS_PORT_EN);
+ intel_de_rmw(dev_priv, lvds_encoder->reg, 0, LVDS_PORT_EN);
- intel_de_write(dev_priv, PP_CONTROL(0),
- intel_de_read(dev_priv, PP_CONTROL(0)) | PANEL_POWER_ON);
+ intel_de_rmw(dev_priv, PP_CONTROL(0), 0, PANEL_POWER_ON);
intel_de_posting_read(dev_priv, lvds_encoder->reg);
if (intel_de_wait_for_set(dev_priv, PP_STATUS(0), PP_ON, 5000))
@@ -342,14 +340,12 @@ static void intel_disable_lvds(struct intel_atomic_state *state,
struct intel_lvds_encoder *lvds_encoder = to_lvds_encoder(encoder);
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
- intel_de_write(dev_priv, PP_CONTROL(0),
- intel_de_read(dev_priv, PP_CONTROL(0)) & ~PANEL_POWER_ON);
+ intel_de_rmw(dev_priv, PP_CONTROL(0), PANEL_POWER_ON, 0);
if (intel_de_wait_for_clear(dev_priv, PP_STATUS(0), PP_ON, 1000))
drm_err(&dev_priv->drm,
"timed out waiting for panel to power off\n");
- intel_de_write(dev_priv, lvds_encoder->reg,
- intel_de_read(dev_priv, lvds_encoder->reg) & ~LVDS_PORT_EN);
+ intel_de_rmw(dev_priv, lvds_encoder->reg, LVDS_PORT_EN, 0);
intel_de_posting_read(dev_priv, lvds_encoder->reg);
}
--
2.39.1
next prev parent reply other threads:[~2023-01-30 18:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-30 18:05 [Intel-gfx] [PATCH 0/8] drm/i915: LVDS cleanup Ville Syrjala
2023-01-30 18:05 ` [Intel-gfx] [PATCH 1/8] drm/i915/lvds: Split long lines Ville Syrjala
2023-01-30 18:05 ` Ville Syrjala [this message]
2023-01-30 18:05 ` [Intel-gfx] [PATCH 3/8] drm/i915/lvds: Use REG_BIT() & co Ville Syrjala
2023-01-30 18:05 ` [Intel-gfx] [PATCH 4/8] drm/i915/lvds: Extract intel_lvds_regs.h Ville Syrjala
2023-01-30 18:05 ` [Intel-gfx] [PATCH 5/8] drm/i915/lvds: Fix whitespace Ville Syrjala
2023-01-30 18:05 ` [Intel-gfx] [PATCH 6/8] drm/i915/lvds: s/dev_priv/i915/ Ville Syrjala
2023-01-30 18:05 ` [Intel-gfx] [PATCH 7/8] drm/i915/lvds: s/intel_encoder/encoder/ etc Ville Syrjala
2023-01-30 18:05 ` [Intel-gfx] [PATCH 8/8] drm/i915/lvds: s/pipe_config/crtc_state/ Ville Syrjala
2023-01-30 20:12 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: LVDS cleanup Patchwork
2023-01-30 20:24 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-01-31 3:42 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-01-31 7:22 ` [Intel-gfx] [PATCH 0/8] " Jani Nikula
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=20230130180540.8972-3-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@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