drm/gem: create drm_gem_dumb_destroy
[deliverable/linux.git] / drivers / gpu / host1x / drm / drm.c
index 2b561c9118c6cbf64e9bda31392aca565a266f02..87aa09bf7ba88f9c2b637bb2ad535d783ccef63f 100644 (file)
@@ -148,6 +148,7 @@ int host1x_drm_init(struct host1x_drm *host1x, struct drm_device *drm)
                                dev_err(host1x->dev,
                                        "DRM setup failed for %s: %d\n",
                                        dev_name(client->dev), err);
+                               mutex_unlock(&host1x->clients_lock);
                                return err;
                        }
                }
@@ -175,6 +176,7 @@ int host1x_drm_exit(struct host1x_drm *host1x)
                                dev_err(host1x->dev,
                                        "DRM cleanup failed for %s: %d\n",
                                        dev_name(client->dev), err);
+                               mutex_unlock(&host1x->clients_lock);
                                return err;
                        }
                }
@@ -257,6 +259,13 @@ static int tegra_drm_load(struct drm_device *drm, unsigned long flags)
        if (err < 0)
                return err;
 
+       /*
+        * We don't use the drm_irq_install() helpers provided by the DRM
+        * core, so we need to set this manually in order to allow the
+        * DRM_IOCTL_WAIT_VBLANK to operate correctly.
+        */
+       drm->irq_enabled = 1;
+
        err = drm_vblank_init(drm, drm->mode_config.num_crtc);
        if (err < 0)
                return err;
@@ -378,8 +387,7 @@ static int tegra_syncpt_incr(struct drm_device *drm, void *data,
        if (!sp)
                return -EINVAL;
 
-       host1x_syncpt_incr(sp);
-       return 0;
+       return host1x_syncpt_incr(sp);
 }
 
 static int tegra_syncpt_wait(struct drm_device *drm, void *data,
@@ -605,7 +613,7 @@ static void tegra_debugfs_cleanup(struct drm_minor *minor)
 #endif
 
 struct drm_driver tegra_drm_driver = {
-       .driver_features = DRIVER_BUS_PLATFORM | DRIVER_MODESET | DRIVER_GEM,
+       .driver_features = DRIVER_MODESET | DRIVER_GEM,
        .load = tegra_drm_load,
        .unload = tegra_drm_unload,
        .open = tegra_drm_open,
@@ -625,7 +633,7 @@ struct drm_driver tegra_drm_driver = {
        .gem_vm_ops = &tegra_bo_vm_ops,
        .dumb_create = tegra_bo_dumb_create,
        .dumb_map_offset = tegra_bo_dumb_map_offset,
-       .dumb_destroy = tegra_bo_dumb_destroy,
+       .dumb_destroy = drm_gem_dumb_destroy,
 
        .ioctls = tegra_drm_ioctls,
        .num_ioctls = ARRAY_SIZE(tegra_drm_ioctls),
This page took 0.026756 seconds and 5 git commands to generate.