Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2015 Free Electrons |
| 3 | * Copyright (C) 2015 NextThing Co |
| 4 | * |
| 5 | * Maxime Ripard <maxime.ripard@free-electrons.com> |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU General Public License as |
| 9 | * published by the Free Software Foundation; either version 2 of |
| 10 | * the License, or (at your option) any later version. |
| 11 | */ |
| 12 | |
| 13 | #include <linux/component.h> |
Maxime Ripard | 8b11aaf | 2017-10-17 11:06:08 +0200 | [diff] [blame] | 14 | #include <linux/kfifo.h> |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 15 | #include <linux/of_graph.h> |
Maxime Ripard | 596afb6 | 2017-02-09 17:39:18 +0100 | [diff] [blame] | 16 | #include <linux/of_reserved_mem.h> |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 17 | |
| 18 | #include <drm/drmP.h> |
| 19 | #include <drm/drm_crtc_helper.h> |
| 20 | #include <drm/drm_fb_cma_helper.h> |
| 21 | #include <drm/drm_gem_cma_helper.h> |
Daniel Vetter | 44adece | 2016-08-10 18:52:34 +0200 | [diff] [blame] | 22 | #include <drm/drm_fb_helper.h> |
Russell King | 97ac0e4 | 2016-10-19 11:28:27 +0100 | [diff] [blame] | 23 | #include <drm/drm_of.h> |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 24 | |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 25 | #include "sun4i_drv.h" |
| 26 | #include "sun4i_framebuffer.h" |
Chen-Yu Tsai | b3f266e | 2017-02-23 16:05:36 +0800 | [diff] [blame] | 27 | #include "sun4i_tcon.h" |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 28 | |
Daniel Vetter | d55f7e5 | 2017-03-08 15:12:56 +0100 | [diff] [blame] | 29 | DEFINE_DRM_GEM_CMA_FOPS(sun4i_drv_fops); |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 30 | |
| 31 | static struct drm_driver sun4i_drv_driver = { |
| 32 | .driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_PRIME | DRIVER_ATOMIC, |
| 33 | |
| 34 | /* Generic Operations */ |
Noralf Trønnes | 22efc85 | 2017-11-15 15:19:53 +0100 | [diff] [blame] | 35 | .lastclose = drm_fb_helper_lastclose, |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 36 | .fops = &sun4i_drv_fops, |
| 37 | .name = "sun4i-drm", |
| 38 | .desc = "Allwinner sun4i Display Engine", |
| 39 | .date = "20150629", |
| 40 | .major = 1, |
| 41 | .minor = 0, |
| 42 | |
| 43 | /* GEM Operations */ |
| 44 | .dumb_create = drm_gem_cma_dumb_create, |
Daniel Vetter | ae2c622 | 2016-05-30 19:53:15 +0200 | [diff] [blame] | 45 | .gem_free_object_unlocked = drm_gem_cma_free_object, |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 46 | .gem_vm_ops = &drm_gem_cma_vm_ops, |
| 47 | |
| 48 | /* PRIME Operations */ |
| 49 | .prime_handle_to_fd = drm_gem_prime_handle_to_fd, |
| 50 | .prime_fd_to_handle = drm_gem_prime_fd_to_handle, |
| 51 | .gem_prime_import = drm_gem_prime_import, |
| 52 | .gem_prime_export = drm_gem_prime_export, |
| 53 | .gem_prime_get_sg_table = drm_gem_cma_prime_get_sg_table, |
| 54 | .gem_prime_import_sg_table = drm_gem_cma_prime_import_sg_table, |
| 55 | .gem_prime_vmap = drm_gem_cma_prime_vmap, |
| 56 | .gem_prime_vunmap = drm_gem_cma_prime_vunmap, |
| 57 | .gem_prime_mmap = drm_gem_cma_prime_mmap, |
| 58 | |
| 59 | /* Frame Buffer Operations */ |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 60 | }; |
| 61 | |
Maxime Ripard | 3d6bd90 | 2016-05-11 16:52:50 +0200 | [diff] [blame] | 62 | static void sun4i_remove_framebuffers(void) |
| 63 | { |
| 64 | struct apertures_struct *ap; |
| 65 | |
| 66 | ap = alloc_apertures(1); |
| 67 | if (!ap) |
| 68 | return; |
| 69 | |
| 70 | /* The framebuffer can be located anywhere in RAM */ |
| 71 | ap->ranges[0].base = 0; |
| 72 | ap->ranges[0].size = ~0; |
| 73 | |
Daniel Vetter | 44adece | 2016-08-10 18:52:34 +0200 | [diff] [blame] | 74 | drm_fb_helper_remove_conflicting_framebuffers(ap, "sun4i-drm-fb", false); |
Maxime Ripard | 3d6bd90 | 2016-05-11 16:52:50 +0200 | [diff] [blame] | 75 | kfree(ap); |
| 76 | } |
| 77 | |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 78 | static int sun4i_drv_bind(struct device *dev) |
| 79 | { |
| 80 | struct drm_device *drm; |
| 81 | struct sun4i_drv *drv; |
| 82 | int ret; |
| 83 | |
| 84 | drm = drm_dev_alloc(&sun4i_drv_driver, dev); |
Tom Gundersen | 0f28860 | 2016-09-21 16:59:19 +0200 | [diff] [blame] | 85 | if (IS_ERR(drm)) |
| 86 | return PTR_ERR(drm); |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 87 | |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 88 | drv = devm_kzalloc(dev, sizeof(*drv), GFP_KERNEL); |
| 89 | if (!drv) { |
| 90 | ret = -ENOMEM; |
| 91 | goto free_drm; |
| 92 | } |
| 93 | drm->dev_private = drv; |
Icenowy Zheng | 8796933 | 2017-05-17 22:47:17 +0800 | [diff] [blame] | 94 | INIT_LIST_HEAD(&drv->engine_list); |
Chen-Yu Tsai | 80a5824 | 2017-04-21 16:38:50 +0800 | [diff] [blame] | 95 | INIT_LIST_HEAD(&drv->tcon_list); |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 96 | |
Maxime Ripard | 596afb6 | 2017-02-09 17:39:18 +0100 | [diff] [blame] | 97 | ret = of_reserved_mem_device_init(dev); |
| 98 | if (ret && ret != -ENODEV) { |
| 99 | dev_err(drm->dev, "Couldn't claim our memory region\n"); |
| 100 | goto free_drm; |
| 101 | } |
| 102 | |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 103 | drm_mode_config_init(drm); |
| 104 | |
| 105 | ret = component_bind_all(drm->dev, drm); |
| 106 | if (ret) { |
| 107 | dev_err(drm->dev, "Couldn't bind all pipelines components\n"); |
Chen-Yu Tsai | 9d56def | 2017-02-17 11:13:25 +0800 | [diff] [blame] | 108 | goto cleanup_mode_config; |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 109 | } |
| 110 | |
Chen-Yu Tsai | 070badf | 2017-09-08 15:50:15 +0800 | [diff] [blame] | 111 | /* drm_vblank_init calls kcalloc, which can fail */ |
| 112 | ret = drm_vblank_init(drm, drm->mode_config.num_crtc); |
| 113 | if (ret) |
Christophe JAILLET | 9ca8614 | 2018-03-12 00:19:09 +0100 | [diff] [blame^] | 114 | goto cleanup_mode_config; |
Chen-Yu Tsai | 070badf | 2017-09-08 15:50:15 +0800 | [diff] [blame] | 115 | |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 116 | drm->irq_enabled = true; |
| 117 | |
Maxime Ripard | 3d6bd90 | 2016-05-11 16:52:50 +0200 | [diff] [blame] | 118 | /* Remove early framebuffers (ie. simplefb) */ |
| 119 | sun4i_remove_framebuffers(); |
| 120 | |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 121 | /* Create our framebuffer */ |
Noralf Trønnes | 22efc85 | 2017-11-15 15:19:53 +0100 | [diff] [blame] | 122 | ret = sun4i_framebuffer_init(drm); |
| 123 | if (ret) { |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 124 | dev_err(drm->dev, "Couldn't create our framebuffer\n"); |
Chen-Yu Tsai | 9d56def | 2017-02-17 11:13:25 +0800 | [diff] [blame] | 125 | goto cleanup_mode_config; |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 126 | } |
| 127 | |
| 128 | /* Enable connectors polling */ |
| 129 | drm_kms_helper_poll_init(drm); |
| 130 | |
| 131 | ret = drm_dev_register(drm, 0); |
| 132 | if (ret) |
Chen-Yu Tsai | 9d56def | 2017-02-17 11:13:25 +0800 | [diff] [blame] | 133 | goto finish_poll; |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 134 | |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 135 | return 0; |
| 136 | |
Chen-Yu Tsai | 9d56def | 2017-02-17 11:13:25 +0800 | [diff] [blame] | 137 | finish_poll: |
| 138 | drm_kms_helper_poll_fini(drm); |
| 139 | sun4i_framebuffer_free(drm); |
| 140 | cleanup_mode_config: |
| 141 | drm_mode_config_cleanup(drm); |
Maxime Ripard | 596afb6 | 2017-02-09 17:39:18 +0100 | [diff] [blame] | 142 | of_reserved_mem_device_release(dev); |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 143 | free_drm: |
| 144 | drm_dev_unref(drm); |
| 145 | return ret; |
| 146 | } |
| 147 | |
| 148 | static void sun4i_drv_unbind(struct device *dev) |
| 149 | { |
| 150 | struct drm_device *drm = dev_get_drvdata(dev); |
| 151 | |
| 152 | drm_dev_unregister(drm); |
| 153 | drm_kms_helper_poll_fini(drm); |
| 154 | sun4i_framebuffer_free(drm); |
Chen-Yu Tsai | 92caf9b | 2017-02-17 11:13:24 +0800 | [diff] [blame] | 155 | drm_mode_config_cleanup(drm); |
Maxime Ripard | 596afb6 | 2017-02-09 17:39:18 +0100 | [diff] [blame] | 156 | of_reserved_mem_device_release(dev); |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 157 | drm_dev_unref(drm); |
| 158 | } |
| 159 | |
| 160 | static const struct component_master_ops sun4i_drv_master_ops = { |
| 161 | .bind = sun4i_drv_bind, |
| 162 | .unbind = sun4i_drv_unbind, |
| 163 | }; |
| 164 | |
Maxime Ripard | 49baeb0 | 2017-05-27 18:09:32 +0200 | [diff] [blame] | 165 | static bool sun4i_drv_node_is_connector(struct device_node *node) |
| 166 | { |
| 167 | return of_device_is_compatible(node, "hdmi-connector"); |
| 168 | } |
| 169 | |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 170 | static bool sun4i_drv_node_is_frontend(struct device_node *node) |
| 171 | { |
Chen-Yu Tsai | 9a8187c | 2017-10-17 20:18:01 +0800 | [diff] [blame] | 172 | return of_device_is_compatible(node, "allwinner,sun4i-a10-display-frontend") || |
| 173 | of_device_is_compatible(node, "allwinner,sun5i-a13-display-frontend") || |
Chen-Yu Tsai | 49c440e | 2016-10-20 11:43:41 +0800 | [diff] [blame] | 174 | of_device_is_compatible(node, "allwinner,sun6i-a31-display-frontend") || |
Jonathan Liu | aaddb6d | 2017-10-17 20:18:02 +0800 | [diff] [blame] | 175 | of_device_is_compatible(node, "allwinner,sun7i-a20-display-frontend") || |
Maxime Ripard | 4a408f1 | 2016-01-07 12:32:25 +0100 | [diff] [blame] | 176 | of_device_is_compatible(node, "allwinner,sun8i-a33-display-frontend"); |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 177 | } |
| 178 | |
Maxime Ripard | 29e57fa | 2015-10-29 09:37:32 +0100 | [diff] [blame] | 179 | static bool sun4i_drv_node_is_tcon(struct device_node *node) |
| 180 | { |
Chen-Yu Tsai | ff71c2c | 2017-11-27 16:46:32 +0800 | [diff] [blame] | 181 | return !!of_match_node(sun4i_tcon_of_table, node); |
Maxime Ripard | 29e57fa | 2015-10-29 09:37:32 +0100 | [diff] [blame] | 182 | } |
| 183 | |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 184 | static int compare_of(struct device *dev, void *data) |
| 185 | { |
Rob Herring | 4bf9914 | 2017-07-18 16:43:04 -0500 | [diff] [blame] | 186 | DRM_DEBUG_DRIVER("Comparing of node %pOF with %pOF\n", |
| 187 | dev->of_node, |
| 188 | data); |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 189 | |
| 190 | return dev->of_node == data; |
| 191 | } |
| 192 | |
Chen-Yu Tsai | da82b87 | 2017-09-08 15:50:10 +0800 | [diff] [blame] | 193 | /* |
| 194 | * The encoder drivers use drm_of_find_possible_crtcs to get upstream |
| 195 | * crtcs from the device tree using of_graph. For the results to be |
| 196 | * correct, encoders must be probed/bound after _all_ crtcs have been |
| 197 | * created. The existing code uses a depth first recursive traversal |
| 198 | * of the of_graph, which means the encoders downstream of the TCON |
| 199 | * get add right after the first TCON. The second TCON or CRTC will |
| 200 | * never be properly associated with encoders connected to it. |
| 201 | * |
| 202 | * Also, in a dual display pipeline setup, both frontends can feed |
| 203 | * either backend, and both backends can feed either TCON, we want |
| 204 | * all components of the same type to be added before the next type |
| 205 | * in the pipeline. Fortunately, the pipelines are perfectly symmetric, |
| 206 | * i.e. components of the same type are at the same depth when counted |
| 207 | * from the frontend. The only exception is the third pipeline in |
| 208 | * the A80 SoC, which we do not support anyway. |
| 209 | * |
| 210 | * Hence we can use a breadth first search traversal order to add |
| 211 | * components. We do not need to check for duplicates. The component |
| 212 | * matching system handles this for us. |
| 213 | */ |
| 214 | struct endpoint_list { |
Maxime Ripard | 8b11aaf | 2017-10-17 11:06:08 +0200 | [diff] [blame] | 215 | DECLARE_KFIFO(fifo, struct device_node *, 16); |
Chen-Yu Tsai | da82b87 | 2017-09-08 15:50:10 +0800 | [diff] [blame] | 216 | }; |
| 217 | |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 218 | static int sun4i_drv_add_endpoints(struct device *dev, |
Maxime Ripard | 8b11aaf | 2017-10-17 11:06:08 +0200 | [diff] [blame] | 219 | struct endpoint_list *list, |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 220 | struct component_match **match, |
| 221 | struct device_node *node) |
| 222 | { |
| 223 | struct device_node *port, *ep, *remote; |
| 224 | int count = 0; |
| 225 | |
| 226 | /* |
| 227 | * We don't support the frontend for now, so we will never |
| 228 | * have a device bound. Just skip over it, but we still want |
| 229 | * the rest our pipeline to be added. |
| 230 | */ |
| 231 | if (!sun4i_drv_node_is_frontend(node) && |
| 232 | !of_device_is_available(node)) |
| 233 | return 0; |
| 234 | |
Maxime Ripard | 49baeb0 | 2017-05-27 18:09:32 +0200 | [diff] [blame] | 235 | /* |
| 236 | * The connectors will be the last nodes in our pipeline, we |
| 237 | * can just bail out. |
| 238 | */ |
| 239 | if (sun4i_drv_node_is_connector(node)) |
| 240 | return 0; |
| 241 | |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 242 | if (!sun4i_drv_node_is_frontend(node)) { |
| 243 | /* Add current component */ |
Rob Herring | 4bf9914 | 2017-07-18 16:43:04 -0500 | [diff] [blame] | 244 | DRM_DEBUG_DRIVER("Adding component %pOF\n", node); |
Russell King | 97ac0e4 | 2016-10-19 11:28:27 +0100 | [diff] [blame] | 245 | drm_of_component_match_add(dev, match, compare_of, node); |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 246 | count++; |
| 247 | } |
| 248 | |
| 249 | /* Inputs are listed first, then outputs */ |
| 250 | port = of_graph_get_port_by_id(node, 1); |
| 251 | if (!port) { |
| 252 | DRM_DEBUG_DRIVER("No output to bind\n"); |
| 253 | return count; |
| 254 | } |
| 255 | |
| 256 | for_each_available_child_of_node(port, ep) { |
| 257 | remote = of_graph_get_remote_port_parent(ep); |
| 258 | if (!remote) { |
| 259 | DRM_DEBUG_DRIVER("Error retrieving the output node\n"); |
| 260 | of_node_put(remote); |
| 261 | continue; |
| 262 | } |
| 263 | |
Maxime Ripard | 29e57fa | 2015-10-29 09:37:32 +0100 | [diff] [blame] | 264 | /* |
Maxime Ripard | 894f5a9 | 2016-04-11 12:16:33 +0200 | [diff] [blame] | 265 | * If the node is our TCON, the first port is used for |
| 266 | * panel or bridges, and will not be part of the |
Maxime Ripard | 29e57fa | 2015-10-29 09:37:32 +0100 | [diff] [blame] | 267 | * component framework. |
| 268 | */ |
| 269 | if (sun4i_drv_node_is_tcon(node)) { |
| 270 | struct of_endpoint endpoint; |
| 271 | |
| 272 | if (of_graph_parse_endpoint(ep, &endpoint)) { |
| 273 | DRM_DEBUG_DRIVER("Couldn't parse endpoint\n"); |
| 274 | continue; |
| 275 | } |
| 276 | |
| 277 | if (!endpoint.id) { |
| 278 | DRM_DEBUG_DRIVER("Endpoint is our panel... skipping\n"); |
| 279 | continue; |
| 280 | } |
| 281 | } |
| 282 | |
Maxime Ripard | 8b11aaf | 2017-10-17 11:06:08 +0200 | [diff] [blame] | 283 | kfifo_put(&list->fifo, remote); |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 284 | } |
| 285 | |
| 286 | return count; |
| 287 | } |
| 288 | |
| 289 | static int sun4i_drv_probe(struct platform_device *pdev) |
| 290 | { |
| 291 | struct component_match *match = NULL; |
Maxime Ripard | 8b11aaf | 2017-10-17 11:06:08 +0200 | [diff] [blame] | 292 | struct device_node *np = pdev->dev.of_node, *endpoint; |
| 293 | struct endpoint_list list; |
Chen-Yu Tsai | da82b87 | 2017-09-08 15:50:10 +0800 | [diff] [blame] | 294 | int i, ret, count = 0; |
Maxime Ripard | 8b11aaf | 2017-10-17 11:06:08 +0200 | [diff] [blame] | 295 | |
| 296 | INIT_KFIFO(list.fifo); |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 297 | |
| 298 | for (i = 0;; i++) { |
| 299 | struct device_node *pipeline = of_parse_phandle(np, |
| 300 | "allwinner,pipelines", |
| 301 | i); |
| 302 | if (!pipeline) |
| 303 | break; |
| 304 | |
Maxime Ripard | 8b11aaf | 2017-10-17 11:06:08 +0200 | [diff] [blame] | 305 | kfifo_put(&list.fifo, pipeline); |
Chen-Yu Tsai | da82b87 | 2017-09-08 15:50:10 +0800 | [diff] [blame] | 306 | } |
| 307 | |
Maxime Ripard | 8b11aaf | 2017-10-17 11:06:08 +0200 | [diff] [blame] | 308 | while (kfifo_get(&list.fifo, &endpoint)) { |
Chen-Yu Tsai | da82b87 | 2017-09-08 15:50:10 +0800 | [diff] [blame] | 309 | /* process this endpoint */ |
Maxime Ripard | 8b11aaf | 2017-10-17 11:06:08 +0200 | [diff] [blame] | 310 | ret = sun4i_drv_add_endpoints(&pdev->dev, &list, &match, |
| 311 | endpoint); |
Chen-Yu Tsai | da82b87 | 2017-09-08 15:50:10 +0800 | [diff] [blame] | 312 | |
| 313 | /* sun4i_drv_add_endpoints can fail to allocate memory */ |
| 314 | if (ret < 0) |
Maxime Ripard | 8b11aaf | 2017-10-17 11:06:08 +0200 | [diff] [blame] | 315 | return ret; |
Chen-Yu Tsai | da82b87 | 2017-09-08 15:50:10 +0800 | [diff] [blame] | 316 | |
| 317 | count += ret; |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 318 | } |
| 319 | |
| 320 | if (count) |
| 321 | return component_master_add_with_match(&pdev->dev, |
| 322 | &sun4i_drv_master_ops, |
| 323 | match); |
| 324 | else |
| 325 | return 0; |
| 326 | } |
| 327 | |
| 328 | static int sun4i_drv_remove(struct platform_device *pdev) |
| 329 | { |
| 330 | return 0; |
| 331 | } |
| 332 | |
| 333 | static const struct of_device_id sun4i_drv_of_table[] = { |
Chen-Yu Tsai | 9a8187c | 2017-10-17 20:18:01 +0800 | [diff] [blame] | 334 | { .compatible = "allwinner,sun4i-a10-display-engine" }, |
Maxime Ripard | 110d33d | 2017-05-27 18:09:36 +0200 | [diff] [blame] | 335 | { .compatible = "allwinner,sun5i-a10s-display-engine" }, |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 336 | { .compatible = "allwinner,sun5i-a13-display-engine" }, |
Chen-Yu Tsai | 49c440e | 2016-10-20 11:43:41 +0800 | [diff] [blame] | 337 | { .compatible = "allwinner,sun6i-a31-display-engine" }, |
| 338 | { .compatible = "allwinner,sun6i-a31s-display-engine" }, |
Jonathan Liu | aaddb6d | 2017-10-17 20:18:02 +0800 | [diff] [blame] | 339 | { .compatible = "allwinner,sun7i-a20-display-engine" }, |
Maxime Ripard | 4a408f1 | 2016-01-07 12:32:25 +0100 | [diff] [blame] | 340 | { .compatible = "allwinner,sun8i-a33-display-engine" }, |
Maxime Ripard | 2f0d7bb | 2017-12-21 12:02:34 +0100 | [diff] [blame] | 341 | { .compatible = "allwinner,sun8i-a83t-display-engine" }, |
Icenowy Zheng | 9df90c2 | 2017-05-17 22:47:21 +0800 | [diff] [blame] | 342 | { .compatible = "allwinner,sun8i-v3s-display-engine" }, |
Maxime Ripard | 9026e0d | 2015-10-29 09:36:23 +0100 | [diff] [blame] | 343 | { } |
| 344 | }; |
| 345 | MODULE_DEVICE_TABLE(of, sun4i_drv_of_table); |
| 346 | |
| 347 | static struct platform_driver sun4i_drv_platform_driver = { |
| 348 | .probe = sun4i_drv_probe, |
| 349 | .remove = sun4i_drv_remove, |
| 350 | .driver = { |
| 351 | .name = "sun4i-drm", |
| 352 | .of_match_table = sun4i_drv_of_table, |
| 353 | }, |
| 354 | }; |
| 355 | module_platform_driver(sun4i_drv_platform_driver); |
| 356 | |
| 357 | MODULE_AUTHOR("Boris Brezillon <boris.brezillon@free-electrons.com>"); |
| 358 | MODULE_AUTHOR("Maxime Ripard <maxime.ripard@free-electrons.com>"); |
| 359 | MODULE_DESCRIPTION("Allwinner A10 Display Engine DRM/KMS Driver"); |
| 360 | MODULE_LICENSE("GPL"); |