2 * drivers/gpu/drm/omapdrm/omap_drv.c
4 * Copyright (C) 2011 Texas Instruments
5 * Author: Rob Clark <rob@ti.com>
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 * You should have received a copy of the GNU General Public License along with
17 * this program. If not, see <http://www.gnu.org/licenses/>.
20 #include <linux/wait.h>
22 #include <drm/drm_atomic.h>
23 #include <drm/drm_atomic_helper.h>
24 #include <drm/drm_crtc_helper.h>
25 #include <drm/drm_fb_helper.h>
27 #include "omap_dmm_tiler.h"
30 #define DRIVER_NAME MODULE_NAME
31 #define DRIVER_DESC "OMAP DRM"
32 #define DRIVER_DATE "20110917"
33 #define DRIVER_MAJOR 1
34 #define DRIVER_MINOR 0
35 #define DRIVER_PATCHLEVEL 0
37 static int num_crtc = CONFIG_DRM_OMAP_NUM_CRTCS;
39 MODULE_PARM_DESC(num_crtc, "Number of overlays to use as CRTCs");
40 module_param(num_crtc, int, 0600);
46 /* Notes about mapping DSS and DRM entities:
48 * encoder: manager.. with some extension to allow one primary CRTC
49 * and zero or more video CRTC's to be mapped to one encoder?
50 * connector: dssdev.. manager can be attached/detached from different
54 static void omap_fb_output_poll_changed(struct drm_device *dev)
56 struct omap_drm_private *priv = dev->dev_private;
59 drm_fb_helper_hotplug_event(priv->fbdev);
62 struct omap_atomic_state_commit {
63 struct work_struct work;
64 struct drm_device *dev;
65 struct drm_atomic_state *state;
69 static void omap_atomic_wait_for_completion(struct drm_device *dev,
70 struct drm_atomic_state *old_state)
72 struct drm_crtc_state *old_crtc_state;
73 struct drm_crtc *crtc;
77 for_each_crtc_in_state(old_state, crtc, old_crtc_state, i) {
78 if (!crtc->state->enable)
81 ret = omap_crtc_wait_pending(crtc);
85 "atomic complete timeout (pipe %u)!\n", i);
89 static void omap_atomic_complete(struct omap_atomic_state_commit *commit)
91 struct drm_device *dev = commit->dev;
92 struct omap_drm_private *priv = dev->dev_private;
93 struct drm_atomic_state *old_state = commit->state;
95 /* Apply the atomic update. */
98 drm_atomic_helper_commit_modeset_disables(dev, old_state);
100 /* With the current dss dispc implementation we have to enable
101 * the new modeset before we can commit planes. The dispc ovl
102 * configuration relies on the video mode configuration been
103 * written into the HW when the ovl configuration is
106 * This approach is not ideal because after a mode change the
107 * plane update is executed only after the first vblank
108 * interrupt. The dispc implementation should be fixed so that
109 * it is able use uncommitted drm state information.
111 drm_atomic_helper_commit_modeset_enables(dev, old_state);
112 omap_atomic_wait_for_completion(dev, old_state);
114 drm_atomic_helper_commit_planes(dev, old_state, 0);
116 omap_atomic_wait_for_completion(dev, old_state);
118 drm_atomic_helper_cleanup_planes(dev, old_state);
122 drm_atomic_state_put(old_state);
124 /* Complete the commit, wake up any waiter. */
125 spin_lock(&priv->commit.lock);
126 priv->commit.pending &= ~commit->crtcs;
127 spin_unlock(&priv->commit.lock);
129 wake_up_all(&priv->commit.wait);
134 static void omap_atomic_work(struct work_struct *work)
136 struct omap_atomic_state_commit *commit =
137 container_of(work, struct omap_atomic_state_commit, work);
139 omap_atomic_complete(commit);
142 static bool omap_atomic_is_pending(struct omap_drm_private *priv,
143 struct omap_atomic_state_commit *commit)
147 spin_lock(&priv->commit.lock);
148 pending = priv->commit.pending & commit->crtcs;
149 spin_unlock(&priv->commit.lock);
154 static int omap_atomic_commit(struct drm_device *dev,
155 struct drm_atomic_state *state, bool nonblock)
157 struct omap_drm_private *priv = dev->dev_private;
158 struct omap_atomic_state_commit *commit;
159 struct drm_crtc *crtc;
160 struct drm_crtc_state *crtc_state;
163 ret = drm_atomic_helper_prepare_planes(dev, state);
167 /* Allocate the commit object. */
168 commit = kzalloc(sizeof(*commit), GFP_KERNEL);
169 if (commit == NULL) {
174 INIT_WORK(&commit->work, omap_atomic_work);
176 commit->state = state;
178 /* Wait until all affected CRTCs have completed previous commits and
179 * mark them as pending.
181 for_each_crtc_in_state(state, crtc, crtc_state, i)
182 commit->crtcs |= drm_crtc_mask(crtc);
184 wait_event(priv->commit.wait, !omap_atomic_is_pending(priv, commit));
186 spin_lock(&priv->commit.lock);
187 priv->commit.pending |= commit->crtcs;
188 spin_unlock(&priv->commit.lock);
190 /* Swap the state, this is the point of no return. */
191 drm_atomic_helper_swap_state(state, true);
193 drm_atomic_state_get(state);
195 schedule_work(&commit->work);
197 omap_atomic_complete(commit);
202 drm_atomic_helper_cleanup_planes(dev, state);
206 static const struct drm_mode_config_funcs omap_mode_config_funcs = {
207 .fb_create = omap_framebuffer_create,
208 .output_poll_changed = omap_fb_output_poll_changed,
209 .atomic_check = drm_atomic_helper_check,
210 .atomic_commit = omap_atomic_commit,
213 static int get_connector_type(struct omap_dss_device *dssdev)
215 switch (dssdev->type) {
216 case OMAP_DISPLAY_TYPE_HDMI:
217 return DRM_MODE_CONNECTOR_HDMIA;
218 case OMAP_DISPLAY_TYPE_DVI:
219 return DRM_MODE_CONNECTOR_DVID;
220 case OMAP_DISPLAY_TYPE_DSI:
221 return DRM_MODE_CONNECTOR_DSI;
223 return DRM_MODE_CONNECTOR_Unknown;
227 static bool channel_used(struct drm_device *dev, enum omap_channel channel)
229 struct omap_drm_private *priv = dev->dev_private;
232 for (i = 0; i < priv->num_crtcs; i++) {
233 struct drm_crtc *crtc = priv->crtcs[i];
235 if (omap_crtc_channel(crtc) == channel)
241 static void omap_disconnect_dssdevs(void)
243 struct omap_dss_device *dssdev = NULL;
245 for_each_dss_dev(dssdev)
246 dssdev->driver->disconnect(dssdev);
249 static int omap_connect_dssdevs(void)
252 struct omap_dss_device *dssdev = NULL;
253 bool no_displays = true;
255 for_each_dss_dev(dssdev) {
256 r = dssdev->driver->connect(dssdev);
257 if (r == -EPROBE_DEFER) {
258 omap_dss_put_device(dssdev);
261 dev_warn(dssdev->dev, "could not connect display: %s\n",
269 return -EPROBE_DEFER;
275 * if we are deferring probe, we disconnect the devices we previously
278 omap_disconnect_dssdevs();
283 static int omap_modeset_create_crtc(struct drm_device *dev, int id,
284 enum omap_channel channel,
287 struct omap_drm_private *priv = dev->dev_private;
288 struct drm_plane *plane;
289 struct drm_crtc *crtc;
291 plane = omap_plane_init(dev, id, DRM_PLANE_TYPE_PRIMARY,
294 return PTR_ERR(plane);
296 crtc = omap_crtc_init(dev, plane, channel, id);
298 BUG_ON(priv->num_crtcs >= ARRAY_SIZE(priv->crtcs));
299 priv->crtcs[id] = crtc;
302 priv->planes[id] = plane;
308 static int omap_modeset_init_properties(struct drm_device *dev)
310 struct omap_drm_private *priv = dev->dev_private;
312 priv->zorder_prop = drm_property_create_range(dev, 0, "zorder", 0, 3);
313 if (!priv->zorder_prop)
319 static int omap_modeset_init(struct drm_device *dev)
321 struct omap_drm_private *priv = dev->dev_private;
322 struct omap_dss_device *dssdev = NULL;
323 int num_ovls = dss_feat_get_num_ovls();
324 int num_mgrs = dss_feat_get_num_mgrs();
330 drm_mode_config_init(dev);
332 ret = omap_modeset_init_properties(dev);
337 * We usually don't want to create a CRTC for each manager, at least
338 * not until we have a way to expose private planes to userspace.
339 * Otherwise there would not be enough video pipes left for drm planes.
340 * We use the num_crtc argument to limit the number of crtcs we create.
342 num_crtcs = min3(num_crtc, num_mgrs, num_ovls);
343 possible_crtcs = (1 << num_crtcs) - 1;
347 for_each_dss_dev(dssdev) {
348 struct drm_connector *connector;
349 struct drm_encoder *encoder;
350 enum omap_channel channel;
351 struct omap_dss_device *out;
353 if (!omapdss_device_is_connected(dssdev))
356 encoder = omap_encoder_init(dev, dssdev);
359 dev_err(dev->dev, "could not create encoder: %s\n",
364 connector = omap_connector_init(dev,
365 get_connector_type(dssdev), dssdev, encoder);
368 dev_err(dev->dev, "could not create connector: %s\n",
373 BUG_ON(priv->num_encoders >= ARRAY_SIZE(priv->encoders));
374 BUG_ON(priv->num_connectors >= ARRAY_SIZE(priv->connectors));
376 priv->encoders[priv->num_encoders++] = encoder;
377 priv->connectors[priv->num_connectors++] = connector;
379 drm_mode_connector_attach_encoder(connector, encoder);
382 * if we have reached the limit of the crtcs we are allowed to
383 * create, let's not try to look for a crtc for this
384 * panel/encoder and onwards, we will, of course, populate the
385 * the possible_crtcs field for all the encoders with the final
386 * set of crtcs we create
392 * get the recommended DISPC channel for this encoder. For now,
393 * we only try to get create a crtc out of the recommended, the
394 * other possible channels to which the encoder can connect are
398 out = omapdss_find_output_from_display(dssdev);
399 channel = out->dispc_channel;
400 omap_dss_put_device(out);
403 * if this channel hasn't already been taken by a previously
404 * allocated crtc, we create a new crtc for it
406 if (!channel_used(dev, channel)) {
407 ret = omap_modeset_create_crtc(dev, id, channel,
411 "could not create CRTC (channel %u)\n",
421 * we have allocated crtcs according to the need of the panels/encoders,
422 * adding more crtcs here if needed
424 for (; id < num_crtcs; id++) {
426 /* find a free manager for this crtc */
427 for (i = 0; i < num_mgrs; i++) {
428 if (!channel_used(dev, i))
433 /* this shouldn't really happen */
434 dev_err(dev->dev, "no managers left for crtc\n");
438 ret = omap_modeset_create_crtc(dev, id, i,
442 "could not create CRTC (channel %u)\n", i);
448 * Create normal planes for the remaining overlays:
450 for (; id < num_ovls; id++) {
451 struct drm_plane *plane;
453 plane = omap_plane_init(dev, id, DRM_PLANE_TYPE_OVERLAY,
456 return PTR_ERR(plane);
458 BUG_ON(priv->num_planes >= ARRAY_SIZE(priv->planes));
459 priv->planes[priv->num_planes++] = plane;
462 for (i = 0; i < priv->num_encoders; i++) {
463 struct drm_encoder *encoder = priv->encoders[i];
464 struct omap_dss_device *dssdev =
465 omap_encoder_get_dssdev(encoder);
466 struct omap_dss_device *output;
468 output = omapdss_find_output_from_display(dssdev);
470 /* figure out which crtc's we can connect the encoder to: */
471 encoder->possible_crtcs = 0;
472 for (id = 0; id < priv->num_crtcs; id++) {
473 struct drm_crtc *crtc = priv->crtcs[id];
474 enum omap_channel crtc_channel;
476 crtc_channel = omap_crtc_channel(crtc);
478 if (output->dispc_channel == crtc_channel) {
479 encoder->possible_crtcs |= (1 << id);
484 omap_dss_put_device(output);
487 DBG("registered %d planes, %d crtcs, %d encoders and %d connectors\n",
488 priv->num_planes, priv->num_crtcs, priv->num_encoders,
489 priv->num_connectors);
491 dev->mode_config.min_width = 32;
492 dev->mode_config.min_height = 32;
494 /* note: eventually will need some cpu_is_omapXYZ() type stuff here
495 * to fill in these limits properly on different OMAP generations..
497 dev->mode_config.max_width = 2048;
498 dev->mode_config.max_height = 2048;
500 dev->mode_config.funcs = &omap_mode_config_funcs;
502 drm_mode_config_reset(dev);
504 omap_drm_irq_install(dev);
514 static int ioctl_get_param(struct drm_device *dev, void *data,
515 struct drm_file *file_priv)
517 struct omap_drm_private *priv = dev->dev_private;
518 struct drm_omap_param *args = data;
520 DBG("%p: param=%llu", dev, args->param);
522 switch (args->param) {
523 case OMAP_PARAM_CHIPSET_ID:
524 args->value = priv->omaprev;
527 DBG("unknown parameter %lld", args->param);
534 static int ioctl_set_param(struct drm_device *dev, void *data,
535 struct drm_file *file_priv)
537 struct drm_omap_param *args = data;
539 switch (args->param) {
541 DBG("unknown parameter %lld", args->param);
548 #define OMAP_BO_USER_MASK 0x00ffffff /* flags settable by userspace */
550 static int ioctl_gem_new(struct drm_device *dev, void *data,
551 struct drm_file *file_priv)
553 struct drm_omap_gem_new *args = data;
554 u32 flags = args->flags & OMAP_BO_USER_MASK;
556 VERB("%p:%p: size=0x%08x, flags=%08x", dev, file_priv,
557 args->size.bytes, flags);
559 return omap_gem_new_handle(dev, file_priv, args->size, flags,
563 static int ioctl_gem_cpu_prep(struct drm_device *dev, void *data,
564 struct drm_file *file_priv)
566 struct drm_omap_gem_cpu_prep *args = data;
567 struct drm_gem_object *obj;
570 VERB("%p:%p: handle=%d, op=%x", dev, file_priv, args->handle, args->op);
572 obj = drm_gem_object_lookup(file_priv, args->handle);
576 ret = omap_gem_op_sync(obj, args->op);
579 ret = omap_gem_op_start(obj, args->op);
581 drm_gem_object_unreference_unlocked(obj);
586 static int ioctl_gem_cpu_fini(struct drm_device *dev, void *data,
587 struct drm_file *file_priv)
589 struct drm_omap_gem_cpu_fini *args = data;
590 struct drm_gem_object *obj;
593 VERB("%p:%p: handle=%d", dev, file_priv, args->handle);
595 obj = drm_gem_object_lookup(file_priv, args->handle);
599 /* XXX flushy, flushy */
603 ret = omap_gem_op_finish(obj, args->op);
605 drm_gem_object_unreference_unlocked(obj);
610 static int ioctl_gem_info(struct drm_device *dev, void *data,
611 struct drm_file *file_priv)
613 struct drm_omap_gem_info *args = data;
614 struct drm_gem_object *obj;
617 VERB("%p:%p: handle=%d", dev, file_priv, args->handle);
619 obj = drm_gem_object_lookup(file_priv, args->handle);
623 args->size = omap_gem_mmap_size(obj);
624 args->offset = omap_gem_mmap_offset(obj);
626 drm_gem_object_unreference_unlocked(obj);
631 static const struct drm_ioctl_desc ioctls[DRM_COMMAND_END - DRM_COMMAND_BASE] = {
632 DRM_IOCTL_DEF_DRV(OMAP_GET_PARAM, ioctl_get_param, DRM_AUTH),
633 DRM_IOCTL_DEF_DRV(OMAP_SET_PARAM, ioctl_set_param, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
634 DRM_IOCTL_DEF_DRV(OMAP_GEM_NEW, ioctl_gem_new, DRM_AUTH),
635 DRM_IOCTL_DEF_DRV(OMAP_GEM_CPU_PREP, ioctl_gem_cpu_prep, DRM_AUTH),
636 DRM_IOCTL_DEF_DRV(OMAP_GEM_CPU_FINI, ioctl_gem_cpu_fini, DRM_AUTH),
637 DRM_IOCTL_DEF_DRV(OMAP_GEM_INFO, ioctl_gem_info, DRM_AUTH),
644 static int dev_open(struct drm_device *dev, struct drm_file *file)
646 file->driver_priv = NULL;
648 DBG("open: dev=%p, file=%p", dev, file);
654 * lastclose - clean up after all DRM clients have exited
657 * Take care of cleaning up after all DRM clients have exited. In the
658 * mode setting case, we want to restore the kernel's initial mode (just
659 * in case the last client left us in a bad state).
661 static void dev_lastclose(struct drm_device *dev)
665 /* we don't support vga_switcheroo.. so just make sure the fbdev
668 struct omap_drm_private *priv = dev->dev_private;
671 DBG("lastclose: dev=%p", dev);
673 /* need to restore default rotation state.. not sure
674 * if there is a cleaner way to restore properties to
675 * default state? Maybe a flag that properties should
676 * automatically be restored to default state on
679 for (i = 0; i < priv->num_crtcs; i++) {
680 struct drm_crtc *crtc = priv->crtcs[i];
682 if (!crtc->primary->rotation_property)
685 drm_object_property_set_value(&crtc->base,
686 crtc->primary->rotation_property,
690 for (i = 0; i < priv->num_planes; i++) {
691 struct drm_plane *plane = priv->planes[i];
693 if (!plane->rotation_property)
696 drm_object_property_set_value(&plane->base,
697 plane->rotation_property,
702 ret = drm_fb_helper_restore_fbdev_mode_unlocked(priv->fbdev);
704 DBG("failed to restore crtc mode");
708 static const struct vm_operations_struct omap_gem_vm_ops = {
709 .fault = omap_gem_fault,
710 .open = drm_gem_vm_open,
711 .close = drm_gem_vm_close,
714 static const struct file_operations omapdriver_fops = {
715 .owner = THIS_MODULE,
717 .unlocked_ioctl = drm_ioctl,
718 .release = drm_release,
719 .mmap = omap_gem_mmap,
722 .llseek = noop_llseek,
725 static struct drm_driver omap_drm_driver = {
726 .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME |
729 .lastclose = dev_lastclose,
730 #ifdef CONFIG_DEBUG_FS
731 .debugfs_init = omap_debugfs_init,
733 .prime_handle_to_fd = drm_gem_prime_handle_to_fd,
734 .prime_fd_to_handle = drm_gem_prime_fd_to_handle,
735 .gem_prime_export = omap_gem_prime_export,
736 .gem_prime_import = omap_gem_prime_import,
737 .gem_free_object = omap_gem_free_object,
738 .gem_vm_ops = &omap_gem_vm_ops,
739 .dumb_create = omap_gem_dumb_create,
740 .dumb_map_offset = omap_gem_dumb_map_offset,
741 .dumb_destroy = drm_gem_dumb_destroy,
743 .num_ioctls = DRM_OMAP_NUM_IOCTLS,
744 .fops = &omapdriver_fops,
748 .major = DRIVER_MAJOR,
749 .minor = DRIVER_MINOR,
750 .patchlevel = DRIVER_PATCHLEVEL,
753 static int pdev_probe(struct platform_device *pdev)
755 struct omap_drm_platform_data *pdata = pdev->dev.platform_data;
756 struct omap_drm_private *priv;
757 struct drm_device *ddev;
761 DBG("%s", pdev->name);
763 if (omapdss_is_initialized() == false)
764 return -EPROBE_DEFER;
766 omap_crtc_pre_init();
768 ret = omap_connect_dssdevs();
770 goto err_crtc_uninit;
772 /* Allocate and initialize the driver private structure. */
773 priv = kzalloc(sizeof(*priv), GFP_KERNEL);
776 goto err_disconnect_dssdevs;
779 priv->omaprev = pdata->omaprev;
780 priv->wq = alloc_ordered_workqueue("omapdrm", 0);
782 init_waitqueue_head(&priv->commit.wait);
783 spin_lock_init(&priv->commit.lock);
784 spin_lock_init(&priv->list_lock);
785 INIT_LIST_HEAD(&priv->obj_list);
787 /* Allocate and initialize the DRM device. */
788 ddev = drm_dev_alloc(&omap_drm_driver, &pdev->dev);
794 ddev->dev_private = priv;
795 platform_set_drvdata(pdev, ddev);
799 ret = omap_modeset_init(ddev);
801 dev_err(&pdev->dev, "omap_modeset_init failed: ret=%d\n", ret);
802 goto err_free_drm_dev;
805 /* Initialize vblank handling, start with all CRTCs disabled. */
806 ret = drm_vblank_init(ddev, priv->num_crtcs);
808 dev_err(&pdev->dev, "could not init vblank\n");
809 goto err_cleanup_modeset;
812 for (i = 0; i < priv->num_crtcs; i++)
813 drm_crtc_vblank_off(priv->crtcs[i]);
815 priv->fbdev = omap_fbdev_init(ddev);
817 drm_kms_helper_poll_init(ddev);
820 * Register the DRM device with the core and the connectors with
823 ret = drm_dev_register(ddev, 0);
825 goto err_cleanup_helpers;
830 drm_kms_helper_poll_fini(ddev);
832 omap_fbdev_free(ddev);
834 drm_mode_config_cleanup(ddev);
835 omap_drm_irq_uninstall(ddev);
837 omap_gem_deinit(ddev);
840 destroy_workqueue(priv->wq);
842 err_disconnect_dssdevs:
843 omap_disconnect_dssdevs();
845 omap_crtc_pre_uninit();
849 static int pdev_remove(struct platform_device *pdev)
851 struct drm_device *ddev = platform_get_drvdata(pdev);
852 struct omap_drm_private *priv = ddev->dev_private;
856 drm_dev_unregister(ddev);
858 drm_kms_helper_poll_fini(ddev);
861 omap_fbdev_free(ddev);
863 drm_mode_config_cleanup(ddev);
865 omap_drm_irq_uninstall(ddev);
866 omap_gem_deinit(ddev);
870 destroy_workqueue(priv->wq);
873 omap_disconnect_dssdevs();
874 omap_crtc_pre_uninit();
879 #ifdef CONFIG_PM_SLEEP
880 static int omap_drm_suspend_all_displays(void)
882 struct omap_dss_device *dssdev = NULL;
884 for_each_dss_dev(dssdev) {
888 if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) {
889 dssdev->driver->disable(dssdev);
890 dssdev->activate_after_resume = true;
892 dssdev->activate_after_resume = false;
899 static int omap_drm_resume_all_displays(void)
901 struct omap_dss_device *dssdev = NULL;
903 for_each_dss_dev(dssdev) {
907 if (dssdev->activate_after_resume) {
908 dssdev->driver->enable(dssdev);
909 dssdev->activate_after_resume = false;
916 static int omap_drm_suspend(struct device *dev)
918 struct drm_device *drm_dev = dev_get_drvdata(dev);
920 drm_kms_helper_poll_disable(drm_dev);
922 drm_modeset_lock_all(drm_dev);
923 omap_drm_suspend_all_displays();
924 drm_modeset_unlock_all(drm_dev);
929 static int omap_drm_resume(struct device *dev)
931 struct drm_device *drm_dev = dev_get_drvdata(dev);
933 drm_modeset_lock_all(drm_dev);
934 omap_drm_resume_all_displays();
935 drm_modeset_unlock_all(drm_dev);
937 drm_kms_helper_poll_enable(drm_dev);
939 return omap_gem_resume(dev);
943 static SIMPLE_DEV_PM_OPS(omapdrm_pm_ops, omap_drm_suspend, omap_drm_resume);
945 static struct platform_driver pdev = {
948 .pm = &omapdrm_pm_ops,
951 .remove = pdev_remove,
954 static struct platform_driver * const drivers[] = {
959 static int __init omap_drm_init(void)
963 return platform_register_drivers(drivers, ARRAY_SIZE(drivers));
966 static void __exit omap_drm_fini(void)
970 platform_unregister_drivers(drivers, ARRAY_SIZE(drivers));
973 /* need late_initcall() so we load after dss_driver's are loaded */
974 late_initcall(omap_drm_init);
975 module_exit(omap_drm_fini);
977 MODULE_AUTHOR("Rob Clark <rob@ti.com>");
978 MODULE_DESCRIPTION("OMAP DRM Display Driver");
979 MODULE_ALIAS("platform:" DRIVER_NAME);
980 MODULE_LICENSE("GPL v2");