[Intel-gfx] [PATCH 6/6] DEBUG: drm/i915/display: Add debug information to selective fetch
José Roberto de Souza
jose.souza at intel.com
Tue Oct 13 23:01:21 UTC 2020
Just for feature development, not needed in production.
Signed-off-by: José Roberto de Souza <jose.souza at intel.com>
---
drivers/gpu/drm/i915/display/intel_psr.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index c30d7069cbaa..1b2ae3bd02ee 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -1194,11 +1194,19 @@ void intel_psr2_program_plane_sel_fetch(struct intel_plane *plane,
/* TODO: consider auxiliary surfaces */
x = plane_state->uapi.src.x1 >> 16;
- y = (plane_state->uapi.src.y1 >> 16) + clip->y1;
+ y = plane_state->uapi.src.y1 >> 16;
+ drm_info(&dev_priv->drm, "plane%c src.x=%i src.y=%i clip.y1=%i clip.y2=%i\n",
+ plane_name(plane->id), x, y, clip->y1, clip->y2);
+ drm_info(&dev_priv->drm, "\tcolor_plane[color_plane].x=%i color_plane[color_plane].y=%i\n",
+ plane_state->color_plane[color_plane].x,
+ plane_state->color_plane[color_plane].y);
+
+ y += clip->y1;
ret = skl_calc_main_surface_offset(plane_state, &x, &y, &offset);
if (ret)
drm_warn_once(&dev_priv->drm, "skl_calc_main_surface_offset() returned %i\n",
ret);
+ drm_info(&dev_priv->drm, "\tcalculated offset x=%i y=%i\n", x, y);
val = y << 16 | x;
intel_de_write_fw(dev_priv, PLANE_SEL_FETCH_OFFSET(pipe, plane->id),
val);
@@ -1335,6 +1343,8 @@ int intel_psr2_sel_fetch_update(struct intel_atomic_state *state,
pipe_dirty_areas[plane->id * 2 + 1] = new_plane_state->uapi.dst;
}
+ drm_info(state->base.dev, "intel_psr2_sel_fetch_update()\n");
+
for_each_oldnew_intel_plane_in_state(state, plane, old_plane_state,
new_plane_state, i) {
struct drm_rect *sel_fetch_area, temp;
@@ -1411,6 +1421,11 @@ int intel_psr2_sel_fetch_update(struct intel_atomic_state *state,
if (j < 0)
sel_fetch_area->y2 += j;
+ drm_info(state->base.dev, "\tplane%c y1=%i y2=%i dst.y1=%i dst.y2=%i\n",
+ plane_name(plane->id), sel_fetch_area->y1,
+ sel_fetch_area->y2, new_plane_state->uapi.dst.y1,
+ new_plane_state->uapi.dst.y2);
+
temp = *sel_fetch_area;
temp.y1 += new_plane_state->uapi.dst.y1 >> 16;
temp.y2 += new_plane_state->uapi.dst.y1 >> 16;
--
2.28.0
More information about the Intel-gfx
mailing list