]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/i915/display: create intel_display_utils.h
authorJani Nikula <jani.nikula@intel.com>
Wed, 22 Oct 2025 15:17:10 +0000 (18:17 +0300)
committerJani Nikula <jani.nikula@intel.com>
Fri, 31 Oct 2025 11:09:03 +0000 (13:09 +0200)
Start a file for display specific generic utilities.

Move KHz() and MHz() helpers there first.

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://patch.msgid.link/dbdd1915466850293b9737b751170dd225197873.1761146196.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_backlight.c
drivers/gpu/drm/i915/display/intel_ddi.c
drivers/gpu/drm/i915/display/intel_display_utils.h [new file with mode: 0644]
drivers/gpu/drm/i915/display/intel_dp_mst.c
drivers/gpu/drm/i915/display/intel_dpll_mgr.c
drivers/gpu/drm/i915/i915_utils.h

index 3b14f929825a13b9fef7349da0a2e1dd8d48ce20..a68fdbd2acb907df444e2c998398e7f60fa40d69 100644 (file)
@@ -13,7 +13,6 @@
 #include <drm/drm_print.h>
 
 #include "i915_reg.h"
-#include "i915_utils.h"
 #include "intel_backlight.h"
 #include "intel_backlight_regs.h"
 #include "intel_connector.h"
@@ -21,6 +20,7 @@
 #include "intel_display_regs.h"
 #include "intel_display_rpm.h"
 #include "intel_display_types.h"
+#include "intel_display_utils.h"
 #include "intel_dp_aux_backlight.h"
 #include "intel_dsi_dcs_backlight.h"
 #include "intel_panel.h"
index 870140340342583bf454f48fb22284fe770f327b..cd9fc3d1f36a5053d45c5ab69a3fa1630fe9d5d2 100644 (file)
@@ -53,6 +53,7 @@
 #include "intel_display_power.h"
 #include "intel_display_regs.h"
 #include "intel_display_types.h"
+#include "intel_display_utils.h"
 #include "intel_dkl_phy.h"
 #include "intel_dkl_phy_regs.h"
 #include "intel_dp.h"
diff --git a/drivers/gpu/drm/i915/display/intel_display_utils.h b/drivers/gpu/drm/i915/display/intel_display_utils.h
new file mode 100644 (file)
index 0000000..0a2b603
--- /dev/null
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: MIT */
+/* Copyright © 2025 Intel Corporation */
+
+#ifndef __INTEL_DISPLAY_UTILS__
+#define __INTEL_DISPLAY_UTILS__
+
+#define KHz(x) (1000 * (x))
+#define MHz(x) KHz(1000 * (x))
+
+#endif /* __INTEL_DISPLAY_UTILS__ */
index 21a60b8c880ee70a1570b237a0b5505455a70dfd..4c0b943fe86f13bcdedb8978ad0e93eafeb6c406 100644 (file)
@@ -33,7 +33,6 @@
 #include <drm/drm_print.h>
 #include <drm/drm_probe_helper.h>
 
-#include "i915_utils.h"
 #include "intel_atomic.h"
 #include "intel_audio.h"
 #include "intel_connector.h"
@@ -43,6 +42,7 @@
 #include "intel_display_driver.h"
 #include "intel_display_regs.h"
 #include "intel_display_types.h"
+#include "intel_display_utils.h"
 #include "intel_dp.h"
 #include "intel_dp_hdcp.h"
 #include "intel_dp_link_training.h"
index 8ea96cc524a1e253edfaa4a3f15be79560a1b7b5..900a945ff8abc854acc3692ed162421714d3cfc2 100644 (file)
@@ -32,6 +32,7 @@
 #include "intel_de.h"
 #include "intel_display_regs.h"
 #include "intel_display_types.h"
+#include "intel_display_utils.h"
 #include "intel_dkl_phy.h"
 #include "intel_dkl_phy_regs.h"
 #include "intel_dpio_phy.h"
index 44de4a4aa84ac8dc1735b2a39af13aaabfd8e8c2..c1f978a7c141948b85864a4da239ffafb2ba090c 100644 (file)
@@ -100,9 +100,6 @@ static inline bool is_power_of_2_u64(u64 n)
        return (n != 0 && ((n & (n - 1)) == 0));
 }
 
-#define KHz(x) (1000 * (x))
-#define MHz(x) KHz(1000 * (x))
-
 void add_taint_for_CI(struct drm_i915_private *i915, unsigned int taint);
 static inline void __add_taint_for_CI(unsigned int taint)
 {