drm/i915/display: move IPC under display wm sub-struct
authorJani Nikula <jani.nikula@intel.com>
Mon, 12 Sep 2022 11:45:15 +0000 (14:45 +0300)
committerJani Nikula <jani.nikula@intel.com>
Tue, 13 Sep 2022 16:55:08 +0000 (19:55 +0300)
Move display IPC related member under drm_i915_private display
sub-struct.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/04ccaaceee9293e5a6c75761ba9d36792c36f095.1662983005.git.jani.nikula@intel.com
drivers/gpu/drm/i915/display/intel_display_core.h
drivers/gpu/drm/i915/display/skl_watermark.c

index 9086a61..96cf994 100644 (file)
@@ -239,6 +239,8 @@ struct intel_wm {
         * crtc_state->wm.need_postvbl_update.
         */
        struct mutex wm_mutex;
+
+       bool ipc_enabled;
 };
 
 struct intel_display {
index c67497b..09249a4 100644 (file)
@@ -3122,7 +3122,7 @@ void intel_wm_state_verify(struct intel_crtc *crtc,
 
 bool skl_watermark_ipc_enabled(struct drm_i915_private *i915)
 {
-       return i915->ipc_enabled;
+       return i915->display.wm.ipc_enabled;
 }
 
 void skl_watermark_ipc_update(struct drm_i915_private *i915)
@@ -3162,7 +3162,7 @@ void skl_watermark_ipc_init(struct drm_i915_private *i915)
        if (!HAS_IPC(i915))
                return;
 
-       i915->ipc_enabled = skl_watermark_ipc_can_enable(i915);
+       i915->display.wm.ipc_enabled = skl_watermark_ipc_can_enable(i915);
 
        skl_watermark_ipc_update(i915);
 }
@@ -3506,7 +3506,7 @@ static ssize_t skl_watermark_ipc_status_write(struct file *file,
                if (!skl_watermark_ipc_enabled(i915) && enable)
                        drm_info(&i915->drm,
                                 "Enabling IPC: WM will be proper only after next commit\n");
-               i915->ipc_enabled = enable;
+               i915->display.wm.ipc_enabled = enable;
                skl_watermark_ipc_update(i915);
        }