summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorStéphane Marchesin <marcheu@chromium.org>2014-07-02 15:13:42 -0700
committerDave Airlie <airlied@redhat.com>2014-07-08 11:33:05 +1000
commit26507b065b503ac1b5ba702161c2084190fc0c9f (patch)
treecf0aaa81cda4d8002e01cfd3f460cbc3684fbdae /drivers/gpu
parente2215321ff180f280d83837f57f3a84f8b6dda0d (diff)
downloadblackbird-op-linux-26507b065b503ac1b5ba702161c2084190fc0c9f.tar.gz
blackbird-op-linux-26507b065b503ac1b5ba702161c2084190fc0c9f.zip
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')
-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)
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;
@@ -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);
OpenPOWER on IntegriCloud