All of lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH v4 05/14] drm/i915: Separate intel_crtc_disable_noatomic_begin/complete()
Date: Wed, 10 May 2023 13:31:22 +0300	[thread overview]
Message-ID: <20230510103131.1618266-6-imre.deak@intel.com> (raw)
In-Reply-To: <20230510103131.1618266-1-imre.deak@intel.com>

Split calling the CRTC/encoder disabling hooks and updating the CRTC and
DPLL object states from updating the CRTC and atomic state and other
global state (BW, CDCLK, DBUF) into separate functions. When disabling a
bigjoiner configuration the latter step can be done only after all the
linked pipes are disabled, so this change prepares for that.

No functional changes.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 .../drm/i915/display/intel_modeset_setup.c    | 34 +++++++++++++------
 1 file changed, 24 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_modeset_setup.c b/drivers/gpu/drm/i915/display/intel_modeset_setup.c
index 66796e8eef90a..2c93f4c5dc8cf 100644
--- a/drivers/gpu/drm/i915/display/intel_modeset_setup.c
+++ b/drivers/gpu/drm/i915/display/intel_modeset_setup.c
@@ -30,23 +30,15 @@
 #include "intel_wm.h"
 #include "skl_watermark.h"
 
-static void intel_crtc_disable_noatomic(struct intel_crtc *crtc,
-					struct drm_modeset_acquire_ctx *ctx)
+static void intel_crtc_disable_noatomic_begin(struct intel_crtc *crtc,
+					      struct drm_modeset_acquire_ctx *ctx)
 {
-	struct intel_encoder *encoder;
 	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_crtc_state *crtc_state =
 		to_intel_crtc_state(crtc->base.state);
 	struct intel_plane *plane;
 	struct drm_atomic_state *state;
 	struct intel_crtc_state *temp_crtc_state;
-	enum pipe pipe = crtc->pipe;
 	int ret;
 
 	if (!crtc_state->hw.active)
@@ -92,6 +84,21 @@ static void intel_crtc_disable_noatomic(struct intel_crtc *crtc,
 		intel_unreference_shared_dpll_crtc(crtc,
 						   crtc_state->shared_dpll,
 						   &crtc_state->shared_dpll->state);
+}
+
+static void intel_crtc_disable_noatomic_complete(struct intel_crtc *crtc)
+{
+	struct intel_encoder *encoder;
+	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_crtc_state *crtc_state =
+		to_intel_crtc_state(crtc->base.state);
+	enum pipe pipe = crtc->pipe;
 
 	__drm_atomic_helper_crtc_destroy_state(&crtc_state->uapi);
 	intel_crtc_free_hw_state(crtc_state);
@@ -115,6 +122,13 @@ static void intel_crtc_disable_noatomic(struct intel_crtc *crtc,
 	bw_state->num_active_planes[pipe] = 0;
 }
 
+static void intel_crtc_disable_noatomic(struct intel_crtc *crtc,
+					struct drm_modeset_acquire_ctx *ctx)
+{
+	intel_crtc_disable_noatomic_begin(crtc, ctx);
+	intel_crtc_disable_noatomic_complete(crtc);
+}
+
 static void intel_modeset_update_connector_atomic_state(struct drm_i915_private *i915)
 {
 	struct intel_connector *connector;
-- 
2.37.2


  parent reply	other threads:[~2023-05-10 10:31 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-10 10:31 [Intel-gfx] [PATCH v4 00/14] drm/i915/tc: Add a workaround for an IOM/TCSS firmware hang issue Imre Deak
2023-05-10 10:31 ` [Intel-gfx] [PATCH v4 01/14] drm/i915: Fix PIPEDMC disabling for a bigjoiner configuration Imre Deak
2023-05-30 13:49   ` [v4,01/14] " Rudi Heitbaum
2023-05-30 13:49     ` [Intel-gfx] [v4, 01/14] " Rudi Heitbaum
2023-05-30 13:49     ` [v4,01/14] " Rudi Heitbaum
2023-05-31  8:47     ` Imre Deak
2023-05-31  8:47       ` Imre Deak
2023-05-31  8:47       ` [Intel-gfx] [v4, 01/14] " Imre Deak
2023-05-31 11:31       ` [v4,01/14] " Rudi Heitbaum
2023-05-31 11:31         ` [Intel-gfx] [v4, 01/14] " Rudi Heitbaum
2023-05-31 11:31         ` Rudi Heitbaum
2023-05-10 10:31 ` [Intel-gfx] [PATCH v4 02/14] drm/i915: Add helpers to reference/unreference a DPLL for a CRTC Imre Deak
2023-05-10 10:31 ` [Intel-gfx] [PATCH v4 03/14] drm/i915: Make the CRTC state consistent during sanitize-disabling Imre Deak
2023-05-10 10:31 ` [Intel-gfx] [PATCH v4 04/14] drm/i915: Update connector atomic state before crtc sanitize-disabling Imre Deak
2023-05-10 10:31 ` Imre Deak [this message]
2023-05-10 10:31 ` [Intel-gfx] [PATCH v4 06/14] drm/i915: Factor out set_encoder_for_connector() Imre Deak
2023-05-10 10:31 ` [Intel-gfx] [PATCH v4 07/14] drm/i915: Add support for disabling any CRTCs during HW readout/sanitization Imre Deak
2023-05-10 10:31 ` [Intel-gfx] [PATCH v4 08/14] drm/i915/dp: Add link training debug and error printing helpers Imre Deak
2023-05-10 10:31 ` [Intel-gfx] [PATCH v4 09/14] drm/i915/dp: Convert link training error to debug message on disconnected sink Imre Deak
2023-05-10 10:31 ` [Intel-gfx] [PATCH v4 10/14] drm/i915/dp: Prevent link training fallback on disconnected port Imre Deak
2023-05-10 10:31 ` [Intel-gfx] [PATCH v4 11/14] drm/i915/dp: Factor out intel_dp_get_active_pipes() Imre Deak
2023-05-10 10:31 ` [Intel-gfx] [PATCH v4 12/14] drm/i915: Factor out a helper for handling atomic modeset locks/state Imre Deak
2023-05-10 10:31 ` [Intel-gfx] [PATCH v4 13/14] drm/i915/tc: Call TypeC port flush_work/cleanup without modeset locks held Imre Deak
2023-05-10 14:03   ` Ville Syrjälä
2023-05-10 14:10     ` Imre Deak
2023-05-11 17:40       ` Ville Syrjälä
2023-05-12 13:38         ` Imre Deak
2023-05-12 19:55   ` [Intel-gfx] [PATCH v5 " Imre Deak
2023-05-10 10:31 ` [Intel-gfx] [PATCH v4 14/14] drm/i915/tc: Reset TypeC PHYs left enabled in DP-alt mode after the sink disconnects Imre Deak
2023-05-11 19:21   ` Ville Syrjälä
2023-05-12 13:50     ` Imre Deak
2023-05-12 19:55   ` [Intel-gfx] [PATCH v5 " Imre Deak
2023-05-10 11:13 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/tc: Add a workaround for an IOM/TCSS firmware hang issue (rev11) Patchwork
2023-05-10 11:13 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-05-10 11:18 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-05-10 13:52 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-05-12 21:17 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/tc: Add a workaround for an IOM/TCSS firmware hang issue (rev13) Patchwork
2023-05-12 21:17 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-05-12 21:31 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-05-13  1:08 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2023-05-16 14:06   ` Imre Deak

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=20230510103131.1618266-6-imre.deak@intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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.