On Wed, 2025-10-22 at 18:17 +0300, Jani Nikula wrote:
> Start a file for display specific generic utilities.
> 
> Move KHz() and MHz() helpers there first.
> 
> Signed-off-by: Jani Nikula <[email protected]>
> ---

Reviewed-by: Luca Coelho <[email protected]>

--
Cheers,
Luca.


>  drivers/gpu/drm/i915/display/intel_backlight.c     |  2 +-
>  drivers/gpu/drm/i915/display/intel_ddi.c           |  1 +
>  drivers/gpu/drm/i915/display/intel_display_utils.h | 10 ++++++++++
>  drivers/gpu/drm/i915/display/intel_dp_mst.c        |  2 +-
>  drivers/gpu/drm/i915/display/intel_dpll_mgr.c      |  1 +
>  drivers/gpu/drm/i915/i915_utils.h                  |  3 ---
>  6 files changed, 14 insertions(+), 5 deletions(-)
>  create mode 100644 drivers/gpu/drm/i915/display/intel_display_utils.h
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_backlight.c 
> b/drivers/gpu/drm/i915/display/intel_backlight.c
> index 3b14f929825a..a68fdbd2acb9 100644
> --- a/drivers/gpu/drm/i915/display/intel_backlight.c
> +++ b/drivers/gpu/drm/i915/display/intel_backlight.c
> @@ -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"
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c 
> b/drivers/gpu/drm/i915/display/intel_ddi.c
> index 870140340342..cd9fc3d1f36a 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> @@ -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
> index 000000000000..0a2b603ea856
> --- /dev/null
> +++ b/drivers/gpu/drm/i915/display/intel_display_utils.h
> @@ -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__ */
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c 
> b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index a845b2612a3f..8d11a989cf79 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -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"
> diff --git a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c 
> b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
> index 8ea96cc524a1..900a945ff8ab 100644
> --- a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
> +++ b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
> @@ -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"
> diff --git a/drivers/gpu/drm/i915/i915_utils.h 
> b/drivers/gpu/drm/i915/i915_utils.h
> index 44de4a4aa84a..c1f978a7c141 100644
> --- a/drivers/gpu/drm/i915/i915_utils.h
> +++ b/drivers/gpu/drm/i915/i915_utils.h
> @@ -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)
>  {

Reply via email to