All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [RESEND 3/6] drm/i915/display: always pass display->drm to for_each_intel_crtc*()
Date: Wed, 13 May 2026 15:22:01 +0300	[thread overview]
Message-ID: <agRs6QXvPgY6xuDa@intel.com> (raw)
In-Reply-To: <447a5b2309e213abb849601727d45b406d440c88.1778659089.git.jani.nikula@intel.com>

On Wed, May 13, 2026 at 10:58:37AM +0300, Jani Nikula wrote:
> In preparation for always passing struct intel_display to
> for_each_intel_crtc*() family of iterators, start off by unifying their
> usage to always having struct intel_display *display around, and passing
> display->drm to them.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

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

> ---
>  drivers/gpu/drm/i915/display/i9xx_wm.c       | 3 ++-
>  drivers/gpu/drm/i915/display/intel_display.c | 3 ++-
>  drivers/gpu/drm/i915/display/intel_plane.c   | 3 ++-
>  3 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/i9xx_wm.c b/drivers/gpu/drm/i915/display/i9xx_wm.c
> index 33d8f6b6afea..4cd07410ad72 100644
> --- a/drivers/gpu/drm/i915/display/i9xx_wm.c
> +++ b/drivers/gpu/drm/i915/display/i9xx_wm.c
> @@ -3533,10 +3533,11 @@ static void ilk_pipe_wm_get_hw_state(struct intel_crtc *crtc)
>  
>  static int ilk_sanitize_watermarks_add_affected(struct drm_atomic_commit *state)
>  {
> +	struct intel_display *display = to_intel_display(state->dev);
>  	struct drm_plane *plane;
>  	struct intel_crtc *crtc;
>  
> -	for_each_intel_crtc(state->dev, crtc) {
> +	for_each_intel_crtc(display->drm, crtc) {
>  		struct intel_crtc_state *crtc_state;
>  
>  		crtc_state = intel_atomic_get_crtc_state(state, crtc);
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 682a0514ec81..7126a88ca090 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -5692,6 +5692,7 @@ int intel_modeset_commit_pipes(struct intel_display *display,
>   */
>  static int hsw_mode_set_planes_workaround(struct intel_atomic_state *state)
>  {
> +	struct intel_display *display = to_intel_display(state);
>  	struct intel_crtc_state *crtc_state;
>  	struct intel_crtc *crtc;
>  	struct intel_crtc_state *first_crtc_state = NULL;
> @@ -5719,7 +5720,7 @@ static int hsw_mode_set_planes_workaround(struct intel_atomic_state *state)
>  		return 0;
>  
>  	/* w/a possibly needed, check how many crtc's are already enabled. */
> -	for_each_intel_crtc(state->base.dev, crtc) {
> +	for_each_intel_crtc(display->drm, crtc) {
>  		crtc_state = intel_atomic_get_crtc_state(&state->base, crtc);
>  		if (IS_ERR(crtc_state))
>  			return PTR_ERR(crtc_state);
> diff --git a/drivers/gpu/drm/i915/display/intel_plane.c b/drivers/gpu/drm/i915/display/intel_plane.c
> index a1f9558d53af..911ae261d1b5 100644
> --- a/drivers/gpu/drm/i915/display/intel_plane.c
> +++ b/drivers/gpu/drm/i915/display/intel_plane.c
> @@ -1794,6 +1794,7 @@ static u8 intel_joiner_affected_planes(struct intel_atomic_state *state,
>  static int intel_joiner_add_affected_planes(struct intel_atomic_state *state,
>  					    u8 joined_pipes)
>  {
> +	struct intel_display *display = to_intel_display(state);
>  	u8 prev_affected_planes, affected_planes = 0;
>  
>  	/*
> @@ -1811,7 +1812,7 @@ static int intel_joiner_add_affected_planes(struct intel_atomic_state *state,
>  	do {
>  		struct intel_crtc *crtc;
>  
> -		for_each_intel_crtc_in_pipe_mask(state->base.dev, crtc, joined_pipes) {
> +		for_each_intel_crtc_in_pipe_mask(display->drm, crtc, joined_pipes) {
>  			int ret;
>  
>  			ret = intel_crtc_add_planes_to_state(state, crtc, affected_planes);
> -- 
> 2.47.3

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2026-05-13 12:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-13  7:58 [RESEND 0/6] drm/i915: crtc iteration cleanups Jani Nikula
2026-05-13  7:58 ` [RESEND 1/6] drm/{i915, xe}: move xe_display_flush_cleanup_work() to i915 display Jani Nikula
2026-05-13 12:09   ` Ville Syrjälä
2026-05-13 14:19     ` Jani Nikula
2026-05-13 14:56       ` Imre Deak
2026-05-13  7:58 ` [RESEND 2/6] drm/i915/display: switch from drm_for_each_crtc() to for_each_intel_crtc() Jani Nikula
2026-05-13  7:58 ` [RESEND 3/6] drm/i915/display: always pass display->drm to for_each_intel_crtc*() Jani Nikula
2026-05-13 12:22   ` Ville Syrjälä [this message]
2026-05-13  7:58 ` [RESEND 4/6] drm/i915/display: pass struct intel_display to all for_each_intel_crtc*() macros Jani Nikula
2026-05-13 12:22   ` Ville Syrjälä
2026-05-13  7:58 ` [RESEND 5/6] drm/i915/display: stop passing i to for_each_*_intel_crtc_in_state() macros Jani Nikula
2026-05-13 12:22   ` Ville Syrjälä
2026-05-13  7:58 ` [RESEND 6/6] drm/i915/display: stop passing i to for_each_pipe_crtc_modeset_{enable, disable}() Jani Nikula
2026-05-13 12:23   ` Ville Syrjälä
2026-05-13  8:05 ` ✗ CI.checkpatch: warning for drm/i915: crtc iteration cleanups (rev2) Patchwork
2026-05-13  8:07 ` ✓ CI.KUnit: success " Patchwork
2026-05-13  8:59 ` ✗ i915.CI.BAT: failure " Patchwork
2026-05-13  8:59 ` Patchwork
2026-05-13  9:46 ` ✓ Xe.CI.BAT: success " Patchwork
2026-05-14  7:33 ` ✗ Xe.CI.FULL: failure " Patchwork

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=agRs6QXvPgY6xuDa@intel.com \
    --to=ville.syrjala@linux.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.