drm/vkms: Enable/Disable cursor support with module option

Cursor support is not complete yet. Add module option 'enable_cursor'
to enable/disable cursor support which is used for testing currently.

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/b47f44f518d3c9858f1469193f1136e0c490060b.1536210181.git.hamohammed.sa@gmail.com
This commit is contained in:
Haneen Mohammed
2018-09-06 08:19:11 +03:00
committed by Daniel Vetter
parent db7f419c06
commit b8789ea71d
3 changed files with 14 additions and 5 deletions

View File

@@ -56,10 +56,12 @@ int vkms_output_init(struct vkms_device *vkmsdev)
if (IS_ERR(primary))
return PTR_ERR(primary);
cursor = vkms_plane_init(vkmsdev, DRM_PLANE_TYPE_CURSOR);
if (IS_ERR(cursor)) {
ret = PTR_ERR(cursor);
goto err_cursor;
if (enable_cursor) {
cursor = vkms_plane_init(vkmsdev, DRM_PLANE_TYPE_CURSOR);
if (IS_ERR(cursor)) {
ret = PTR_ERR(cursor);
goto err_cursor;
}
}
ret = vkms_crtc_init(dev, crtc, primary, cursor);
@@ -112,7 +114,8 @@ err_connector:
drm_crtc_cleanup(crtc);
err_crtc:
drm_plane_cleanup(cursor);
if (enable_cursor)
drm_plane_cleanup(cursor);
err_cursor:
drm_plane_cleanup(primary);