aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/udl/udl_main.c
diff options
context:
space:
mode:
authorStéphane Marchesin <marcheu@chromium.org>2014-07-02 18:13:42 -0400
committerDave Airlie <airlied@redhat.com>2014-07-07 21:33:05 -0400
commit26507b065b503ac1b5ba702161c2084190fc0c9f (patch)
treecf0aaa81cda4d8002e01cfd3f460cbc3684fbdae /drivers/gpu/drm/udl/udl_main.c
parente2215321ff180f280d83837f57f3a84f8b6dda0d (diff)
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: Stéphane Marchesin <marcheu@chromium.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/udl/udl_main.c')
-rw-r--r--drivers/gpu/drm/udl/udl_main.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/drm/udl/udl_main.c b/drivers/gpu/drm/udl/udl_main.c
index 7094b92d1ec7..42795674bc07 100644
--- a/drivers/gpu/drm/udl/udl_main.c
+++ b/drivers/gpu/drm/udl/udl_main.c
@@ -306,10 +306,23 @@ int udl_driver_load(struct drm_device *dev, unsigned long flags)
306 306
307 DRM_DEBUG("\n"); 307 DRM_DEBUG("\n");
308 ret = udl_modeset_init(dev); 308 ret = udl_modeset_init(dev);
309 if (ret)
310 goto err;
309 311
310 ret = udl_fbdev_init(dev); 312 ret = udl_fbdev_init(dev);
313 if (ret)
314 goto err;
315
316 ret = drm_vblank_init(dev, 1);
317 if (ret)
318 goto err_fb;
319
311 return 0; 320 return 0;
321err_fb:
322 udl_fbdev_cleanup(dev);
312err: 323err:
324 if (udl->urbs.count)
325 udl_free_urb_list(dev);
313 kfree(udl); 326 kfree(udl);
314 DRM_ERROR("%d\n", ret); 327 DRM_ERROR("%d\n", ret);
315 return ret; 328 return ret;
@@ -325,6 +338,8 @@ int udl_driver_unload(struct drm_device *dev)
325{ 338{
326 struct udl_device *udl = dev->dev_private; 339 struct udl_device *udl = dev->dev_private;
327 340
341 drm_vblank_cleanup(dev);
342
328 if (udl->urbs.count) 343 if (udl->urbs.count)
329 udl_free_urb_list(dev); 344 udl_free_urb_list(dev);
330 345