Skip to content

Commit

Permalink
drm/udl: add vblank support
Browse files Browse the repository at this point in the history
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: Stéphane Marchesin <marcheu@chromium.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Stéphane Marchesin authored and Dave Airlie committed Jul 8, 2014
1 parent e221532 commit 26507b0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions drivers/gpu/drm/udl/udl_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,23 @@ int udl_driver_load(struct drm_device *dev, unsigned long flags)

DRM_DEBUG("\n");
ret = udl_modeset_init(dev);
if (ret)
goto err;

ret = udl_fbdev_init(dev);
if (ret)
goto err;

ret = drm_vblank_init(dev, 1);
if (ret)
goto err_fb;

return 0;
err_fb:
udl_fbdev_cleanup(dev);
err:
if (udl->urbs.count)
udl_free_urb_list(dev);
kfree(udl);
DRM_ERROR("%d\n", ret);
return ret;
Expand All @@ -325,6 +338,8 @@ int udl_driver_unload(struct drm_device *dev)
{
struct udl_device *udl = dev->dev_private;

drm_vblank_cleanup(dev);

if (udl->urbs.count)
udl_free_urb_list(dev);

Expand Down

0 comments on commit 26507b0

Please sign in to comment.