From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [Intel-gfx] [PATCH 5/5] drm/i915/ipc: use intel_uncore_rmw() to enable/disable
Date: Mon, 12 Sep 2022 14:45:16 +0300 [thread overview]
Message-ID: <113a17cd18401b0e4c83396575b67aa6efb07346.1662983005.git.jani.nikula@intel.com> (raw)
In-Reply-To: <cover.1662983005.git.jani.nikula@intel.com>
Don't duplicate the rmw function.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/display/skl_watermark.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c b/drivers/gpu/drm/i915/display/skl_watermark.c
index ab7fc41d325a..c70d811163f6 100644
--- a/drivers/gpu/drm/i915/display/skl_watermark.c
+++ b/drivers/gpu/drm/i915/display/skl_watermark.c
@@ -3121,19 +3121,11 @@ bool skl_watermark_ipc_enabled(struct drm_i915_private *i915)
void skl_watermark_ipc_update(struct drm_i915_private *i915)
{
- u32 val;
-
if (!HAS_IPC(i915))
return;
- val = intel_uncore_read(&i915->uncore, DISP_ARB_CTL2);
-
- if (skl_watermark_ipc_enabled(i915))
- val |= DISP_IPC_ENABLE;
- else
- val &= ~DISP_IPC_ENABLE;
-
- intel_uncore_write(&i915->uncore, DISP_ARB_CTL2, val);
+ intel_uncore_rmw(&i915->uncore, DISP_ARB_CTL2, DISP_IPC_ENABLE,
+ skl_watermark_ipc_enabled(i915) ? DISP_IPC_ENABLE : 0);
}
static bool skl_watermark_ipc_can_enable(struct drm_i915_private *i915)
--
2.34.1
next prev parent reply other threads:[~2022-09-12 11:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-12 11:45 [Intel-gfx] [PATCH 0/5] drm/i915/ipc: ipc and sub-struct refactoring, take 2 Jani Nikula
2022-09-12 11:45 ` [Intel-gfx] [PATCH 1/5] drm/i915/ipc: refactor and rename IPC functions Jani Nikula
2022-09-13 9:23 ` Ville Syrjälä
2022-09-13 17:09 ` Jani Nikula
2022-09-12 11:45 ` [Intel-gfx] [PATCH 2/5] drm/i915/ipc: move IPC debugfs to skl_watermark.c Jani Nikula
2022-09-12 11:45 ` [Intel-gfx] [PATCH 3/5] drm/i915/ipc: register debugfs only if IPC available Jani Nikula
2022-09-12 11:45 ` [Intel-gfx] [PATCH 4/5] drm/i915/display: move IPC under display wm sub-struct Jani Nikula
2022-09-12 11:45 ` Jani Nikula [this message]
2022-09-12 18:27 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/ipc: ipc and sub-struct refactoring, take 2 Patchwork
2022-09-12 18:50 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2022-09-13 7:53 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/ipc: ipc and sub-struct refactoring, take 2 (rev2) Patchwork
2022-09-13 16:22 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=113a17cd18401b0e4c83396575b67aa6efb07346.1662983005.git.jani.nikula@intel.com \
--to=jani.nikula@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