diff mbox series

[4/4] drm/i915/cdclk: turn around i915_drv.h and intel_cdclk.h dependency

Message ID 5f410f0fa5fe469895c1bfbe68aa92511053d5fa.1639068649.git.jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/cdclk: improve abstractions | expand

Commit Message

Jani Nikula Dec. 9, 2021, 4:51 p.m. UTC
intel_cdclk.h only needs i915_drv.h for struct intel_cdclk_config. Move
the definition to intel_cdclk.h and turn the includes around to avoid
including i915_drv.h from other headers.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_atomic.c | 1 +
 drivers/gpu/drm/i915/display/intel_cdclk.h  | 6 +++++-
 drivers/gpu/drm/i915/i915_drv.h             | 6 +-----
 3 files changed, 7 insertions(+), 6 deletions(-)

Comments

Ville Syrjälä Dec. 9, 2021, 5:55 p.m. UTC | #1
On Thu, Dec 09, 2021 at 06:51:25PM +0200, Jani Nikula wrote:
> intel_cdclk.h only needs i915_drv.h for struct intel_cdclk_config. Move
> the definition to intel_cdclk.h and turn the includes around to avoid
> including i915_drv.h from other headers.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_atomic.c | 1 +
>  drivers/gpu/drm/i915/display/intel_cdclk.h  | 6 +++++-
>  drivers/gpu/drm/i915/i915_drv.h             | 6 +-----
>  3 files changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_atomic.c b/drivers/gpu/drm/i915/display/intel_atomic.c
> index b4e7ac51aa31..ff17bec7a67d 100644
> --- a/drivers/gpu/drm/i915/display/intel_atomic.c
> +++ b/drivers/gpu/drm/i915/display/intel_atomic.c
> @@ -34,6 +34,7 @@
>  #include <drm/drm_fourcc.h>
>  #include <drm/drm_plane_helper.h>
>  
> +#include "i915_drv.h"
>  #include "intel_atomic.h"
>  #include "intel_cdclk.h"
>  #include "intel_display_types.h"
> diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.h b/drivers/gpu/drm/i915/display/intel_cdclk.h
> index 50b93226517e..e11db06a81c2 100644
> --- a/drivers/gpu/drm/i915/display/intel_cdclk.h
> +++ b/drivers/gpu/drm/i915/display/intel_cdclk.h
> @@ -8,7 +8,6 @@
>  
>  #include <linux/types.h>
>  
> -#include "i915_drv.h"
>  #include "intel_display.h"
>  #include "intel_global_state.h"
>  
> @@ -16,6 +15,11 @@ struct drm_i915_private;
>  struct intel_atomic_state;
>  struct intel_crtc_state;
>  
> +struct intel_cdclk_config {
> +	unsigned int cdclk, vco, ref, bypass;
> +	u8 voltage_level;
> +};
> +
>  struct intel_cdclk_state {
>  	struct intel_global_state base;
>  
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index e36aea6453c2..a198f7e075d9 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -65,6 +65,7 @@
>  #include "i915_utils.h"
>  
>  #include "display/intel_bios.h"
> +#include "display/intel_cdclk.h"
>  #include "display/intel_display.h"
>  #include "display/intel_display_power.h"
>  #include "display/intel_dmc.h"
> @@ -625,11 +626,6 @@ struct i915_virtual_gpu {
>  	u32 caps;
>  };
>  
> -struct intel_cdclk_config {
> -	unsigned int cdclk, vco, ref, bypass;
> -	u8 voltage_level;
> -};
> -
>  struct i915_selftest_stash {
>  	atomic_t counter;
>  	struct ida mock_region_instances;
> -- 
> 2.30.2
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_atomic.c b/drivers/gpu/drm/i915/display/intel_atomic.c
index b4e7ac51aa31..ff17bec7a67d 100644
--- a/drivers/gpu/drm/i915/display/intel_atomic.c
+++ b/drivers/gpu/drm/i915/display/intel_atomic.c
@@ -34,6 +34,7 @@ 
 #include <drm/drm_fourcc.h>
 #include <drm/drm_plane_helper.h>
 
+#include "i915_drv.h"
 #include "intel_atomic.h"
 #include "intel_cdclk.h"
 #include "intel_display_types.h"
diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.h b/drivers/gpu/drm/i915/display/intel_cdclk.h
index 50b93226517e..e11db06a81c2 100644
--- a/drivers/gpu/drm/i915/display/intel_cdclk.h
+++ b/drivers/gpu/drm/i915/display/intel_cdclk.h
@@ -8,7 +8,6 @@ 
 
 #include <linux/types.h>
 
-#include "i915_drv.h"
 #include "intel_display.h"
 #include "intel_global_state.h"
 
@@ -16,6 +15,11 @@  struct drm_i915_private;
 struct intel_atomic_state;
 struct intel_crtc_state;
 
+struct intel_cdclk_config {
+	unsigned int cdclk, vco, ref, bypass;
+	u8 voltage_level;
+};
+
 struct intel_cdclk_state {
 	struct intel_global_state base;
 
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index e36aea6453c2..a198f7e075d9 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -65,6 +65,7 @@ 
 #include "i915_utils.h"
 
 #include "display/intel_bios.h"
+#include "display/intel_cdclk.h"
 #include "display/intel_display.h"
 #include "display/intel_display_power.h"
 #include "display/intel_dmc.h"
@@ -625,11 +626,6 @@  struct i915_virtual_gpu {
 	u32 caps;
 };
 
-struct intel_cdclk_config {
-	unsigned int cdclk, vco, ref, bypass;
-	u8 voltage_level;
-};
-
 struct i915_selftest_stash {
 	atomic_t counter;
 	struct ida mock_region_instances;