Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Lisovskiy, Stanislav" <stanislav.lisovskiy@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 2/3] drm/i915: Split intel_update_crtc() into two parts
Date: Wed, 8 Nov 2023 16:49:58 +0200	[thread overview]
Message-ID: <ZUugFqcURIU5bftX@intel.com> (raw)
In-Reply-To: <20230907122541.32261-3-ville.syrjala@linux.intel.com>

On Thu, Sep 07, 2023 at 03:25:40PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Split intel_update_crtc() into two parts such that the first
> part performs all the non-vblank evasion preparatory stuff,
> and the second part just does the vblank evasion stuff.
> 
> For now we just call these back to back so that there is
> no funcitonal change.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 16 ++++++++++++++--
>  1 file changed, 14 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 526f38b502be..7c19a0f380ca 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -6542,8 +6542,8 @@ static void intel_enable_crtc(struct intel_atomic_state *state,
>  	intel_crtc_enable_pipe_crc(crtc);
>  }
>  
> -static void intel_update_crtc(struct intel_atomic_state *state,
> -			      struct intel_crtc *crtc)
> +static void intel_pre_update_crtc(struct intel_atomic_state *state,
> +				  struct intel_crtc *crtc)
>  {
>  	struct drm_i915_private *i915 = to_i915(state->base.dev);
>  	const struct intel_crtc_state *old_crtc_state =
> @@ -6588,6 +6588,15 @@ static void intel_update_crtc(struct intel_atomic_state *state,
>  		intel_color_commit_noarm(new_crtc_state);
>  
>  	intel_crtc_planes_update_noarm(state, crtc);
> +}
> +
> +static void intel_update_crtc(struct intel_atomic_state *state,
> +			      struct intel_crtc *crtc)
> +{
> +	const struct intel_crtc_state *old_crtc_state =
> +		intel_atomic_get_old_crtc_state(state, crtc);
> +	struct intel_crtc_state *new_crtc_state =
> +		intel_atomic_get_new_crtc_state(state, crtc);
>  
>  	/* Perform vblank evasion around commit operation */
>  	intel_pipe_update_start(new_crtc_state);
> @@ -6701,6 +6710,7 @@ static void intel_commit_modeset_enables(struct intel_atomic_state *state)
>  			continue;
>  
>  		intel_enable_crtc(state, crtc);
> +		intel_pre_update_crtc(state, crtc);
>  		intel_update_crtc(state, crtc);
>  	}
>  }
> @@ -6753,6 +6763,7 @@ static void skl_commit_modeset_enables(struct intel_atomic_state *state)
>  			entries[pipe] = new_crtc_state->wm.skl.ddb;
>  			update_pipes &= ~BIT(pipe);
>  
> +			intel_pre_update_crtc(state, crtc);
>  			intel_update_crtc(state, crtc);
>  
>  			/*
> @@ -6820,6 +6831,7 @@ static void skl_commit_modeset_enables(struct intel_atomic_state *state)
>  		entries[pipe] = new_crtc_state->wm.skl.ddb;
>  		update_pipes &= ~BIT(pipe);
>  
> +		intel_pre_update_crtc(state, crtc);
>  		intel_update_crtc(state, crtc);
>  	}
>  
> -- 
> 2.41.0
> 

  reply	other threads:[~2023-11-08 14:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-07 12:25 [Intel-gfx] [PATCH 0/3] drm/i915: Slightly more atomic multi-pipe commits Ville Syrjala
2023-09-07 12:25 ` [Intel-gfx] [PATCH 1/3] drm/i915: Drop redundant !modeset check Ville Syrjala
2023-10-11 13:47   ` Lisovskiy, Stanislav
2023-10-11 15:50     ` Ville Syrjälä
2023-10-11 22:10       ` Lisovskiy, Stanislav
2023-09-07 12:25 ` [Intel-gfx] [PATCH 2/3] drm/i915: Split intel_update_crtc() into two parts Ville Syrjala
2023-11-08 14:49   ` Lisovskiy, Stanislav [this message]
2023-09-07 12:25 ` [Intel-gfx] [PATCH 3/3] drm/i915: Do plane/etc. updates more atomically across pipes Ville Syrjala
2023-10-11 13:48   ` Lisovskiy, Stanislav
2023-09-07 14:51 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Slightly more atomic multi-pipe commits Patchwork
2023-09-07 16:50 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=ZUugFqcURIU5bftX@intel.com \
    --to=stanislav.lisovskiy@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox