Commit 26507b06 authored by Stéphane Marchesin's avatar Stéphane Marchesin Committed by Dave Airlie

drm/udl: add vblank support

This is needed to be able to send page flip completion events.
Also while I'm at it, fix the error paths on init.
Signed-off-by: default avatarStéphane Marchesin <marcheu@chromium.org>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent e2215321
...@@ -306,10 +306,23 @@ int udl_driver_load(struct drm_device *dev, unsigned long flags) ...@@ -306,10 +306,23 @@ int udl_driver_load(struct drm_device *dev, unsigned long flags)
DRM_DEBUG("\n"); DRM_DEBUG("\n");
ret = udl_modeset_init(dev); ret = udl_modeset_init(dev);
if (ret)
goto err;
ret = udl_fbdev_init(dev); ret = udl_fbdev_init(dev);
if (ret)
goto err;
ret = drm_vblank_init(dev, 1);
if (ret)
goto err_fb;
return 0; return 0;
err_fb:
udl_fbdev_cleanup(dev);
err: err:
if (udl->urbs.count)
udl_free_urb_list(dev);
kfree(udl); kfree(udl);
DRM_ERROR("%d\n", ret); DRM_ERROR("%d\n", ret);
return ret; return ret;
...@@ -325,6 +338,8 @@ int udl_driver_unload(struct drm_device *dev) ...@@ -325,6 +338,8 @@ int udl_driver_unload(struct drm_device *dev)
{ {
struct udl_device *udl = dev->dev_private; struct udl_device *udl = dev->dev_private;
drm_vblank_cleanup(dev);
if (udl->urbs.count) if (udl->urbs.count)
udl_free_urb_list(dev); udl_free_urb_list(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment