[PATCH 3/4] DO_NOT_MERGE: drm/i915/display: Update PSR2 sel fetch plane offset calculation
José Roberto de Souza
jose.souza at intel.com
Thu Jul 29 00:39:39 UTC 2021
Still to be understand what are the causes but using
skl_calc_main_surface_offset() to calculate offset cause very wrong
offsets to be calculated causing glitches.
Here a example with a pane clip of y1=48 y2=64 it is calculating
offset y=13 x=3328.
Removing it at least fixes the issue in fbcon and improves mouse
movents in Gnome but there still some missing artifacts when moving
the cursor really fast.
Cc: Gwan-gyeong Mun <gwan-gyeong.mun at intel.com>
Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
Signed-off-by: José Roberto de Souza <jose.souza at intel.com>
---
drivers/gpu/drm/i915/display/intel_psr.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 426120ae9cfb9..bd494e0cf01b8 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -1480,8 +1480,8 @@ void intel_psr2_program_plane_sel_fetch(struct intel_plane *plane,
struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
enum pipe pipe = plane->pipe;
const struct drm_rect *clip;
- u32 val, offset;
- int ret, x, y;
+ u32 val;
+ int x, y;
if (!crtc_state->enable_psr2_sel_fetch)
return;
@@ -1498,13 +1498,15 @@ void intel_psr2_program_plane_sel_fetch(struct intel_plane *plane,
val |= plane_state->uapi.dst.x1;
intel_de_write_fw(dev_priv, PLANE_SEL_FETCH_POS(pipe, plane->id), val);
- /* TODO: consider auxiliary surfaces */
+ /*
+ * TODO: correctly calculate PLANE_SEL_FETCH_OFFSET, using
+ * skl_calc_main_surface_offset() cause easy to reproduce glitches with
+ * fbcon and cursor moviment.
+ *
+ * TODO: consider auxiliary surfaces
+ */
x = plane_state->uapi.src.x1 >> 16;
y = (plane_state->uapi.src.y1 >> 16) + 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);
val = y << 16 | x;
intel_de_write_fw(dev_priv, PLANE_SEL_FETCH_OFFSET(pipe, plane->id),
val);
--
2.32.0
More information about the Intel-gfx-trybot
mailing list