All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH v2 03/10] drm/i915: Move assert_vblank_disabled() into intel_crtc_vblank_on()
Date: Mon, 18 Nov 2019 18:44:23 +0200	[thread overview]
Message-ID: <20191118164430.27265-4-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20191118164430.27265-1-ville.syrjala@linux.intel.com>

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Move the assert_vblank_disabled() into intel_crtc_vblank_on()
so that we don't have to inline it all over.

This does mean we now assert_vblank_disabled() during readout as well
but that is totally fine as it happens after drm_crtc_vblank_reset().
One can even argue it's what we want to do anyway to make sure
the reset actually happened.

Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index bf7faaf061a3..854ccca2bf6e 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -1838,6 +1838,7 @@ static void intel_crtc_vblank_on(const struct intel_crtc_state *crtc_state)
 {
 	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
 
+	assert_vblank_disabled(&crtc->base);
 	drm_crtc_set_max_vblank_count(&crtc->base,
 				      intel_crtc_max_vblank_count(crtc_state));
 	drm_crtc_vblank_on(&crtc->base);
@@ -6547,7 +6548,6 @@ static void ironlake_crtc_enable(struct intel_crtc_state *pipe_config,
 	if (pipe_config->has_pch_encoder)
 		ironlake_pch_enable(state, pipe_config);
 
-	assert_vblank_disabled(crtc);
 	intel_crtc_vblank_on(pipe_config);
 
 	intel_encoders_enable(state, intel_crtc);
@@ -6713,7 +6713,6 @@ static void haswell_crtc_enable(struct intel_crtc_state *pipe_config,
 	if (pipe_config->has_pch_encoder)
 		lpt_pch_enable(state, pipe_config);
 
-	assert_vblank_disabled(crtc);
 	intel_crtc_vblank_on(pipe_config);
 
 	intel_encoders_enable(state, intel_crtc);
@@ -7089,7 +7088,6 @@ static void valleyview_crtc_enable(struct intel_crtc_state *pipe_config,
 	dev_priv->display.initial_watermarks(state, pipe_config);
 	intel_enable_pipe(pipe_config);
 
-	assert_vblank_disabled(crtc);
 	intel_crtc_vblank_on(pipe_config);
 
 	intel_encoders_enable(state, intel_crtc);
@@ -7149,7 +7147,6 @@ static void i9xx_crtc_enable(struct intel_crtc_state *pipe_config,
 		intel_update_watermarks(intel_crtc);
 	intel_enable_pipe(pipe_config);
 
-	assert_vblank_disabled(crtc);
 	intel_crtc_vblank_on(pipe_config);
 
 	intel_encoders_enable(state, intel_crtc);
-- 
2.23.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

WARNING: multiple messages have this Message-ID (diff)
From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH v2 03/10] drm/i915: Move assert_vblank_disabled() into intel_crtc_vblank_on()
Date: Mon, 18 Nov 2019 18:44:23 +0200	[thread overview]
Message-ID: <20191118164430.27265-4-ville.syrjala@linux.intel.com> (raw)
Message-ID: <20191118164423.GnKH6sfO6hDxnb4DUY2fLjglfveNYFGBzgXd_OeZxLw@z> (raw)
In-Reply-To: <20191118164430.27265-1-ville.syrjala@linux.intel.com>

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Move the assert_vblank_disabled() into intel_crtc_vblank_on()
so that we don't have to inline it all over.

This does mean we now assert_vblank_disabled() during readout as well
but that is totally fine as it happens after drm_crtc_vblank_reset().
One can even argue it's what we want to do anyway to make sure
the reset actually happened.

Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index bf7faaf061a3..854ccca2bf6e 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -1838,6 +1838,7 @@ static void intel_crtc_vblank_on(const struct intel_crtc_state *crtc_state)
 {
 	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
 
+	assert_vblank_disabled(&crtc->base);
 	drm_crtc_set_max_vblank_count(&crtc->base,
 				      intel_crtc_max_vblank_count(crtc_state));
 	drm_crtc_vblank_on(&crtc->base);
@@ -6547,7 +6548,6 @@ static void ironlake_crtc_enable(struct intel_crtc_state *pipe_config,
 	if (pipe_config->has_pch_encoder)
 		ironlake_pch_enable(state, pipe_config);
 
-	assert_vblank_disabled(crtc);
 	intel_crtc_vblank_on(pipe_config);
 
 	intel_encoders_enable(state, intel_crtc);
@@ -6713,7 +6713,6 @@ static void haswell_crtc_enable(struct intel_crtc_state *pipe_config,
 	if (pipe_config->has_pch_encoder)
 		lpt_pch_enable(state, pipe_config);
 
-	assert_vblank_disabled(crtc);
 	intel_crtc_vblank_on(pipe_config);
 
 	intel_encoders_enable(state, intel_crtc);
@@ -7089,7 +7088,6 @@ static void valleyview_crtc_enable(struct intel_crtc_state *pipe_config,
 	dev_priv->display.initial_watermarks(state, pipe_config);
 	intel_enable_pipe(pipe_config);
 
-	assert_vblank_disabled(crtc);
 	intel_crtc_vblank_on(pipe_config);
 
 	intel_encoders_enable(state, intel_crtc);
@@ -7149,7 +7147,6 @@ static void i9xx_crtc_enable(struct intel_crtc_state *pipe_config,
 		intel_update_watermarks(intel_crtc);
 	intel_enable_pipe(pipe_config);
 
-	assert_vblank_disabled(crtc);
 	intel_crtc_vblank_on(pipe_config);
 
 	intel_encoders_enable(state, intel_crtc);
-- 
2.23.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-11-18 16:44 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-18 16:44 [PATCH v2 00/10] drm/i915: Cleanups around .crtc_enable/disable() Ville Syrjala
2019-11-18 16:44 ` [Intel-gfx] " Ville Syrjala
2019-11-18 16:44 ` [PATCH v2 01/10] drm/i915: Change intel_encoders_<hook>() calling convention Ville Syrjala
2019-11-18 16:44   ` [Intel-gfx] " Ville Syrjala
2019-11-18 16:44 ` [PATCH v2 02/10] drm/i915: Add intel_crtc_vblank_off() Ville Syrjala
2019-11-18 16:44   ` [Intel-gfx] " Ville Syrjala
2019-11-18 16:44 ` Ville Syrjala [this message]
2019-11-18 16:44   ` [Intel-gfx] [PATCH v2 03/10] drm/i915: Move assert_vblank_disabled() into intel_crtc_vblank_on() Ville Syrjala
2019-11-18 16:44 ` [PATCH v2 04/10] drm/i915: Move crtc_state to tighter scope Ville Syrjala
2019-11-18 16:44   ` [Intel-gfx] " Ville Syrjala
2019-11-18 16:44 ` [PATCH v2 05/10] drm/i915: Pass intel_crtc to ironlake_fdi_disable() Ville Syrjala
2019-11-18 16:44   ` [Intel-gfx] " Ville Syrjala
2019-11-18 16:44 ` [PATCH v2 06/10] drm/i915: Change watermark hook calling convention Ville Syrjala
2019-11-18 16:44   ` [Intel-gfx] " Ville Syrjala
2019-11-18 16:44 ` [PATCH v2 07/10] drm/i915: Pass dev_priv to cpt_verify_modeset() Ville Syrjala
2019-11-18 16:44   ` [Intel-gfx] " Ville Syrjala
2019-11-18 16:44 ` [PATCH v2 08/10] drm/i915: s/intel_crtc/crtc/ in .crtc_enable() and .crtc_disable() Ville Syrjala
2019-11-18 16:44   ` [Intel-gfx] " Ville Syrjala
2019-11-18 16:44 ` [PATCH v2 09/10] drm/i915: s/pipe_config/new_crtc_state/ in .crtc_enable() Ville Syrjala
2019-11-18 16:44   ` [Intel-gfx] " Ville Syrjala
2019-11-18 16:44 ` [PATCH v2 10/10] drm/i915: Change .crtc_enable/disable() calling convention Ville Syrjala
2019-11-18 16:44   ` [Intel-gfx] " Ville Syrjala
2019-11-18 20:00 ` ✗ Fi.CI.BAT: failure for drm/i915: Cleanups around .crtc_enable/disable() (rev3) Patchwork
2019-11-18 20:00   ` [Intel-gfx] " Patchwork
2019-11-19 14:27   ` Ville Syrjälä
2019-11-19 14:27     ` [Intel-gfx] " Ville Syrjälä
2019-11-19 15:22 ` ✓ Fi.CI.BAT: success for drm/i915: Cleanups around .crtc_enable/disable() (rev4) Patchwork
2019-11-19 15:22   ` [Intel-gfx] " Patchwork
2019-11-20  0:02 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-11-20  0:02   ` [Intel-gfx] " 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=20191118164430.27265-4-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@linux.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.