[PATCH] drm/sysfb: Fix atomic_disable to use dst coordinates instead of src

oushixiong1025@163.com posted 1 patch 2 months ago
There is a newer version of this series
drivers/gpu/drm/sysfb/drm_sysfb_modeset.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
[PATCH] drm/sysfb: Fix atomic_disable to use dst coordinates instead of src
Posted by oushixiong1025@163.com 2 months ago

From: Shixiong Ou <oushixiong@kylinos.cn>

drm_sysfb_plane_helper_atomic_disable() constructs the clear rectangle
from plane_state->src_* coordinates. This is inconsistent with
drm_sysfb_plane_helper_atomic_update() which uses plane_state->dst
\ufffd\ufffd\ufffd the destination rectangle already computed by the DRM core with panel
orientation applied.

Use plane_state->dst directly, matching the approach in atomic_update.

Signed-off-by: Shixiong Ou <oushixiong@kylinos.cn>
---
 drivers/gpu/drm/sysfb/drm_sysfb_modeset.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/sysfb/drm_sysfb_modeset.c b/drivers/gpu/drm/sysfb/drm_sysfb_modeset.c
index d2de29caf89e..18466de886aa 100644
--- a/drivers/gpu/drm/sysfb/drm_sysfb_modeset.c
+++ b/drivers/gpu/drm/sysfb/drm_sysfb_modeset.c
@@ -380,14 +380,10 @@ void drm_sysfb_plane_helper_atomic_disable(struct drm_plane *plane,
 	void __iomem *dst_vmap = dst.vaddr_iomem; /* TODO: Use mapping abstraction */
 	unsigned int dst_pitch = sysfb->fb_pitch;
 	const struct drm_format_info *dst_format = sysfb->fb_format;
-	struct drm_rect dst_clip;
+	struct drm_rect dst_clip = plane_state->dst;
 	unsigned long lines, linepixels, i;
 	int idx;
 
-	drm_rect_init(&dst_clip,
-		      plane_state->src_x >> 16, plane_state->src_y >> 16,
-		      plane_state->src_w >> 16, plane_state->src_h >> 16);
-
 	lines = drm_rect_height(&dst_clip);
 	linepixels = drm_rect_width(&dst_clip);
 
-- 
2.25.1

Content-type: Text/plain

No virus found
		Checked by Hillstone Network AntiVirus