All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH v2 5/6] drm/i915: Enable FIFO underrun reporting after initial fastset, v2.
Date: Thu,  9 Nov 2017 17:24:57 +0100	[thread overview]
Message-ID: <20171109162458.50681-5-maarten.lankhorst@linux.intel.com> (raw)
In-Reply-To: <20171109162458.50681-1-maarten.lankhorst@linux.intel.com>

The firmware may have set up the pipe correctly, but the FIFO
underrun and CRC interrupts are likely not enabled.

This resulted in debugfs_test.read_all_entries failing on haswell,
because of a timeout when reading the crc debugfs entry.

Solve this by enabling FIFO underrun reporting after the initial
fastset, which lets interrupts be generated as expected.

Changes since v1:
- Always enable CPU FIFO underrun reporting for >GEN2,
  and handle GEN2 correctly.

Testcase: debugfs_test.read_all_entries
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 3af1e3f74dbb..58bce253f4a8 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -12905,6 +12905,7 @@ static void intel_begin_crtc_commit(struct drm_crtc *crtc,
 static void intel_finish_crtc_commit(struct drm_crtc *crtc,
 				     struct drm_crtc_state *old_crtc_state)
 {
+	struct drm_i915_private *dev_priv = to_i915(crtc->dev);
 	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
 	struct intel_atomic_state *old_intel_state =
 		to_intel_atomic_state(old_crtc_state->state);
@@ -12912,6 +12913,17 @@ static void intel_finish_crtc_commit(struct drm_crtc *crtc,
 		intel_atomic_get_new_crtc_state(old_intel_state, intel_crtc);
 
 	intel_pipe_update_end(new_crtc_state);
+
+	if (new_crtc_state->update_pipe &&
+	    !needs_modeset(&new_crtc_state->base) &&
+	    old_crtc_state->mode.private_flags & I915_MODE_FLAG_INHERITED) {
+		if (!IS_GEN2(dev_priv) ||
+		    new_crtc_state->active_planes & BIT(PLANE_PRIMARY))
+			intel_set_cpu_fifo_underrun_reporting(dev_priv, intel_crtc->pipe, true);
+
+		if (new_crtc_state->has_pch_encoder && !HAS_DDI(dev_priv))
+			intel_set_pch_fifo_underrun_reporting(dev_priv, intel_crtc->pipe, true);
+	}
 }
 
 /**
-- 
2.15.0

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

  parent reply	other threads:[~2017-11-09 16:25 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-09 16:24 [PATCH v2 1/6] drm/i915: Update watermark state correctly in sanitize_watermarks Maarten Lankhorst
2017-11-09 16:24 ` Maarten Lankhorst
2017-11-09 16:24 ` [PATCH v2 2/6] drm/i915: Handle adjust better in intel_pipe_config_compare Maarten Lankhorst
2017-11-09 17:04   ` Ville Syrjälä
2017-11-09 16:24 ` [PATCH v2 3/6] drm/i915: Pass crtc_state to ips toggle functions Maarten Lankhorst
2017-11-09 17:09   ` Ville Syrjälä
2017-11-09 17:31     ` Maarten Lankhorst
2017-11-09 17:51       ` Ville Syrjälä
2017-11-09 17:56         ` Maarten Lankhorst
2017-11-09 18:17           ` Ville Syrjälä
2017-11-09 16:24 ` [PATCH v2 4/6] drm/i915: Handle ips_enabled in fastset Maarten Lankhorst
2017-11-09 17:17   ` Ville Syrjälä
2017-11-09 16:24 ` Maarten Lankhorst [this message]
2017-11-09 17:15   ` [PATCH v2 5/6] drm/i915: Enable FIFO underrun reporting after initial fastset, v2 Ville Syrjälä
2017-11-10  8:02     ` Maarten Lankhorst
2017-11-10 10:40       ` Ville Syrjälä
2017-11-09 16:24 ` [PATCH v2 6/6] drm/i915: Re-enable fastboot by default Maarten Lankhorst
2017-11-09 16:45 ` ✓ Fi.CI.BAT: success for series starting with [v2,1/6] drm/i915: Update watermark state correctly in sanitize_watermarks Patchwork
2017-11-09 17:28 ` ✓ Fi.CI.IGT: " 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=20171109162458.50681-5-maarten.lankhorst@linux.intel.com \
    --to=maarten.lankhorst@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.