drm/amd/display: fix cursor offset on rotation 180
authorjsg <jsg@openbsd.org>
Wed, 15 Feb 2023 10:26:50 +0000 (10:26 +0000)
committerjsg <jsg@openbsd.org>
Wed, 15 Feb 2023 10:26:50 +0000 (10:26 +0000)
From Melissa Wen
5af27a53a881ed49e071875c10760b0fc13996a1 in linux-6.1.y/6.1.12
49d0555976f0972af68397ed996375c135b38ba7 in mainline linux

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

index c06538c..55d63d8 100644 (file)
@@ -3612,7 +3612,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 {