Commit c73cdd12 authored by Jani Nikula's avatar Jani Nikula

drm/i915/ipc: use intel_uncore_rmw() to enable/disable

Don't duplicate the rmw function.
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/113a17cd18401b0e4c83396575b67aa6efb07346.1662983005.git.jani.nikula@intel.com
parent 70296670
...@@ -3127,19 +3127,11 @@ bool skl_watermark_ipc_enabled(struct drm_i915_private *i915) ...@@ -3127,19 +3127,11 @@ bool skl_watermark_ipc_enabled(struct drm_i915_private *i915)
void skl_watermark_ipc_update(struct drm_i915_private *i915) void skl_watermark_ipc_update(struct drm_i915_private *i915)
{ {
u32 val;
if (!HAS_IPC(i915)) if (!HAS_IPC(i915))
return; return;
val = intel_uncore_read(&i915->uncore, DISP_ARB_CTL2); intel_uncore_rmw(&i915->uncore, DISP_ARB_CTL2, DISP_IPC_ENABLE,
skl_watermark_ipc_enabled(i915) ? DISP_IPC_ENABLE : 0);
if (skl_watermark_ipc_enabled(i915))
val |= DISP_IPC_ENABLE;
else
val &= ~DISP_IPC_ENABLE;
intel_uncore_write(&i915->uncore, DISP_ARB_CTL2, val);
} }
static bool skl_watermark_ipc_can_enable(struct drm_i915_private *i915) static bool skl_watermark_ipc_can_enable(struct drm_i915_private *i915)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment