drm/verisilicon: fix cursor position
authorIcenowy Zheng <uwu@icenowy.me>
Tue, 5 Dec 2023 12:06:22 +0000 (20:06 +0800)
committerJaehoon Chung <jh80.chung@samsung.com>
Wed, 13 Mar 2024 06:58:52 +0000 (15:58 +0900)
The cursor should be placed at (x + hot_x, y + hot_y) to allow partial
display of a cursor.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
(cherry picked from commit 05735e9ff48327e80a3f17f0aa1dc21a26f480d1)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
drivers/gpu/drm/verisilicon/vs_dc.c

index 2f2b7a3c52eebc10be7de935d89408024daebf2e..1fbedb30a06b1a9e1e623878419ad759b661d556 100644 (file)
@@ -745,8 +745,8 @@ static void update_cursor_plane(struct vs_dc *dc, struct vs_plane *plane)
     struct dc_hw_cursor cursor;
 
     cursor.address = plane->dma_addr[0];
-    cursor.x = state->crtc_x;
-    cursor.y = state->crtc_y;
+    cursor.x = state->crtc_x + drm_fb->hot_x;
+    cursor.y = state->crtc_y + drm_fb->hot_y;
     cursor.hot_x = drm_fb->hot_x;
     cursor.hot_y = drm_fb->hot_y;
     cursor.display_id = to_vs_display_id(dc, state->crtc);