]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/i915: move SKL clock gating init to display
authorLuca Coelho <luciano.coelho@intel.com>
Tue, 28 Apr 2026 09:48:19 +0000 (12:48 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Tue, 5 May 2026 12:26:51 +0000 (15:26 +0300)
Move the SKL-specific display clock gating programming into a new file
inside display.

This removes dependency from intel_clock_gating.c to the display's
intel_pch.h file, so we can remove the include statement.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patch.msgid.link/20260428095104.818360-2-luciano.coelho@intel.com
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/gpu/drm/i915/Makefile
drivers/gpu/drm/i915/display/intel_display_clock_gating.c [new file with mode: 0644]
drivers/gpu/drm/i915/display/intel_display_clock_gating.h [new file with mode: 0644]
drivers/gpu/drm/i915/intel_clock_gating.c

index fa632f4e505c975876c041c24fcbb5f27c24f4ce..07802a7f4ce50b892b324c8d18272a1afa9e609c 100644 (file)
@@ -256,6 +256,7 @@ i915-y += \
        display/intel_cursor.o \
        display/intel_dbuf_bw.o \
        display/intel_de.o \
+       display/intel_display_clock_gating.o \
        display/intel_display.o \
        display/intel_display_conversion.o \
        display/intel_display_driver.o \
diff --git a/drivers/gpu/drm/i915/display/intel_display_clock_gating.c b/drivers/gpu/drm/i915/display/intel_display_clock_gating.c
new file mode 100644 (file)
index 0000000..4a94593
--- /dev/null
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright 2026 Intel Corporation
+ */
+
+#include <drm/intel/intel_gmd_misc_regs.h>
+
+#include "intel_de.h"
+#include "intel_display_clock_gating.h"
+#include "intel_display_regs.h"
+
+void intel_display_skl_init_clock_gating(struct intel_display *display)
+{
+       /*
+        * WaFbcTurnOffFbcWatermark:skl
+        * Display WA #0562: skl
+        */
+       intel_de_rmw(display, DISP_ARB_CTL, 0, DISP_FBC_WM_DIS);
+}
diff --git a/drivers/gpu/drm/i915/display/intel_display_clock_gating.h b/drivers/gpu/drm/i915/display/intel_display_clock_gating.h
new file mode 100644 (file)
index 0000000..00f416d
--- /dev/null
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright 2026 Intel Corporation
+ */
+
+#ifndef __INTEL_DISPLAY_CLOCK_GATING_H__
+#define __INTEL_DISPLAY_CLOCK_GATING_H__
+
+struct intel_display;
+
+void intel_display_skl_init_clock_gating(struct intel_display *display);
+
+#endif /* __INTEL_DISPLAY_CLOCK_GATING_H__ */
index 515f83c82abc15471a33d0152d9124da293454cb..ad28ceee012b266c5d41a68ee697f7232cd6eebb 100644 (file)
@@ -32,9 +32,9 @@
 
 #include "display/i9xx_plane_regs.h"
 #include "display/intel_display.h"
+#include "display/intel_display_clock_gating.h"
 #include "display/intel_display_core.h"
 #include "display/intel_display_regs.h"
-#include "display/intel_pch.h"
 #include "gt/intel_engine_regs.h"
 #include "gt/intel_gt.h"
 #include "gt/intel_gt_mcr.h"
@@ -349,11 +349,7 @@ static void skl_init_clock_gating(struct drm_i915_private *i915)
        /* WAC6entrylatency:skl */
        intel_uncore_rmw(&i915->uncore, FBC_LLC_READ_CTRL, 0, FBC_LLC_FULLY_OPEN);
 
-       /*
-        * WaFbcTurnOffFbcWatermark:skl
-        * Display WA #0562: skl
-        */
-       intel_uncore_rmw(&i915->uncore, DISP_ARB_CTL, 0, DISP_FBC_WM_DIS);
+       intel_display_skl_init_clock_gating(i915->display);
 }
 
 static void bdw_init_clock_gating(struct drm_i915_private *i915)