summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/armada/armada_drv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/armada/armada_drv.c')
-rw-r--r--drivers/gpu/drm/armada/armada_drv.c34
1 files changed, 2 insertions, 32 deletions
diff --git a/drivers/gpu/drm/armada/armada_drv.c b/drivers/gpu/drm/armada/armada_drv.c
index 63f42d001f33..e618fab7f519 100644
--- a/drivers/gpu/drm/armada/armada_drv.c
+++ b/drivers/gpu/drm/armada/armada_drv.c
@@ -49,20 +49,6 @@ void armada_drm_queue_unref_work(struct drm_device *dev,
spin_unlock_irqrestore(&dev->event_lock, flags);
}
-/* These are called under the vbl_lock. */
-static int armada_drm_enable_vblank(struct drm_device *dev, unsigned int pipe)
-{
- struct armada_private *priv = dev->dev_private;
- armada_drm_crtc_enable_irq(priv->dcrtc[pipe], VSYNC_IRQ_ENA);
- return 0;
-}
-
-static void armada_drm_disable_vblank(struct drm_device *dev, unsigned int pipe)
-{
- struct armada_private *priv = dev->dev_private;
- armada_drm_crtc_disable_irq(priv->dcrtc[pipe], VSYNC_IRQ_ENA);
-}
-
static struct drm_ioctl_desc armada_ioctls[] = {
DRM_IOCTL_DEF_DRV(ARMADA_GEM_CREATE, armada_gem_create_ioctl,0),
DRM_IOCTL_DEF_DRV(ARMADA_GEM_MMAP, armada_gem_mmap_ioctl, 0),
@@ -74,22 +60,10 @@ static void armada_drm_lastclose(struct drm_device *dev)
armada_fbdev_lastclose(dev);
}
-static const struct file_operations armada_drm_fops = {
- .owner = THIS_MODULE,
- .llseek = no_llseek,
- .read = drm_read,
- .poll = drm_poll,
- .unlocked_ioctl = drm_ioctl,
- .mmap = drm_gem_mmap,
- .open = drm_open,
- .release = drm_release,
-};
+DEFINE_DRM_GEM_FOPS(armada_drm_fops);
static struct drm_driver armada_drm_driver = {
.lastclose = armada_drm_lastclose,
- .get_vblank_counter = drm_vblank_no_hw_counter,
- .enable_vblank = armada_drm_enable_vblank,
- .disable_vblank = armada_drm_disable_vblank,
.gem_free_object_unlocked = armada_gem_free_object,
.prime_handle_to_fd = drm_gem_prime_handle_to_fd,
.prime_fd_to_handle = drm_gem_prime_fd_to_handle,
@@ -154,10 +128,9 @@ static int armada_drm_bind(struct device *dev)
return ret;
}
- priv->drm.platformdev = to_platform_device(dev);
priv->drm.dev_private = priv;
- platform_set_drvdata(priv->drm.platformdev, &priv->drm);
+ dev_set_drvdata(dev, &priv->drm);
INIT_WORK(&priv->fb_unref_work, armada_drm_unref_work);
INIT_KFIFO(priv->fb_unref);
@@ -226,9 +199,6 @@ static void armada_drm_unbind(struct device *dev)
drm_kms_helper_poll_fini(&priv->drm);
armada_fbdev_fini(&priv->drm);
-#ifdef CONFIG_DEBUG_FS
- armada_drm_debugfs_cleanup(priv->drm.primary);
-#endif
drm_dev_unregister(&priv->drm);
component_unbind_all(dev, &priv->drm);