From dd5465910740ad74a318cf7464dad1136a2e0ca9 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 31 May 2016 08:54:52 +0200 Subject: [PATCH] add cursor hotspot to drm_framebuffer Reviewed-by: Daniel Vetter Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/drm_crtc.c | 2 ++ include/drm/drm_crtc.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 0e3cc66aa8b7..d7618bf18b45 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -2975,6 +2975,8 @@ static int drm_mode_cursor_universal(struct drm_crtc *crtc, DRM_DEBUG_KMS("failed to wrap cursor buffer in drm framebuffer\n"); return PTR_ERR(fb); } + fb->hot_x = req->hot_x; + fb->hot_y = req->hot_y; } else { fb = NULL; } diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index d1559cd04e3d..1460f660bf96 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -253,6 +253,8 @@ struct drm_framebuffer { int bits_per_pixel; int flags; uint32_t pixel_format; /* fourcc format */ + int hot_x; + int hot_y; struct list_head filp_head; }; -- 2.45.2