From: Shixiong Ou <[email protected]>

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
— 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 <[email protected]>
---
 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

Reply via email to