Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Govindapillai, Vinod" <vinod.govindapillai@intel.com>
To: "ville.syrjala@linux.intel.com" <ville.syrjala@linux.intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 05/19] drm/i915: Extract intel_cdclk_crtc_disable_noatomic()
Date: Sun, 2 Mar 2025 18:00:52 +0000	[thread overview]
Message-ID: <6b20b9ec2845c66b5a5d5b9dff349b95ac583728.camel@intel.com> (raw)
In-Reply-To: <20250218211913.27867-6-ville.syrjala@linux.intel.com>

On Tue, 2025-02-18 at 23:18 +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Hoist the cdclk stuff into a separate function from
> intel_crtc_disable_noatomic_complete() so that the details
> are better hidden inside intel_cdclk.c.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_cdclk.c         | 12 ++++++++++++
>  drivers/gpu/drm/i915/display/intel_cdclk.h         |  2 ++
>  drivers/gpu/drm/i915/display/intel_modeset_setup.c |  6 +-----
>  3 files changed, 15 insertions(+), 5 deletions(-)
> 

Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>

> diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c
> b/drivers/gpu/drm/i915/display/intel_cdclk.c
> index c6cfc57a0346..4b7058e65588 100644
> --- a/drivers/gpu/drm/i915/display/intel_cdclk.c
> +++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
> @@ -3340,6 +3340,18 @@ int intel_modeset_calc_cdclk(struct intel_atomic_state *state)
>  	return 0;
>  }
>  
> +void intel_cdclk_crtc_disable_noatomic(struct intel_crtc *crtc)
> +{
> +	struct intel_display *display = to_intel_display(crtc);
> +	struct intel_cdclk_state *cdclk_state =
> +		to_intel_cdclk_state(display->cdclk.obj.state);
> +	enum pipe pipe = crtc->pipe;
> +
> +	cdclk_state->min_cdclk[pipe] = 0;
> +	cdclk_state->min_voltage_level[pipe] = 0;
> +	cdclk_state->active_pipes &= ~BIT(pipe);
> +}
> +
>  static int intel_compute_max_dotclk(struct intel_display *display)
>  {
>  	int ppc = intel_cdclk_ppc(display, HAS_DOUBLE_WIDE(display));
> diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.h
> b/drivers/gpu/drm/i915/display/intel_cdclk.h
> index 6b0e7a41eba3..689e12e2196b 100644
> --- a/drivers/gpu/drm/i915/display/intel_cdclk.h
> +++ b/drivers/gpu/drm/i915/display/intel_cdclk.h
> @@ -12,6 +12,7 @@
>  #include "intel_global_state.h"
>  
>  struct intel_atomic_state;
> +struct intel_crtc;
>  struct intel_crtc_state;
>  struct intel_display;
>  
> @@ -83,6 +84,7 @@ int intel_cdclk_atomic_check(struct intel_atomic_state *state,
>  int intel_cdclk_state_set_joined_mbus(struct intel_atomic_state *state, bool joined_mbus);
>  struct intel_cdclk_state *
>  intel_atomic_get_cdclk_state(struct intel_atomic_state *state);
> +void intel_cdclk_crtc_disable_noatomic(struct intel_crtc *crtc);
>  
>  #define to_intel_cdclk_state(global_state) \
>  	container_of_const((global_state), struct intel_cdclk_state, base)
> diff --git a/drivers/gpu/drm/i915/display/intel_modeset_setup.c
> b/drivers/gpu/drm/i915/display/intel_modeset_setup.c
> index a5a00b3ce98f..826998909045 100644
> --- a/drivers/gpu/drm/i915/display/intel_modeset_setup.c
> +++ b/drivers/gpu/drm/i915/display/intel_modeset_setup.c
> @@ -158,8 +158,6 @@ static void intel_crtc_disable_noatomic_complete(struct intel_crtc *crtc)
>  	struct drm_i915_private *i915 = to_i915(crtc->base.dev);
>  	struct intel_bw_state *bw_state =
>  		to_intel_bw_state(i915->display.bw.obj.state);
> -	struct intel_cdclk_state *cdclk_state =
> -		to_intel_cdclk_state(i915->display.cdclk.obj.state);
>  	struct intel_dbuf_state *dbuf_state =
>  		to_intel_dbuf_state(i915->display.dbuf.obj.state);
>  	struct intel_pmdemand_state *pmdemand_state =
> @@ -179,9 +177,7 @@ static void intel_crtc_disable_noatomic_complete(struct intel_crtc *crtc)
>  
>  	intel_display_power_put_all_in_set(display, &crtc->enabled_power_domains);
>  
> -	cdclk_state->min_cdclk[pipe] = 0;
> -	cdclk_state->min_voltage_level[pipe] = 0;
> -	cdclk_state->active_pipes &= ~BIT(pipe);
> +	intel_cdclk_crtc_disable_noatomic(crtc);
>  
>  	dbuf_state->active_pipes &= ~BIT(pipe);
>  


  reply	other threads:[~2025-03-02 18:01 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-18 21:18 [PATCH 00/19] drm/i915: cdclk/bw/dbuf readout/sanitation cleanup Ville Syrjala
2025-02-18 21:18 ` [PATCH 01/19] drm/i915/cdclk: Do cdclk post plane programming later Ville Syrjala
2025-02-25 21:19   ` Govindapillai, Vinod
2025-02-18 21:18 ` [PATCH 02/19] drm/i915: Drop redundant shared_dpll=NULL assignments Ville Syrjala
2025-02-25 21:32   ` Govindapillai, Vinod
2025-02-18 21:18 ` [PATCH 03/19] drm/i915: Don't clobber crtc_state->cpu_transcoder for inactive crtcs Ville Syrjala
2025-03-02 17:28   ` Govindapillai, Vinod
2025-02-18 21:18 ` [PATCH 04/19] drm/i915: Use intel_plane_set_invisible() in intel_plane_disable_noatomic() Ville Syrjala
2025-03-02 17:57   ` Govindapillai, Vinod
2025-02-18 21:18 ` [PATCH 05/19] drm/i915: Extract intel_cdclk_crtc_disable_noatomic() Ville Syrjala
2025-03-02 18:00   ` Govindapillai, Vinod [this message]
2025-02-18 21:19 ` [PATCH 06/19] drm/i915: Extract skl_wm_crtc_disable_noatomic() Ville Syrjala
2025-03-02 18:06   ` Govindapillai, Vinod
2025-02-18 21:19 ` [PATCH 07/19] drm/i915: clean up pipe's ddb usage in intel_crtc_disable_noatomic() Ville Syrjala
2025-03-02 18:19   ` Govindapillai, Vinod
2025-02-18 21:19 ` [PATCH 08/19] drm/i915: Add skl_wm_plane_disable_noatomic() Ville Syrjala
2025-03-04 13:47   ` Govindapillai, Vinod
2025-02-18 21:19 ` [PATCH 09/19] drm/i915: Extract intel_bw_crtc_disable_noatomic() Ville Syrjala
2025-03-04 13:49   ` Govindapillai, Vinod
2025-02-18 21:19 ` [PATCH 10/19] drm/i915: Extract intel_cdclk_update_hw_state() Ville Syrjala
2025-03-04 14:04   ` Govindapillai, Vinod
2025-03-06 15:46     ` Ville Syrjälä
2025-02-18 21:19 ` [PATCH 11/19] drm/i915: Extract intel_bw_update_hw_state() Ville Syrjala
2025-03-04 14:08   ` Govindapillai, Vinod
2025-02-18 21:19 ` [PATCH 12/19] drm/i915: Update bw_state->active_pipes during readout Ville Syrjala
2025-03-04 14:10   ` Govindapillai, Vinod
2025-02-18 21:19 ` [PATCH 13/19] drm/i915: Skip some bw_state readout on pre-icl Ville Syrjala
2025-03-04 14:20   ` Govindapillai, Vinod
2025-03-06 16:01     ` Ville Syrjälä
2025-02-18 21:19 ` [PATCH 14/19] sem/i915: Simplify intel_cdclk_update_hw_state() Ville Syrjala
2025-03-04 14:25   ` Govindapillai, Vinod
2025-02-18 21:19 ` [PATCH 15/19] drm/i915: Simplify cdclk_disable_noatomic() Ville Syrjala
2025-03-04 15:04   ` Govindapillai, Vinod
2025-03-04 15:22     ` Govindapillai, Vinod
2025-03-06 16:10     ` Ville Syrjälä
2025-02-18 21:19 ` [PATCH 16/19] drm/i915: Split wm sanitize from readout Ville Syrjala
2025-03-04 15:10   ` Govindapillai, Vinod
2025-02-18 21:19 ` [PATCH 17/19] drm/i915: Do wm readout ealier for skl+ Ville Syrjala
2025-03-04 15:10   ` Govindapillai, Vinod
2025-02-18 21:19 ` [PATCH 18/19] drm/i915: Move dbuf_state->active_piepes into skl_wm_get_hw_state() Ville Syrjala
2025-03-04 15:12   ` Govindapillai, Vinod
2025-02-18 21:19 ` [PATCH 19/19] drm/i915: Relocate intel_bw_crtc_update() Ville Syrjala
2025-03-04 15:12   ` Govindapillai, Vinod
2025-02-18 22:51 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: cdclk/bw/dbuf readout/sanitation cleanup Patchwork
2025-02-18 22:51 ` ✗ Fi.CI.SPARSE: " Patchwork
2025-02-18 23:04 ` ✓ i915.CI.BAT: success " Patchwork
2025-02-19  1:24 ` ✗ i915.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=6b20b9ec2845c66b5a5d5b9dff349b95ac583728.camel@intel.com \
    --to=vinod.govindapillai@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