All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 1/2] drm/i915: Use intel_crtc_needs_modeset() more
Date: Tue, 01 Nov 2022 12:08:28 +0200	[thread overview]
Message-ID: <87o7tr7zs3.fsf@intel.com> (raw)
In-Reply-To: <20221031214037.1636-1-ville.syrjala@linux.intel.com>

On Mon, 31 Oct 2022, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Prefer our own intel_crtc_needs_modeset() wrapper to
> drm_atomic_crtc_needs_modeset() whenever we are dealing
> with the intel_ types instead of drm_ types. Makes things
> a bit neater in general.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_cdclk.c   |  2 +-
>  drivers/gpu/drm/i915/display/intel_color.c   |  2 +-
>  drivers/gpu/drm/i915/display/intel_display.c |  2 +-
>  drivers/gpu/drm/i915/display/intel_fbc.c     |  2 +-
>  drivers/gpu/drm/i915/display/skl_watermark.c |  2 +-
>  drivers/gpu/drm/i915/intel_pm.c              | 11 +++++------
>  6 files changed, 10 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c b/drivers/gpu/drm/i915/display/intel_cdclk.c
> index eada931cb1c8..8a9031012d74 100644
> --- a/drivers/gpu/drm/i915/display/intel_cdclk.c
> +++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
> @@ -2755,7 +2755,7 @@ int intel_modeset_calc_cdclk(struct intel_atomic_state *state)
>  		if (IS_ERR(crtc_state))
>  			return PTR_ERR(crtc_state);
>  
> -		if (drm_atomic_crtc_needs_modeset(&crtc_state->uapi))
> +		if (intel_crtc_needs_modeset(crtc_state))
>  			pipe = INVALID_PIPE;
>  	}
>  
> diff --git a/drivers/gpu/drm/i915/display/intel_color.c b/drivers/gpu/drm/i915/display/intel_color.c
> index 4bb113c39f4b..1bd074431d89 100644
> --- a/drivers/gpu/drm/i915/display/intel_color.c
> +++ b/drivers/gpu/drm/i915/display/intel_color.c
> @@ -1240,7 +1240,7 @@ intel_color_add_affected_planes(struct intel_crtc_state *new_crtc_state)
>  	struct intel_plane *plane;
>  
>  	if (!new_crtc_state->hw.active ||
> -	    drm_atomic_crtc_needs_modeset(&new_crtc_state->uapi))
> +	    intel_crtc_needs_modeset(new_crtc_state))
>  		return 0;
>  
>  	if (new_crtc_state->gamma_enable == old_crtc_state->gamma_enable &&
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index b9393f9fc764..2d91c59a827d 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -5930,7 +5930,7 @@ int intel_modeset_all_pipes(struct intel_atomic_state *state,
>  			return PTR_ERR(crtc_state);
>  
>  		if (!crtc_state->hw.active ||
> -		    drm_atomic_crtc_needs_modeset(&crtc_state->uapi))
> +		    intel_crtc_needs_modeset(crtc_state))
>  			continue;
>  
>  		drm_dbg_kms(&dev_priv->drm, "[CRTC:%d:%s] Full modeset due to %s\n",
> diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
> index 3f24f326b989..b5ee5ea0d010 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbc.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbc.c
> @@ -1183,7 +1183,7 @@ static bool intel_fbc_can_flip_nuke(struct intel_atomic_state *state,
>  	const struct drm_framebuffer *old_fb = old_plane_state->hw.fb;
>  	const struct drm_framebuffer *new_fb = new_plane_state->hw.fb;
>  
> -	if (drm_atomic_crtc_needs_modeset(&new_crtc_state->uapi))
> +	if (intel_crtc_needs_modeset(new_crtc_state))
>  		return false;
>  
>  	if (!intel_fbc_is_ok(old_plane_state) ||
> diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c b/drivers/gpu/drm/i915/display/skl_watermark.c
> index d58e667016e4..e0766d1be966 100644
> --- a/drivers/gpu/drm/i915/display/skl_watermark.c
> +++ b/drivers/gpu/drm/i915/display/skl_watermark.c
> @@ -2744,7 +2744,7 @@ static int skl_wm_add_affected_planes(struct intel_atomic_state *state,
>  		 * power well the hardware state will go out of sync
>  		 * with the software state.
>  		 */
> -		if (!drm_atomic_crtc_needs_modeset(&new_crtc_state->uapi) &&
> +		if (!intel_crtc_needs_modeset(new_crtc_state) &&
>  		    skl_plane_selected_wm_equals(plane,
>  						 &old_crtc_state->wm.skl.optimal,
>  						 &new_crtc_state->wm.skl.optimal))
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index ee34e2785636..73c88b1c9545 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -1426,7 +1426,7 @@ static int g4x_compute_intermediate_wm(struct intel_atomic_state *state,
>  	enum plane_id plane_id;
>  
>  	if (!new_crtc_state->hw.active ||
> -	    drm_atomic_crtc_needs_modeset(&new_crtc_state->uapi)) {
> +	    intel_crtc_needs_modeset(new_crtc_state)) {
>  		*intermediate = *optimal;
>  
>  		intermediate->cxsr = false;
> @@ -1914,7 +1914,6 @@ static int vlv_compute_pipe_wm(struct intel_atomic_state *state,
>  {
>  	struct intel_crtc_state *crtc_state =
>  		intel_atomic_get_new_crtc_state(state, crtc);
> -	bool needs_modeset = drm_atomic_crtc_needs_modeset(&crtc_state->uapi);
>  	const struct intel_plane_state *old_plane_state;
>  	const struct intel_plane_state *new_plane_state;
>  	struct intel_plane *plane;
> @@ -1941,7 +1940,7 @@ static int vlv_compute_pipe_wm(struct intel_atomic_state *state,
>  	 * FIFO setting we took over from the BIOS even if there
>  	 * are no active planes on the crtc.
>  	 */
> -	if (needs_modeset)
> +	if (intel_crtc_needs_modeset(crtc_state))
>  		dirty = ~0;
>  
>  	if (!dirty)
> @@ -1961,7 +1960,7 @@ static int vlv_compute_pipe_wm(struct intel_atomic_state *state,
>  		if (ret)
>  			return ret;
>  
> -		if (needs_modeset ||
> +		if (intel_crtc_needs_modeset(crtc_state) ||
>  		    memcmp(old_fifo_state, new_fifo_state,
>  			   sizeof(*new_fifo_state)) != 0)
>  			crtc_state->fifo_changed = true;
> @@ -2084,7 +2083,7 @@ static int vlv_compute_intermediate_wm(struct intel_atomic_state *state,
>  	int level;
>  
>  	if (!new_crtc_state->hw.active ||
> -	    drm_atomic_crtc_needs_modeset(&new_crtc_state->uapi)) {
> +	    intel_crtc_needs_modeset(new_crtc_state)) {
>  		*intermediate = *optimal;
>  
>  		intermediate->cxsr = false;
> @@ -3142,7 +3141,7 @@ static int ilk_compute_intermediate_wm(struct intel_atomic_state *state,
>  	 */
>  	*a = new_crtc_state->wm.ilk.optimal;
>  	if (!new_crtc_state->hw.active ||
> -	    drm_atomic_crtc_needs_modeset(&new_crtc_state->uapi) ||
> +	    intel_crtc_needs_modeset(new_crtc_state) ||
>  	    state->skip_intermediate_wm)
>  		return 0;

-- 
Jani Nikula, Intel Open Source Graphics Center

      parent reply	other threads:[~2022-11-01 10:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-31 21:40 [Intel-gfx] [PATCH 1/2] drm/i915: Use intel_crtc_needs_modeset() more Ville Syrjala
2022-10-31 21:40 ` [Intel-gfx] [PATCH 2/2] drm/i915: Switch intel_connector_needs_modeset() to drm types Ville Syrjala
2022-11-01 10:55   ` Jani Nikula
2022-10-31 22:07 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915: Use intel_crtc_needs_modeset() more Patchwork
2022-10-31 22:07 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-10-31 22:07 ` [Intel-gfx] ✗ Fi.CI.DOCS: " Patchwork
2022-10-31 22:26 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-10-31 23:48 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-11-01 10:08 ` Jani Nikula [this message]

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=87o7tr7zs3.fsf@intel.com \
    --to=jani.nikula@linux.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 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.