diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2017-12-11 11:08:39 +0100 |
---|---|---|
committer | Thomas Hellstrom <thellstrom@vmware.com> | 2017-12-22 13:15:11 +0100 |
commit | e46db665a4a3212c477b5c982f70f6ae71d14e47 (patch) | |
tree | c4307e7a53ff5509db4152730c7157b90792209c /drm_plane.c | |
parent | d515f1e3c5a06afbf672ac5a13955279702118b2 (diff) |
vmwgfx/drm: Add core support to supply legacy cursor hotspot pointers
We revisit this change. Previous we added the different hotspots together
just before programming the device, but that makes the plane atomic state
incompatible with what's actually in the device.
So add a way for the only legacy ioctl that doesn't support cursor hotspots
to add the device internal legacy hotspots into the atomic plane state.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'drm_plane.c')
-rw-r--r-- | drm_plane.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drm_plane.c b/drm_plane.c index 692af4b..b2f196c 100644 --- a/drm_plane.c +++ b/drm_plane.c @@ -776,7 +776,11 @@ int drm_mode_cursor_ioctl(struct drm_device *dev, struct drm_mode_cursor2 new_req; memcpy(&new_req, req, sizeof(struct drm_mode_cursor)); - new_req.hot_x = new_req.hot_y = 0; + if (dev->driver->legacy_hotspot) + dev->driver->legacy_hotspot(dev, file_priv, req->crtc_id, + &new_req.hot_x, &new_req.hot_y); + else + new_req.hot_x = new_req.hot_y = 0; return drm_mode_cursor_common(dev, &new_req, file_priv); } |