[Intel-gfx] [PATCH 1/4] drm/i915: Dump in-flight plane state while dumping in-flight CRTC state
Matt Roper
matthew.d.roper at intel.com
Thu Nov 12 16:31:56 PST 2015
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 at 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
More information about the Intel-gfx
mailing list