All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Jani Nikula <jani.nikula@intel.com>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: [Intel-gfx] [PATCH 4/4] drm/i915: Fix DSI TE max_vblank_count handling
Date: Thu,  4 Mar 2021 19:04:21 +0200	[thread overview]
Message-ID: <20210304170421.10901-5-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20210304170421.10901-1-ville.syrjala@linux.intel.com>

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

commit 33267703df15 ("drm/i915/dsi: Enable software vblank counter")
claims to get the mode_flags from the crtc_state, but in fact does
not. Fix it to do it right.

Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_crtc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_crtc.c b/drivers/gpu/drm/i915/display/intel_crtc.c
index 34ff40852a37..7dcbec3a3ca5 100644
--- a/drivers/gpu/drm/i915/display/intel_crtc.c
+++ b/drivers/gpu/drm/i915/display/intel_crtc.c
@@ -53,8 +53,6 @@ u32 intel_crtc_get_vblank_counter(struct intel_crtc *crtc)
 u32 intel_crtc_max_vblank_count(const struct intel_crtc_state *crtc_state)
 {
 	struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev);
-	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
-	u32 mode_flags = crtc->mode_flags;
 
 	/*
 	 * From Gen 11, In case of dsi cmd mode, frame counter wouldnt
@@ -62,7 +60,8 @@ u32 intel_crtc_max_vblank_count(const struct intel_crtc_state *crtc_state)
 	 * the hw counter, then we would find it updated in only
 	 * the next TE, hence switching to sw counter.
 	 */
-	if (mode_flags & (I915_MODE_FLAG_DSI_USE_TE0 | I915_MODE_FLAG_DSI_USE_TE1))
+	if (crtc_state->mode_flags & (I915_MODE_FLAG_DSI_USE_TE0 |
+				      I915_MODE_FLAG_DSI_USE_TE1))
 		return 0;
 
 	/*
-- 
2.26.2

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

  parent reply	other threads:[~2021-03-04 17:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-04 17:04 [Intel-gfx] [PATCH 0/4] drm/i915: Silence pipe tracepoint WARNs Ville Syrjala
2021-03-04 17:04 ` [Intel-gfx] [PATCH 1/4] drm/i915: Move pipe enable/disable tracepoints to intel_crtc_vblank_{on, off}() Ville Syrjala
2021-03-04 17:04 ` [Intel-gfx] [PATCH 2/4] drm/i915: Don't try to query the frame counter for disabled pipes Ville Syrjala
2021-03-04 17:04 ` [Intel-gfx] [PATCH 3/4] drm/i915: Return zero as the scanline " Ville Syrjala
2021-03-04 17:04 ` Ville Syrjala [this message]
2021-03-04 17:43 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Silence pipe tracepoint WARNs Patchwork
2021-03-04 19:20 ` [Intel-gfx] [PATCH 0/4] " Steven Rostedt
2021-03-05 15:38   ` Ville Syrjälä
2021-03-04 23:51 ` [Intel-gfx] ✗ Fi.CI.IGT: failure for " Patchwork
2021-03-05  8:45 ` [Intel-gfx] [PATCH 0/4] " Jani Nikula

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=20210304170421.10901-5-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=rostedt@goodmis.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.