drm/vkms: Add cursor plane support
Add cursor plane support and update vkms_plane_atomic_check to enable positioning cursor plane. 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/c69078820eacf3246fa77beb0c6227b692cc5e82.1536210181.git.hamohammed.sa@gmail.com
This commit is contained in:

committed by
Daniel Vetter

parent
6be8f3bd2c
commit
c27d931d40
@@ -49,14 +49,20 @@ int vkms_output_init(struct vkms_device *vkmsdev)
|
||||
struct drm_connector *connector = &output->connector;
|
||||
struct drm_encoder *encoder = &output->encoder;
|
||||
struct drm_crtc *crtc = &output->crtc;
|
||||
struct drm_plane *primary;
|
||||
struct drm_plane *primary, *cursor = NULL;
|
||||
int ret;
|
||||
|
||||
primary = vkms_plane_init(vkmsdev);
|
||||
primary = vkms_plane_init(vkmsdev, DRM_PLANE_TYPE_PRIMARY);
|
||||
if (IS_ERR(primary))
|
||||
return PTR_ERR(primary);
|
||||
|
||||
ret = vkms_crtc_init(dev, crtc, primary, NULL);
|
||||
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);
|
||||
if (ret)
|
||||
goto err_crtc;
|
||||
|
||||
@@ -106,6 +112,10 @@ err_connector:
|
||||
drm_crtc_cleanup(crtc);
|
||||
|
||||
err_crtc:
|
||||
drm_plane_cleanup(cursor);
|
||||
|
||||
err_cursor:
|
||||
drm_plane_cleanup(primary);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user