drm/amd/display: fix cursor offset on rotation 180
authorjsg <jsg@openbsd.org>
Fri, 30 Aug 2024 04:10:43 +0000 (04:10 +0000)
committerjsg <jsg@openbsd.org>
Fri, 30 Aug 2024 04:10:43 +0000 (04:10 +0000)
From Melissa Wen
a50a25dc0ce05cb3bdb1154fc7d64117a43de9f5 in linux-6.6.y/6.6.48
737222cebecbdbcdde2b69475c52bcb9ecfeb830 in mainline linux

sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c

index c9f13c3..ff38a85 100644 (file)
@@ -3521,7 +3521,7 @@ void dcn10_set_cursor_position(struct pipe_ctx *pipe_ctx)
                                                (int)hubp->curs_attr.width || pos_cpy.x
                                                <= (int)hubp->curs_attr.width +
                                                pipe_ctx->plane_state->src_rect.x) {
-                                               pos_cpy.x = temp_x + viewport_width;
+                                               pos_cpy.x = 2 * viewport_width - temp_x;
                                        }
                                }
                        } else {