From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: <intel-gfx@lists.freedesktop.org>, <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915: reduce intel_wakeref.h dependencies
Date: Fri, 28 Mar 2025 11:49:38 -0400 [thread overview]
Message-ID: <Z-bFEou3Q7xsksi_@intel.com> (raw)
In-Reply-To: <20250326115452.2090275-1-jani.nikula@intel.com>
On Wed, Mar 26, 2025 at 01:54:52PM +0200, Jani Nikula wrote:
> Forward declare struct drm_printer instead of including drm/drm_print.h,
> as we only need the pointer. Turns out quite a few places depend on this
> include implicitly. Make them explicit.
>
> Some of the includes are just stale and unnecessary. Group the forward
> declarations together while at it.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/display/dvo_ch7017.c | 2 ++
> drivers/gpu/drm/i915/display/dvo_ch7xxx.c | 2 ++
> drivers/gpu/drm/i915/display/dvo_ivch.c | 2 ++
> drivers/gpu/drm/i915/display/dvo_ns2501.c | 2 ++
> drivers/gpu/drm/i915/display/dvo_sil164.c | 2 ++
> drivers/gpu/drm/i915/display/dvo_tfp410.c | 2 ++
> drivers/gpu/drm/i915/display/icl_dsi.c | 1 +
> drivers/gpu/drm/i915/display/intel_color.c | 2 ++
> drivers/gpu/drm/i915/display/intel_combo_phy.c | 2 ++
> drivers/gpu/drm/i915/display/intel_dkl_phy.c | 1 +
> drivers/gpu/drm/i915/display/intel_dvo.c | 1 +
> drivers/gpu/drm/i915/display/intel_hti.c | 1 +
> drivers/gpu/drm/i915/display/intel_load_detect.c | 1 +
> drivers/gpu/drm/i915/display/intel_lspcon.c | 1 +
> drivers/gpu/drm/i915/display/intel_pmdemand.c | 2 ++
> drivers/gpu/drm/i915/display/intel_snps_phy.c | 2 ++
> drivers/gpu/drm/i915/display/intel_tc.c | 2 ++
> drivers/gpu/drm/i915/display/intel_vdsc.c | 1 +
> drivers/gpu/drm/i915/display/intel_vrr.c | 2 ++
> drivers/gpu/drm/i915/intel_wakeref.h | 11 ++++-------
> 20 files changed, 35 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/dvo_ch7017.c b/drivers/gpu/drm/i915/display/dvo_ch7017.c
> index 206818f9ad49..f10c0fb8d2c8 100644
> --- a/drivers/gpu/drm/i915/display/dvo_ch7017.c
> +++ b/drivers/gpu/drm/i915/display/dvo_ch7017.c
> @@ -25,6 +25,8 @@
> *
> */
>
> +#include <drm/drm_print.h>
> +
> #include "intel_display_types.h"
> #include "intel_dvo_dev.h"
>
> diff --git a/drivers/gpu/drm/i915/display/dvo_ch7xxx.c b/drivers/gpu/drm/i915/display/dvo_ch7xxx.c
> index 10ab3cc73e58..49f02aca818b 100644
> --- a/drivers/gpu/drm/i915/display/dvo_ch7xxx.c
> +++ b/drivers/gpu/drm/i915/display/dvo_ch7xxx.c
> @@ -26,6 +26,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
>
> **************************************************************************/
>
> +#include <drm/drm_print.h>
> +
> #include "intel_display_types.h"
> #include "intel_dvo_dev.h"
>
> diff --git a/drivers/gpu/drm/i915/display/dvo_ivch.c b/drivers/gpu/drm/i915/display/dvo_ivch.c
> index d9c3152d4338..0713b2709412 100644
> --- a/drivers/gpu/drm/i915/display/dvo_ivch.c
> +++ b/drivers/gpu/drm/i915/display/dvo_ivch.c
> @@ -29,6 +29,8 @@
> *
> */
>
> +#include <drm/drm_print.h>
> +
> #include "intel_display_types.h"
> #include "intel_dvo_dev.h"
>
> diff --git a/drivers/gpu/drm/i915/display/dvo_ns2501.c b/drivers/gpu/drm/i915/display/dvo_ns2501.c
> index 92d32d6b5bce..80b71bd6a837 100644
> --- a/drivers/gpu/drm/i915/display/dvo_ns2501.c
> +++ b/drivers/gpu/drm/i915/display/dvo_ns2501.c
> @@ -26,6 +26,8 @@
> *
> */
>
> +#include <drm/drm_print.h>
> +
> #include "intel_display_types.h"
> #include "intel_dvo_dev.h"
>
> diff --git a/drivers/gpu/drm/i915/display/dvo_sil164.c b/drivers/gpu/drm/i915/display/dvo_sil164.c
> index b42c717085f3..017b617a8069 100644
> --- a/drivers/gpu/drm/i915/display/dvo_sil164.c
> +++ b/drivers/gpu/drm/i915/display/dvo_sil164.c
> @@ -26,6 +26,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
>
> **************************************************************************/
>
> +#include <drm/drm_print.h>
> +
> #include "intel_display_types.h"
> #include "intel_dvo_dev.h"
>
> diff --git a/drivers/gpu/drm/i915/display/dvo_tfp410.c b/drivers/gpu/drm/i915/display/dvo_tfp410.c
> index 280699438526..ed560e3438db 100644
> --- a/drivers/gpu/drm/i915/display/dvo_tfp410.c
> +++ b/drivers/gpu/drm/i915/display/dvo_tfp410.c
> @@ -25,6 +25,8 @@
> *
> */
>
> +#include <drm/drm_print.h>
> +
> #include "intel_display_types.h"
> #include "intel_dvo_dev.h"
>
> diff --git a/drivers/gpu/drm/i915/display/icl_dsi.c b/drivers/gpu/drm/i915/display/icl_dsi.c
> index 402b7b2e1829..9dd2e2c295b9 100644
> --- a/drivers/gpu/drm/i915/display/icl_dsi.c
> +++ b/drivers/gpu/drm/i915/display/icl_dsi.c
> @@ -29,6 +29,7 @@
> #include <drm/drm_atomic_helper.h>
> #include <drm/drm_fixed.h>
> #include <drm/drm_mipi_dsi.h>
> +#include <drm/drm_print.h>
> #include <drm/drm_probe_helper.h>
>
> #include "i915_reg.h"
> diff --git a/drivers/gpu/drm/i915/display/intel_color.c b/drivers/gpu/drm/i915/display/intel_color.c
> index bbf6df7ebb95..98dddf72c0eb 100644
> --- a/drivers/gpu/drm/i915/display/intel_color.c
> +++ b/drivers/gpu/drm/i915/display/intel_color.c
> @@ -22,6 +22,8 @@
> *
> */
>
> +#include <drm/drm_print.h>
> +
> #include "i915_utils.h"
> #include "i9xx_plane_regs.h"
> #include "intel_color.h"
> diff --git a/drivers/gpu/drm/i915/display/intel_combo_phy.c b/drivers/gpu/drm/i915/display/intel_combo_phy.c
> index 17eea244cc83..f5cc38dbe559 100644
> --- a/drivers/gpu/drm/i915/display/intel_combo_phy.c
> +++ b/drivers/gpu/drm/i915/display/intel_combo_phy.c
> @@ -3,6 +3,8 @@
> * Copyright © 2018 Intel Corporation
> */
>
> +#include <drm/drm_print.h>
> +
> #include "i915_reg.h"
> #include "i915_utils.h"
> #include "intel_combo_phy.h"
> diff --git a/drivers/gpu/drm/i915/display/intel_dkl_phy.c b/drivers/gpu/drm/i915/display/intel_dkl_phy.c
> index 0813fb9b5823..dad7192132ad 100644
> --- a/drivers/gpu/drm/i915/display/intel_dkl_phy.c
> +++ b/drivers/gpu/drm/i915/display/intel_dkl_phy.c
> @@ -4,6 +4,7 @@
> */
>
> #include <drm/drm_device.h>
> +#include <drm/drm_print.h>
>
> #include "intel_de.h"
> #include "intel_display.h"
> diff --git a/drivers/gpu/drm/i915/display/intel_dvo.c b/drivers/gpu/drm/i915/display/intel_dvo.c
> index 602e76ddf788..b61520353c92 100644
> --- a/drivers/gpu/drm/i915/display/intel_dvo.c
> +++ b/drivers/gpu/drm/i915/display/intel_dvo.c
> @@ -31,6 +31,7 @@
> #include <drm/drm_atomic_helper.h>
> #include <drm/drm_crtc.h>
> #include <drm/drm_edid.h>
> +#include <drm/drm_print.h>
> #include <drm/drm_probe_helper.h>
>
> #include "i915_reg.h"
> diff --git a/drivers/gpu/drm/i915/display/intel_hti.c b/drivers/gpu/drm/i915/display/intel_hti.c
> index fb6b84f6a81d..dc454420c134 100644
> --- a/drivers/gpu/drm/i915/display/intel_hti.c
> +++ b/drivers/gpu/drm/i915/display/intel_hti.c
> @@ -4,6 +4,7 @@
> */
>
> #include <drm/drm_device.h>
> +#include <drm/drm_print.h>
>
> #include "intel_de.h"
> #include "intel_display.h"
> diff --git a/drivers/gpu/drm/i915/display/intel_load_detect.c b/drivers/gpu/drm/i915/display/intel_load_detect.c
> index 86cc03a4413c..aad52d0d83e1 100644
> --- a/drivers/gpu/drm/i915/display/intel_load_detect.c
> +++ b/drivers/gpu/drm/i915/display/intel_load_detect.c
> @@ -6,6 +6,7 @@
> #include <drm/drm_atomic.h>
> #include <drm/drm_atomic_helper.h>
> #include <drm/drm_atomic_uapi.h>
> +#include <drm/drm_print.h>
>
> #include "intel_atomic.h"
> #include "intel_crtc.h"
> diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.c b/drivers/gpu/drm/i915/display/intel_lspcon.c
> index 63c1afa30b05..f94b7eeae20f 100644
> --- a/drivers/gpu/drm/i915/display/intel_lspcon.c
> +++ b/drivers/gpu/drm/i915/display/intel_lspcon.c
> @@ -27,6 +27,7 @@
> #include <drm/display/drm_hdmi_helper.h>
> #include <drm/drm_atomic_helper.h>
> #include <drm/drm_edid.h>
> +#include <drm/drm_print.h>
>
> #include "i915_reg.h"
> #include "i915_utils.h"
> diff --git a/drivers/gpu/drm/i915/display/intel_pmdemand.c b/drivers/gpu/drm/i915/display/intel_pmdemand.c
> index 63301a01906c..d22b5469672d 100644
> --- a/drivers/gpu/drm/i915/display/intel_pmdemand.c
> +++ b/drivers/gpu/drm/i915/display/intel_pmdemand.c
> @@ -5,6 +5,8 @@
>
> #include <linux/bitops.h>
>
> +#include <drm/drm_print.h>
> +
> #include "i915_reg.h"
> #include "i915_utils.h"
> #include "intel_atomic.h"
> diff --git a/drivers/gpu/drm/i915/display/intel_snps_phy.c b/drivers/gpu/drm/i915/display/intel_snps_phy.c
> index b9acd9fe160c..2b53ac9f4935 100644
> --- a/drivers/gpu/drm/i915/display/intel_snps_phy.c
> +++ b/drivers/gpu/drm/i915/display/intel_snps_phy.c
> @@ -5,6 +5,8 @@
>
> #include <linux/math.h>
>
> +#include <drm/drm_print.h>
> +
> #include "i915_reg.h"
> #include "i915_utils.h"
> #include "intel_ddi.h"
> diff --git a/drivers/gpu/drm/i915/display/intel_tc.c b/drivers/gpu/drm/i915/display/intel_tc.c
> index 426a3c8529a3..2c6c18434a4c 100644
> --- a/drivers/gpu/drm/i915/display/intel_tc.c
> +++ b/drivers/gpu/drm/i915/display/intel_tc.c
> @@ -3,6 +3,8 @@
> * Copyright © 2019 Intel Corporation
> */
>
> +#include <drm/drm_print.h>
> +
> #include "i915_reg.h"
> #include "i915_utils.h"
> #include "intel_atomic.h"
> diff --git a/drivers/gpu/drm/i915/display/intel_vdsc.c b/drivers/gpu/drm/i915/display/intel_vdsc.c
> index 470c170897e5..8e799e225af1 100644
> --- a/drivers/gpu/drm/i915/display/intel_vdsc.c
> +++ b/drivers/gpu/drm/i915/display/intel_vdsc.c
> @@ -9,6 +9,7 @@
>
> #include <drm/display/drm_dsc_helper.h>
> #include <drm/drm_fixed.h>
> +#include <drm/drm_print.h>
>
> #include "i915_utils.h"
> #include "intel_crtc.h"
> diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c
> index 414f93851059..4f442804a41a 100644
> --- a/drivers/gpu/drm/i915/display/intel_vrr.c
> +++ b/drivers/gpu/drm/i915/display/intel_vrr.c
> @@ -4,6 +4,8 @@
> *
> */
>
> +#include <drm/drm_print.h>
> +
> #include "i915_reg.h"
> #include "intel_de.h"
> #include "intel_display_types.h"
> diff --git a/drivers/gpu/drm/i915/intel_wakeref.h b/drivers/gpu/drm/i915/intel_wakeref.h
> index 48836ef52d40..a2894a56e18f 100644
> --- a/drivers/gpu/drm/i915/intel_wakeref.h
> +++ b/drivers/gpu/drm/i915/intel_wakeref.h
> @@ -7,8 +7,6 @@
> #ifndef INTEL_WAKEREF_H
> #define INTEL_WAKEREF_H
>
> -#include <drm/drm_print.h>
> -
> #include <linux/atomic.h>
> #include <linux/bitfield.h>
> #include <linux/bits.h>
> @@ -16,11 +14,13 @@
> #include <linux/mutex.h>
> #include <linux/refcount.h>
> #include <linux/ref_tracker.h>
> -#include <linux/slab.h>
> -#include <linux/stackdepot.h>
> #include <linux/timer.h>
> #include <linux/workqueue.h>
>
> +struct drm_printer;
> +struct intel_runtime_pm;
> +struct intel_wakeref;
> +
> typedef struct ref_tracker *intel_wakeref_t;
>
> #define INTEL_REFTRACK_DEAD_COUNT 16
> @@ -32,9 +32,6 @@ typedef struct ref_tracker *intel_wakeref_t;
> #define INTEL_WAKEREF_BUG_ON(expr) BUILD_BUG_ON_INVALID(expr)
> #endif
>
> -struct intel_runtime_pm;
> -struct intel_wakeref;
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> -
> struct intel_wakeref_ops {
> int (*get)(struct intel_wakeref *wf);
> int (*put)(struct intel_wakeref *wf);
> --
> 2.39.5
>
next prev parent reply other threads:[~2025-03-28 15:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-26 11:54 [PATCH] drm/i915: reduce intel_wakeref.h dependencies Jani Nikula
2025-03-26 12:42 ` ✓ CI.Patch_applied: success for " Patchwork
2025-03-26 12:42 ` ✓ CI.checkpatch: " Patchwork
2025-03-26 12:44 ` ✓ CI.KUnit: " Patchwork
2025-03-26 12:47 ` ✗ Fi.CI.SPARSE: warning " Patchwork
2025-03-26 13:00 ` ✓ CI.Build: success " Patchwork
2025-03-26 13:02 ` ✓ CI.Hooks: " Patchwork
2025-03-26 13:04 ` ✓ CI.checksparse: " Patchwork
2025-03-26 13:06 ` ✓ i915.CI.BAT: " Patchwork
2025-03-26 13:24 ` ✓ Xe.CI.BAT: " Patchwork
2025-03-26 15:37 ` ✗ i915.CI.Full: failure " Patchwork
2025-03-27 1:18 ` ✗ Xe.CI.Full: " Patchwork
2025-03-27 10:12 ` Patchwork
2025-03-28 15:49 ` Rodrigo Vivi [this message]
2025-04-01 8:56 ` [PATCH] " Jani Nikula
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z-bFEou3Q7xsksi_@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.