summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vkms/vkms_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/vkms/vkms_output.c')
-rw-r--r--drivers/gpu/drm/vkms/vkms_output.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/gpu/drm/vkms/vkms_output.c b/drivers/gpu/drm/vkms/vkms_output.c
index 19f9ffcbf9eb..271a0eb9042c 100644
--- a/drivers/gpu/drm/vkms/vkms_output.c
+++ b/drivers/gpu/drm/vkms/vkms_output.c
@@ -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);