Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) STMicroelectronics SA 2014 |
| 3 | * Author: Benjamin Gaignard <benjamin.gaignard@st.com> for STMicroelectronics. |
| 4 | * License terms: GNU General Public License (GPL), version 2 |
| 5 | */ |
| 6 | |
| 7 | #include <drm/drmP.h> |
| 8 | |
| 9 | #include <linux/component.h> |
| 10 | #include <linux/debugfs.h> |
| 11 | #include <linux/kernel.h> |
| 12 | #include <linux/module.h> |
| 13 | #include <linux/of_platform.h> |
| 14 | |
Benjamin Gaignard | de4b00b | 2015-03-19 13:35:16 +0100 | [diff] [blame] | 15 | #include <drm/drm_atomic.h> |
| 16 | #include <drm/drm_atomic_helper.h> |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 17 | #include <drm/drm_crtc_helper.h> |
| 18 | #include <drm/drm_gem_cma_helper.h> |
| 19 | #include <drm/drm_fb_cma_helper.h> |
| 20 | |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 21 | #include "sti_crtc.h" |
| 22 | #include "sti_drv.h" |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 23 | |
| 24 | #define DRIVER_NAME "sti" |
| 25 | #define DRIVER_DESC "STMicroelectronics SoC DRM" |
| 26 | #define DRIVER_DATE "20140601" |
| 27 | #define DRIVER_MAJOR 1 |
| 28 | #define DRIVER_MINOR 0 |
| 29 | |
| 30 | #define STI_MAX_FB_HEIGHT 4096 |
| 31 | #define STI_MAX_FB_WIDTH 4096 |
| 32 | |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 33 | static void sti_atomic_schedule(struct sti_private *private, |
| 34 | struct drm_atomic_state *state) |
Benjamin Gaignard | de4b00b | 2015-03-19 13:35:16 +0100 | [diff] [blame] | 35 | { |
| 36 | private->commit.state = state; |
| 37 | schedule_work(&private->commit.work); |
| 38 | } |
| 39 | |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 40 | static void sti_atomic_complete(struct sti_private *private, |
| 41 | struct drm_atomic_state *state) |
Benjamin Gaignard | de4b00b | 2015-03-19 13:35:16 +0100 | [diff] [blame] | 42 | { |
| 43 | struct drm_device *drm = private->drm_dev; |
| 44 | |
| 45 | /* |
| 46 | * Everything below can be run asynchronously without the need to grab |
| 47 | * any modeset locks at all under one condition: It must be guaranteed |
| 48 | * that the asynchronous work has either been cancelled (if the driver |
| 49 | * supports it, which at least requires that the framebuffers get |
| 50 | * cleaned up with drm_atomic_helper_cleanup_planes()) or completed |
| 51 | * before the new state gets committed on the software side with |
| 52 | * drm_atomic_helper_swap_state(). |
| 53 | * |
| 54 | * This scheme allows new atomic state updates to be prepared and |
| 55 | * checked in parallel to the asynchronous completion of the previous |
| 56 | * update. Which is important since compositors need to figure out the |
| 57 | * composition of the next frame right after having submitted the |
| 58 | * current layout. |
| 59 | */ |
| 60 | |
| 61 | drm_atomic_helper_commit_modeset_disables(drm, state); |
Daniel Vetter | aef9dbb | 2015-09-08 12:02:07 +0200 | [diff] [blame] | 62 | drm_atomic_helper_commit_planes(drm, state, false); |
Benjamin Gaignard | de4b00b | 2015-03-19 13:35:16 +0100 | [diff] [blame] | 63 | drm_atomic_helper_commit_modeset_enables(drm, state); |
| 64 | |
| 65 | drm_atomic_helper_wait_for_vblanks(drm, state); |
| 66 | |
| 67 | drm_atomic_helper_cleanup_planes(drm, state); |
| 68 | drm_atomic_state_free(state); |
| 69 | } |
| 70 | |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 71 | static void sti_atomic_work(struct work_struct *work) |
Benjamin Gaignard | de4b00b | 2015-03-19 13:35:16 +0100 | [diff] [blame] | 72 | { |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 73 | struct sti_private *private = container_of(work, |
| 74 | struct sti_private, commit.work); |
Benjamin Gaignard | de4b00b | 2015-03-19 13:35:16 +0100 | [diff] [blame] | 75 | |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 76 | sti_atomic_complete(private, private->commit.state); |
Benjamin Gaignard | de4b00b | 2015-03-19 13:35:16 +0100 | [diff] [blame] | 77 | } |
| 78 | |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 79 | static int sti_atomic_commit(struct drm_device *drm, |
| 80 | struct drm_atomic_state *state, bool async) |
Benjamin Gaignard | de4b00b | 2015-03-19 13:35:16 +0100 | [diff] [blame] | 81 | { |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 82 | struct sti_private *private = drm->dev_private; |
Benjamin Gaignard | de4b00b | 2015-03-19 13:35:16 +0100 | [diff] [blame] | 83 | int err; |
| 84 | |
| 85 | err = drm_atomic_helper_prepare_planes(drm, state); |
| 86 | if (err) |
| 87 | return err; |
| 88 | |
| 89 | /* serialize outstanding asynchronous commits */ |
| 90 | mutex_lock(&private->commit.lock); |
| 91 | flush_work(&private->commit.work); |
| 92 | |
| 93 | /* |
| 94 | * This is the point of no return - everything below never fails except |
| 95 | * when the hw goes bonghits. Which means we can commit the new state on |
| 96 | * the software side now. |
| 97 | */ |
| 98 | |
| 99 | drm_atomic_helper_swap_state(drm, state); |
| 100 | |
| 101 | if (async) |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 102 | sti_atomic_schedule(private, state); |
Benjamin Gaignard | de4b00b | 2015-03-19 13:35:16 +0100 | [diff] [blame] | 103 | else |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 104 | sti_atomic_complete(private, state); |
Benjamin Gaignard | de4b00b | 2015-03-19 13:35:16 +0100 | [diff] [blame] | 105 | |
| 106 | mutex_unlock(&private->commit.lock); |
| 107 | return 0; |
| 108 | } |
| 109 | |
Ville Syrjälä | c5de485 | 2015-09-02 13:44:15 +0300 | [diff] [blame] | 110 | static const struct drm_mode_config_funcs sti_mode_config_funcs = { |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 111 | .fb_create = drm_fb_cma_create, |
Benjamin Gaignard | de4b00b | 2015-03-19 13:35:16 +0100 | [diff] [blame] | 112 | .atomic_check = drm_atomic_helper_check, |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 113 | .atomic_commit = sti_atomic_commit, |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 114 | }; |
| 115 | |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 116 | static void sti_mode_config_init(struct drm_device *dev) |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 117 | { |
| 118 | dev->mode_config.min_width = 0; |
| 119 | dev->mode_config.min_height = 0; |
| 120 | |
| 121 | /* |
| 122 | * set max width and height as default value. |
| 123 | * this value would be used to check framebuffer size limitation |
| 124 | * at drm_mode_addfb(). |
| 125 | */ |
Vincent Abriou | 738be9d | 2015-10-29 14:20:27 +0100 | [diff] [blame^] | 126 | dev->mode_config.max_width = STI_MAX_FB_WIDTH; |
| 127 | dev->mode_config.max_height = STI_MAX_FB_HEIGHT; |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 128 | |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 129 | dev->mode_config.funcs = &sti_mode_config_funcs; |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 130 | } |
| 131 | |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 132 | static int sti_load(struct drm_device *dev, unsigned long flags) |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 133 | { |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 134 | struct sti_private *private; |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 135 | int ret; |
| 136 | |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 137 | private = kzalloc(sizeof(*private), GFP_KERNEL); |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 138 | if (!private) { |
| 139 | DRM_ERROR("Failed to allocate private\n"); |
| 140 | return -ENOMEM; |
| 141 | } |
| 142 | dev->dev_private = (void *)private; |
| 143 | private->drm_dev = dev; |
| 144 | |
Benjamin Gaignard | de4b00b | 2015-03-19 13:35:16 +0100 | [diff] [blame] | 145 | mutex_init(&private->commit.lock); |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 146 | INIT_WORK(&private->commit.work, sti_atomic_work); |
Benjamin Gaignard | de4b00b | 2015-03-19 13:35:16 +0100 | [diff] [blame] | 147 | |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 148 | drm_mode_config_init(dev); |
| 149 | drm_kms_helper_poll_init(dev); |
| 150 | |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 151 | sti_mode_config_init(dev); |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 152 | |
| 153 | ret = component_bind_all(dev->dev, dev); |
Benjamin Gaignard | f78e772 | 2014-12-11 13:35:29 +0100 | [diff] [blame] | 154 | if (ret) { |
| 155 | drm_kms_helper_poll_fini(dev); |
| 156 | drm_mode_config_cleanup(dev); |
| 157 | kfree(private); |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 158 | return ret; |
Benjamin Gaignard | f78e772 | 2014-12-11 13:35:29 +0100 | [diff] [blame] | 159 | } |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 160 | |
Benjamin Gaignard | de4b00b | 2015-03-19 13:35:16 +0100 | [diff] [blame] | 161 | drm_mode_config_reset(dev); |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 162 | |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 163 | drm_fbdev_cma_init(dev, 32, |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 164 | dev->mode_config.num_crtc, |
| 165 | dev->mode_config.num_connector); |
Archit Taneja | b5d34a2 | 2015-10-27 13:40:58 +0530 | [diff] [blame] | 166 | |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 167 | return 0; |
| 168 | } |
| 169 | |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 170 | static const struct file_operations sti_driver_fops = { |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 171 | .owner = THIS_MODULE, |
| 172 | .open = drm_open, |
| 173 | .mmap = drm_gem_cma_mmap, |
| 174 | .poll = drm_poll, |
| 175 | .read = drm_read, |
| 176 | .unlocked_ioctl = drm_ioctl, |
| 177 | #ifdef CONFIG_COMPAT |
| 178 | .compat_ioctl = drm_compat_ioctl, |
| 179 | #endif |
| 180 | .release = drm_release, |
| 181 | }; |
| 182 | |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 183 | static struct dma_buf *sti_gem_prime_export(struct drm_device *dev, |
| 184 | struct drm_gem_object *obj, |
| 185 | int flags) |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 186 | { |
| 187 | /* we want to be able to write in mmapped buffer */ |
| 188 | flags |= O_RDWR; |
| 189 | return drm_gem_prime_export(dev, obj, flags); |
| 190 | } |
| 191 | |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 192 | static struct drm_driver sti_driver = { |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 193 | .driver_features = DRIVER_HAVE_IRQ | DRIVER_MODESET | |
| 194 | DRIVER_GEM | DRIVER_PRIME, |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 195 | .load = sti_load, |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 196 | .gem_free_object = drm_gem_cma_free_object, |
| 197 | .gem_vm_ops = &drm_gem_cma_vm_ops, |
| 198 | .dumb_create = drm_gem_cma_dumb_create, |
| 199 | .dumb_map_offset = drm_gem_cma_dumb_map_offset, |
| 200 | .dumb_destroy = drm_gem_dumb_destroy, |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 201 | .fops = &sti_driver_fops, |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 202 | |
Ville Syrjälä | b44f840 | 2015-09-30 16:46:48 +0300 | [diff] [blame] | 203 | .get_vblank_counter = drm_vblank_no_hw_counter, |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 204 | .enable_vblank = sti_crtc_enable_vblank, |
| 205 | .disable_vblank = sti_crtc_disable_vblank, |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 206 | |
| 207 | .prime_handle_to_fd = drm_gem_prime_handle_to_fd, |
| 208 | .prime_fd_to_handle = drm_gem_prime_fd_to_handle, |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 209 | .gem_prime_export = sti_gem_prime_export, |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 210 | .gem_prime_import = drm_gem_prime_import, |
| 211 | .gem_prime_get_sg_table = drm_gem_cma_prime_get_sg_table, |
| 212 | .gem_prime_import_sg_table = drm_gem_cma_prime_import_sg_table, |
| 213 | .gem_prime_vmap = drm_gem_cma_prime_vmap, |
| 214 | .gem_prime_vunmap = drm_gem_cma_prime_vunmap, |
| 215 | .gem_prime_mmap = drm_gem_cma_prime_mmap, |
| 216 | |
| 217 | .name = DRIVER_NAME, |
| 218 | .desc = DRIVER_DESC, |
| 219 | .date = DRIVER_DATE, |
| 220 | .major = DRIVER_MAJOR, |
| 221 | .minor = DRIVER_MINOR, |
| 222 | }; |
| 223 | |
| 224 | static int compare_of(struct device *dev, void *data) |
| 225 | { |
| 226 | return dev->of_node == data; |
| 227 | } |
| 228 | |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 229 | static int sti_bind(struct device *dev) |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 230 | { |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 231 | return drm_platform_init(&sti_driver, to_platform_device(dev)); |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 232 | } |
| 233 | |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 234 | static void sti_unbind(struct device *dev) |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 235 | { |
| 236 | drm_put_dev(dev_get_drvdata(dev)); |
| 237 | } |
| 238 | |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 239 | static const struct component_master_ops sti_ops = { |
| 240 | .bind = sti_bind, |
| 241 | .unbind = sti_unbind, |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 242 | }; |
| 243 | |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 244 | static int sti_platform_probe(struct platform_device *pdev) |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 245 | { |
| 246 | struct device *dev = &pdev->dev; |
Benjamin Gaignard | 53bdcf5 | 2015-07-17 12:06:11 +0200 | [diff] [blame] | 247 | struct device_node *node = dev->of_node; |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 248 | struct device_node *child_np; |
| 249 | struct component_match *match = NULL; |
| 250 | |
| 251 | dma_set_coherent_mask(dev, DMA_BIT_MASK(32)); |
| 252 | |
Benjamin Gaignard | 53bdcf5 | 2015-07-17 12:06:11 +0200 | [diff] [blame] | 253 | of_platform_populate(node, NULL, NULL, dev); |
| 254 | |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 255 | child_np = of_get_next_available_child(node, NULL); |
| 256 | |
| 257 | while (child_np) { |
| 258 | component_match_add(dev, &match, compare_of, child_np); |
| 259 | of_node_put(child_np); |
| 260 | child_np = of_get_next_available_child(node, child_np); |
| 261 | } |
| 262 | |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 263 | return component_master_add_with_match(dev, &sti_ops, match); |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 264 | } |
| 265 | |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 266 | static int sti_platform_remove(struct platform_device *pdev) |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 267 | { |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 268 | component_master_del(&pdev->dev, &sti_ops); |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 269 | of_platform_depopulate(&pdev->dev); |
Benjamin Gaignard | 53bdcf5 | 2015-07-17 12:06:11 +0200 | [diff] [blame] | 270 | |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 271 | return 0; |
| 272 | } |
| 273 | |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 274 | static const struct of_device_id sti_dt_ids[] = { |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 275 | { .compatible = "st,sti-display-subsystem", }, |
| 276 | { /* end node */ }, |
| 277 | }; |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 278 | MODULE_DEVICE_TABLE(of, sti_dt_ids); |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 279 | |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 280 | static struct platform_driver sti_platform_driver = { |
| 281 | .probe = sti_platform_probe, |
| 282 | .remove = sti_platform_remove, |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 283 | .driver = { |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 284 | .name = DRIVER_NAME, |
Vincent Abriou | 9e1f05b | 2015-07-31 11:32:34 +0200 | [diff] [blame] | 285 | .of_match_table = sti_dt_ids, |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 286 | }, |
| 287 | }; |
| 288 | |
Thierry Reding | dcec16e | 2015-09-24 19:02:40 +0200 | [diff] [blame] | 289 | static struct platform_driver * const drivers[] = { |
| 290 | &sti_tvout_driver, |
| 291 | &sti_vtac_driver, |
| 292 | &sti_hqvdp_driver, |
| 293 | &sti_hdmi_driver, |
| 294 | &sti_hda_driver, |
| 295 | &sti_dvo_driver, |
| 296 | &sti_vtg_driver, |
| 297 | &sti_compositor_driver, |
| 298 | &sti_platform_driver, |
| 299 | }; |
| 300 | |
| 301 | static int sti_drm_init(void) |
| 302 | { |
| 303 | return platform_register_drivers(drivers, ARRAY_SIZE(drivers)); |
| 304 | } |
| 305 | module_init(sti_drm_init); |
| 306 | |
| 307 | static void sti_drm_exit(void) |
| 308 | { |
| 309 | platform_unregister_drivers(drivers, ARRAY_SIZE(drivers)); |
| 310 | } |
| 311 | module_exit(sti_drm_exit); |
Benjamin Gaignard | 9bbf86f | 2014-07-31 09:39:11 +0200 | [diff] [blame] | 312 | |
| 313 | MODULE_AUTHOR("Benjamin Gaignard <benjamin.gaignard@st.com>"); |
| 314 | MODULE_DESCRIPTION("STMicroelectronics SoC DRM driver"); |
| 315 | MODULE_LICENSE("GPL"); |