[PATCH 3/3] drm/i915: Set x1 and x2 also for drm_rect_intersect
Jouni Högander
jouni.hogander at intel.com
Thu May 5 06:33:37 UTC 2022
Signed-off-by: Jouni Högander <jouni.hogander at intel.com>
---
drivers/gpu/drm/i915/display/intel_psr.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index a20634800884..5229ba89a079 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -1724,6 +1724,10 @@ int intel_psr2_sel_fetch_update(struct intel_atomic_state *state,
break;
}
+ /* Set x1 and x2 for drm_rect_intersect usage */
+ damaged_area.x1 = 0;
+ damaged_area.x2 = INT_MAX;
+
/*
* If visibility or plane moved, mark the whole plane area as
* damaged as it needs to be complete redraw in the new and old
@@ -1735,8 +1739,6 @@ int intel_psr2_sel_fetch_update(struct intel_atomic_state *state,
if (old_plane_state->uapi.visible) {
damaged_area.y1 = old_plane_state->uapi.dst.y1;
damaged_area.y2 = old_plane_state->uapi.dst.y2;
- damaged_area.x1 = old_plane_state->uapi.dst.x1;
- damaged_area.x2 = old_plane_state->uapi.dst.x2;
if (drm_rect_intersect(&damaged_area, &crtc_state->pipe_src))
clip_area_update(&pipe_clip, &damaged_area);
}
@@ -1744,8 +1746,6 @@ int intel_psr2_sel_fetch_update(struct intel_atomic_state *state,
if (new_plane_state->uapi.visible) {
damaged_area.y1 = new_plane_state->uapi.dst.y1;
damaged_area.y2 = new_plane_state->uapi.dst.y2;
- damaged_area.x1 = new_plane_state->uapi.dst.x1;
- damaged_area.x2 = new_plane_state->uapi.dst.x2;
if (drm_rect_intersect(&damaged_area, &crtc_state->pipe_src))
clip_area_update(&pipe_clip, &damaged_area);
}
@@ -1754,8 +1754,6 @@ int intel_psr2_sel_fetch_update(struct intel_atomic_state *state,
/* If alpha changed mark the whole plane area as damaged */
damaged_area.y1 = new_plane_state->uapi.dst.y1;
damaged_area.y2 = new_plane_state->uapi.dst.y2;
- damaged_area.x1 = new_plane_state->uapi.dst.y1;
- damaged_area.x2 = new_plane_state->uapi.dst.y2;
if (drm_rect_intersect(&damaged_area, &crtc_state->pipe_src))
clip_area_update(&pipe_clip, &damaged_area);
continue;
--
2.25.1
More information about the Intel-gfx-trybot
mailing list