public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/4] drm/i915: Dump in-flight plane state while dumping in-flight CRTC state
@ 2015-11-13  0:31 Matt Roper
  2015-11-13  0:31 ` [PATCH 2/4] drm/i915: Clarify plane state during CRTC state dumps Matt Roper
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Matt Roper @ 2015-11-13  0:31 UTC (permalink / raw)
  To: intel-gfx

The intel_dump_pipe_config() always dumps the currently active plane
state for each plane on a CRTC.  If we're calling this function to dump
CRTC state that is in-flight (not yet active), then this mismatch can be
misleading and confusing.  Let's pay attention to whether the state
we're dumping is part of an in-flight transaction (because
crtc_state->state is non-NULL); if it is, we'll dump the corresponding
in-flight plane state instead of the active state.

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index b5f7493..7bbcb98 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -12074,11 +12074,23 @@ static void intel_dump_pipe_config(struct intel_crtc *crtc,
 
 	DRM_DEBUG_KMS("planes on this crtc\n");
 	list_for_each_entry(plane, &dev->mode_config.plane_list, head) {
+		struct drm_plane_state *ps = NULL;
+
 		intel_plane = to_intel_plane(plane);
 		if (intel_plane->pipe != crtc->pipe)
 			continue;
 
-		state = to_intel_plane_state(plane->state);
+		/* Get in-flight plane state, if any */
+		if (pipe_config->base.state)
+			ps = drm_atomic_get_existing_plane_state(pipe_config->base.state,
+								 plane);
+
+		/* If no in-flight state, use active state instead */
+		if (!ps)
+			ps = plane->state;
+
+		state = to_intel_plane_state(ps);
+
 		fb = state->base.fb;
 		if (!fb) {
 			DRM_DEBUG_KMS("%s PLANE:%d plane: %u.%u idx: %d "
-- 
2.1.4

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-11-13 16:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-13  0:31 [PATCH 1/4] drm/i915: Dump in-flight plane state while dumping in-flight CRTC state Matt Roper
2015-11-13  0:31 ` [PATCH 2/4] drm/i915: Clarify plane state during CRTC state dumps Matt Roper
2015-11-13 16:31   ` Ville Syrjälä
2015-11-13  0:31 ` [PATCH 3/4] drm/i915: Dump pipe config after initial FB is reconstructed Matt Roper
2015-11-13 16:44   ` Ville Syrjälä
2015-11-13  0:31 ` [PATCH 4/4] drm/i915: Setup clipped src/dest coordinates during FB reconstruction Matt Roper
2015-11-13 16:40   ` Ville Syrjälä

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox