blob: 6fe161192bb4958eac8c9cd7161e247fcadeb885 [file] [log] [blame]
Mark Yao2048e322014-08-22 18:36:26 +08001/*
2 * Copyright (C) Fuzhou Rockchip Electronics Co.Ltd
3 * Author:Mark Yao <mark.yao@rock-chips.com>
4 *
5 * based on exynos_drm_drv.c
6 *
7 * This software is licensed under the terms of the GNU General Public
8 * License version 2, as published by the Free Software Foundation, and
9 * may be copied, distributed, and modified under those terms.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 */
16
17#include <asm/dma-iommu.h>
18
19#include <drm/drmP.h>
20#include <drm/drm_crtc_helper.h>
21#include <drm/drm_fb_helper.h>
Daniel Vetter80f67cd2016-05-30 19:53:12 +020022#include <drm/drm_gem_cma_helper.h>
Russell King97ac0e42016-10-19 11:28:27 +010023#include <drm/drm_of.h>
Mark Yao2048e322014-08-22 18:36:26 +080024#include <linux/dma-mapping.h>
25#include <linux/pm_runtime.h>
Paul Gortmaker00fe6142015-05-01 20:02:30 -040026#include <linux/module.h>
Mark Yao2048e322014-08-22 18:36:26 +080027#include <linux/of_graph.h>
28#include <linux/component.h>
Tomeu Vizoso5a587382016-06-06 16:53:32 +020029#include <linux/console.h>
Mark Yao2048e322014-08-22 18:36:26 +080030
31#include "rockchip_drm_drv.h"
32#include "rockchip_drm_fb.h"
33#include "rockchip_drm_fbdev.h"
34#include "rockchip_drm_gem.h"
35
36#define DRIVER_NAME "rockchip"
37#define DRIVER_DESC "RockChip Soc DRM"
38#define DRIVER_DATE "20140818"
39#define DRIVER_MAJOR 1
40#define DRIVER_MINOR 0
41
Mark Yao2d90d472016-04-19 10:13:27 +080042static bool is_support_iommu = true;
Tomeu Vizosof7069742016-06-10 13:14:13 +020043static struct drm_driver rockchip_drm_driver;
Mark Yao2d90d472016-04-19 10:13:27 +080044
Mark Yao2048e322014-08-22 18:36:26 +080045/*
46 * Attach a (component) device to the shared drm dma mapping from master drm
47 * device. This is used by the VOPs to map GEM buffers to a common DMA
48 * mapping.
49 */
50int rockchip_drm_dma_attach_device(struct drm_device *drm_dev,
51 struct device *dev)
52{
53 struct dma_iommu_mapping *mapping = drm_dev->dev->archdata.mapping;
54 int ret;
55
Mark Yao2d90d472016-04-19 10:13:27 +080056 if (!is_support_iommu)
57 return 0;
58
Mark Yao2048e322014-08-22 18:36:26 +080059 ret = dma_set_coherent_mask(dev, DMA_BIT_MASK(32));
60 if (ret)
61 return ret;
62
63 dma_set_max_seg_size(dev, DMA_BIT_MASK(32));
64
65 return arm_iommu_attach_device(dev, mapping);
66}
Mark Yao2048e322014-08-22 18:36:26 +080067
68void rockchip_drm_dma_detach_device(struct drm_device *drm_dev,
69 struct device *dev)
70{
Mark Yao2d90d472016-04-19 10:13:27 +080071 if (!is_support_iommu)
72 return;
73
Mark Yao2048e322014-08-22 18:36:26 +080074 arm_iommu_detach_device(dev);
75}
Mark Yao2048e322014-08-22 18:36:26 +080076
Mark Yaob5f7b752015-11-23 15:21:08 +080077int rockchip_register_crtc_funcs(struct drm_crtc *crtc,
78 const struct rockchip_crtc_funcs *crtc_funcs)
Mark Yao2048e322014-08-22 18:36:26 +080079{
Mark Yaob5f7b752015-11-23 15:21:08 +080080 int pipe = drm_crtc_index(crtc);
81 struct rockchip_drm_private *priv = crtc->dev->dev_private;
Mark Yao2048e322014-08-22 18:36:26 +080082
Dan Carpenter15da7802016-07-13 13:15:04 +030083 if (pipe >= ROCKCHIP_MAX_CRTC)
Mark Yao2048e322014-08-22 18:36:26 +080084 return -EINVAL;
85
86 priv->crtc_funcs[pipe] = crtc_funcs;
87
88 return 0;
89}
Mark Yao2048e322014-08-22 18:36:26 +080090
Mark Yaob5f7b752015-11-23 15:21:08 +080091void rockchip_unregister_crtc_funcs(struct drm_crtc *crtc)
Mark Yao2048e322014-08-22 18:36:26 +080092{
Mark Yaob5f7b752015-11-23 15:21:08 +080093 int pipe = drm_crtc_index(crtc);
94 struct rockchip_drm_private *priv = crtc->dev->dev_private;
Mark Yao2048e322014-08-22 18:36:26 +080095
Dan Carpenter15da7802016-07-13 13:15:04 +030096 if (pipe >= ROCKCHIP_MAX_CRTC)
Mark Yao2048e322014-08-22 18:36:26 +080097 return;
98
99 priv->crtc_funcs[pipe] = NULL;
100}
Mark Yao2048e322014-08-22 18:36:26 +0800101
102static struct drm_crtc *rockchip_crtc_from_pipe(struct drm_device *drm,
103 int pipe)
104{
105 struct drm_crtc *crtc;
106 int i = 0;
107
108 list_for_each_entry(crtc, &drm->mode_config.crtc_list, head)
109 if (i++ == pipe)
110 return crtc;
111
112 return NULL;
113}
114
Thierry Reding88e72712015-09-24 18:35:31 +0200115static int rockchip_drm_crtc_enable_vblank(struct drm_device *dev,
116 unsigned int pipe)
Mark Yao2048e322014-08-22 18:36:26 +0800117{
118 struct rockchip_drm_private *priv = dev->dev_private;
119 struct drm_crtc *crtc = rockchip_crtc_from_pipe(dev, pipe);
120
121 if (crtc && priv->crtc_funcs[pipe] &&
122 priv->crtc_funcs[pipe]->enable_vblank)
123 return priv->crtc_funcs[pipe]->enable_vblank(crtc);
124
125 return 0;
126}
127
Thierry Reding88e72712015-09-24 18:35:31 +0200128static void rockchip_drm_crtc_disable_vblank(struct drm_device *dev,
129 unsigned int pipe)
Mark Yao2048e322014-08-22 18:36:26 +0800130{
131 struct rockchip_drm_private *priv = dev->dev_private;
132 struct drm_crtc *crtc = rockchip_crtc_from_pipe(dev, pipe);
133
134 if (crtc && priv->crtc_funcs[pipe] &&
135 priv->crtc_funcs[pipe]->enable_vblank)
136 priv->crtc_funcs[pipe]->disable_vblank(crtc);
137}
138
Tomeu Vizosof7069742016-06-10 13:14:13 +0200139static int rockchip_drm_bind(struct device *dev)
Mark Yao2048e322014-08-22 18:36:26 +0800140{
Tomeu Vizosof7069742016-06-10 13:14:13 +0200141 struct drm_device *drm_dev;
Mark Yao2048e322014-08-22 18:36:26 +0800142 struct rockchip_drm_private *private;
Mark Yao2d90d472016-04-19 10:13:27 +0800143 struct dma_iommu_mapping *mapping = NULL;
Mark Yao2048e322014-08-22 18:36:26 +0800144 int ret;
145
Tomeu Vizosof7069742016-06-10 13:14:13 +0200146 drm_dev = drm_dev_alloc(&rockchip_drm_driver, dev);
Tom Gundersen0f288602016-09-21 16:59:19 +0200147 if (IS_ERR(drm_dev))
148 return PTR_ERR(drm_dev);
Mark Yao2048e322014-08-22 18:36:26 +0800149
Tomeu Vizosof7069742016-06-10 13:14:13 +0200150 dev_set_drvdata(dev, drm_dev);
151
152 private = devm_kzalloc(drm_dev->dev, sizeof(*private), GFP_KERNEL);
153 if (!private) {
154 ret = -ENOMEM;
Tomasz Figa9127f992016-06-21 13:27:34 +0900155 goto err_free;
Tomeu Vizosof7069742016-06-10 13:14:13 +0200156 }
157
Mark Yao2048e322014-08-22 18:36:26 +0800158 drm_dev->dev_private = private;
159
Yakir Yang5182c1a2016-07-24 14:57:44 +0800160 INIT_LIST_HEAD(&private->psr_list);
Sean Paul18d8d4d2016-08-16 16:11:28 -0700161 spin_lock_init(&private->psr_list_lock);
Yakir Yang5182c1a2016-07-24 14:57:44 +0800162
Mark Yao2048e322014-08-22 18:36:26 +0800163 drm_mode_config_init(drm_dev);
164
165 rockchip_drm_mode_config_init(drm_dev);
166
167 dev->dma_parms = devm_kzalloc(dev, sizeof(*dev->dma_parms),
168 GFP_KERNEL);
169 if (!dev->dma_parms) {
170 ret = -ENOMEM;
171 goto err_config_cleanup;
172 }
173
Mark Yao2d90d472016-04-19 10:13:27 +0800174 if (is_support_iommu) {
175 /* TODO(djkurtz): fetch the mapping start/size from somewhere */
176 mapping = arm_iommu_create_mapping(&platform_bus_type,
177 0x00000000,
178 SZ_2G);
179 if (IS_ERR(mapping)) {
180 ret = PTR_ERR(mapping);
181 goto err_config_cleanup;
182 }
183
184 ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32));
185 if (ret)
186 goto err_release_mapping;
187
188 dma_set_max_seg_size(dev, DMA_BIT_MASK(32));
189
190 ret = arm_iommu_attach_device(dev, mapping);
191 if (ret)
192 goto err_release_mapping;
Mark Yao2048e322014-08-22 18:36:26 +0800193 }
194
Mark Yao2048e322014-08-22 18:36:26 +0800195 /* Try to bind all sub drivers. */
196 ret = component_bind_all(dev, drm_dev);
197 if (ret)
198 goto err_detach_device;
199
200 /* init kms poll for handling hpd */
201 drm_kms_helper_poll_init(drm_dev);
202
203 /*
204 * enable drm irq mode.
205 * - with irq_enabled = true, we can use the vblank feature.
206 */
207 drm_dev->irq_enabled = true;
208
209 ret = drm_vblank_init(drm_dev, ROCKCHIP_MAX_CRTC);
210 if (ret)
211 goto err_kms_helper_poll_fini;
212
Mark Yao63ebb9f2015-11-30 18:22:42 +0800213 drm_mode_config_reset(drm_dev);
214
Mark Yao2048e322014-08-22 18:36:26 +0800215 ret = rockchip_drm_fbdev_init(drm_dev);
216 if (ret)
217 goto err_vblank_cleanup;
218
Tomasz Figa9127f992016-06-21 13:27:34 +0900219 ret = drm_dev_register(drm_dev, 0);
220 if (ret)
221 goto err_fbdev_fini;
222
Mark Yao2d90d472016-04-19 10:13:27 +0800223 if (is_support_iommu)
224 arm_iommu_release_mapping(mapping);
Mark Yao2048e322014-08-22 18:36:26 +0800225 return 0;
Tomasz Figa9127f992016-06-21 13:27:34 +0900226err_fbdev_fini:
227 rockchip_drm_fbdev_fini(drm_dev);
Mark Yao2048e322014-08-22 18:36:26 +0800228err_vblank_cleanup:
229 drm_vblank_cleanup(drm_dev);
230err_kms_helper_poll_fini:
231 drm_kms_helper_poll_fini(drm_dev);
232 component_unbind_all(dev, drm_dev);
233err_detach_device:
Mark Yao2d90d472016-04-19 10:13:27 +0800234 if (is_support_iommu)
235 arm_iommu_detach_device(dev);
Mark Yao2048e322014-08-22 18:36:26 +0800236err_release_mapping:
Mark Yao2d90d472016-04-19 10:13:27 +0800237 if (is_support_iommu)
238 arm_iommu_release_mapping(mapping);
Mark Yao2048e322014-08-22 18:36:26 +0800239err_config_cleanup:
240 drm_mode_config_cleanup(drm_dev);
241 drm_dev->dev_private = NULL;
Tomeu Vizosof7069742016-06-10 13:14:13 +0200242err_free:
243 drm_dev_unref(drm_dev);
Mark Yao2048e322014-08-22 18:36:26 +0800244 return ret;
245}
246
Tomeu Vizosof7069742016-06-10 13:14:13 +0200247static void rockchip_drm_unbind(struct device *dev)
Mark Yao2048e322014-08-22 18:36:26 +0800248{
Tomeu Vizosof7069742016-06-10 13:14:13 +0200249 struct drm_device *drm_dev = dev_get_drvdata(dev);
Mark Yao2048e322014-08-22 18:36:26 +0800250
251 rockchip_drm_fbdev_fini(drm_dev);
252 drm_vblank_cleanup(drm_dev);
253 drm_kms_helper_poll_fini(drm_dev);
254 component_unbind_all(dev, drm_dev);
Mark Yao2d90d472016-04-19 10:13:27 +0800255 if (is_support_iommu)
256 arm_iommu_detach_device(dev);
Mark Yao2048e322014-08-22 18:36:26 +0800257 drm_mode_config_cleanup(drm_dev);
258 drm_dev->dev_private = NULL;
Tomeu Vizosof7069742016-06-10 13:14:13 +0200259 drm_dev_unregister(drm_dev);
260 drm_dev_unref(drm_dev);
261 dev_set_drvdata(dev, NULL);
Mark Yao2048e322014-08-22 18:36:26 +0800262}
263
John Keeping8ff490a2016-05-10 17:03:56 +0100264static void rockchip_drm_lastclose(struct drm_device *dev)
Mark Yao2048e322014-08-22 18:36:26 +0800265{
266 struct rockchip_drm_private *priv = dev->dev_private;
267
268 drm_fb_helper_restore_fbdev_mode_unlocked(&priv->fbdev_helper);
269}
270
271static const struct file_operations rockchip_drm_driver_fops = {
272 .owner = THIS_MODULE,
273 .open = drm_open,
274 .mmap = rockchip_gem_mmap,
275 .poll = drm_poll,
276 .read = drm_read,
277 .unlocked_ioctl = drm_ioctl,
278#ifdef CONFIG_COMPAT
279 .compat_ioctl = drm_compat_ioctl,
280#endif
281 .release = drm_release,
282};
283
Mark Yao2048e322014-08-22 18:36:26 +0800284static struct drm_driver rockchip_drm_driver = {
Mark Yao63ebb9f2015-11-30 18:22:42 +0800285 .driver_features = DRIVER_MODESET | DRIVER_GEM |
286 DRIVER_PRIME | DRIVER_ATOMIC,
Mark Yao2048e322014-08-22 18:36:26 +0800287 .lastclose = rockchip_drm_lastclose,
Ville Syrjäläb44f8402015-09-30 16:46:48 +0300288 .get_vblank_counter = drm_vblank_no_hw_counter,
Mark Yao2048e322014-08-22 18:36:26 +0800289 .enable_vblank = rockchip_drm_crtc_enable_vblank,
290 .disable_vblank = rockchip_drm_crtc_disable_vblank,
Daniel Vetter80f67cd2016-05-30 19:53:12 +0200291 .gem_vm_ops = &drm_gem_cma_vm_ops,
Daniel Vetterc2466ac2016-05-30 19:53:03 +0200292 .gem_free_object_unlocked = rockchip_gem_free_object,
Mark Yao2048e322014-08-22 18:36:26 +0800293 .dumb_create = rockchip_gem_dumb_create,
294 .dumb_map_offset = rockchip_gem_dumb_map_offset,
295 .dumb_destroy = drm_gem_dumb_destroy,
296 .prime_handle_to_fd = drm_gem_prime_handle_to_fd,
297 .prime_fd_to_handle = drm_gem_prime_fd_to_handle,
298 .gem_prime_import = drm_gem_prime_import,
299 .gem_prime_export = drm_gem_prime_export,
300 .gem_prime_get_sg_table = rockchip_gem_prime_get_sg_table,
301 .gem_prime_vmap = rockchip_gem_prime_vmap,
302 .gem_prime_vunmap = rockchip_gem_prime_vunmap,
303 .gem_prime_mmap = rockchip_gem_mmap_buf,
304 .fops = &rockchip_drm_driver_fops,
305 .name = DRIVER_NAME,
306 .desc = DRIVER_DESC,
307 .date = DRIVER_DATE,
308 .major = DRIVER_MAJOR,
309 .minor = DRIVER_MINOR,
310};
311
312#ifdef CONFIG_PM_SLEEP
Baoyou Xie623981772016-09-25 15:43:08 +0800313static void rockchip_drm_fb_suspend(struct drm_device *drm)
Tomeu Vizoso5a587382016-06-06 16:53:32 +0200314{
315 struct rockchip_drm_private *priv = drm->dev_private;
316
317 console_lock();
318 drm_fb_helper_set_suspend(&priv->fbdev_helper, 1);
319 console_unlock();
320}
321
Baoyou Xie623981772016-09-25 15:43:08 +0800322static void rockchip_drm_fb_resume(struct drm_device *drm)
Tomeu Vizoso5a587382016-06-06 16:53:32 +0200323{
324 struct rockchip_drm_private *priv = drm->dev_private;
325
326 console_lock();
327 drm_fb_helper_set_suspend(&priv->fbdev_helper, 0);
328 console_unlock();
329}
330
Mark Yao2048e322014-08-22 18:36:26 +0800331static int rockchip_drm_sys_suspend(struct device *dev)
332{
333 struct drm_device *drm = dev_get_drvdata(dev);
Tomeu Vizoso5a587382016-06-06 16:53:32 +0200334 struct rockchip_drm_private *priv = drm->dev_private;
Mark Yao2048e322014-08-22 18:36:26 +0800335
Tomeu Vizoso5a587382016-06-06 16:53:32 +0200336 drm_kms_helper_poll_disable(drm);
337 rockchip_drm_fb_suspend(drm);
Mark Yao2048e322014-08-22 18:36:26 +0800338
Tomeu Vizoso5a587382016-06-06 16:53:32 +0200339 priv->state = drm_atomic_helper_suspend(drm);
340 if (IS_ERR(priv->state)) {
341 rockchip_drm_fb_resume(drm);
342 drm_kms_helper_poll_enable(drm);
343 return PTR_ERR(priv->state);
Mark Yao2048e322014-08-22 18:36:26 +0800344 }
Mark Yao2048e322014-08-22 18:36:26 +0800345
346 return 0;
347}
348
349static int rockchip_drm_sys_resume(struct device *dev)
350{
351 struct drm_device *drm = dev_get_drvdata(dev);
Tomeu Vizoso5a587382016-06-06 16:53:32 +0200352 struct rockchip_drm_private *priv = drm->dev_private;
Mark Yao2048e322014-08-22 18:36:26 +0800353
Tomeu Vizoso5a587382016-06-06 16:53:32 +0200354 drm_atomic_helper_resume(drm, priv->state);
355 rockchip_drm_fb_resume(drm);
356 drm_kms_helper_poll_enable(drm);
Mark Yao2048e322014-08-22 18:36:26 +0800357
358 return 0;
359}
360#endif
361
362static const struct dev_pm_ops rockchip_drm_pm_ops = {
363 SET_SYSTEM_SLEEP_PM_OPS(rockchip_drm_sys_suspend,
364 rockchip_drm_sys_resume)
365};
366
Mark Yao2048e322014-08-22 18:36:26 +0800367static int compare_of(struct device *dev, void *data)
368{
369 struct device_node *np = data;
370
371 return dev->of_node == np;
372}
373
Mark Yao5bad7d22015-11-10 16:47:19 +0800374static void rockchip_add_endpoints(struct device *dev,
375 struct component_match **match,
376 struct device_node *port)
377{
378 struct device_node *ep, *remote;
379
380 for_each_child_of_node(port, ep) {
381 remote = of_graph_get_remote_port_parent(ep);
382 if (!remote || !of_device_is_available(remote)) {
383 of_node_put(remote);
384 continue;
385 } else if (!of_device_is_available(remote->parent)) {
386 dev_warn(dev, "parent device of %s is not available\n",
387 remote->full_name);
388 of_node_put(remote);
389 continue;
390 }
391
Russell King97ac0e42016-10-19 11:28:27 +0100392 drm_of_component_match_add(dev, match, compare_of, remote);
Mark Yao5bad7d22015-11-10 16:47:19 +0800393 of_node_put(remote);
394 }
395}
396
Mark Yao2048e322014-08-22 18:36:26 +0800397static const struct component_master_ops rockchip_drm_ops = {
398 .bind = rockchip_drm_bind,
399 .unbind = rockchip_drm_unbind,
400};
401
402static int rockchip_drm_platform_probe(struct platform_device *pdev)
403{
Mark Yao5bad7d22015-11-10 16:47:19 +0800404 struct device *dev = &pdev->dev;
405 struct component_match *match = NULL;
406 struct device_node *np = dev->of_node;
407 struct device_node *port;
408 int i;
Mark Yao2048e322014-08-22 18:36:26 +0800409
Mark Yao5bad7d22015-11-10 16:47:19 +0800410 if (!np)
Mark Yao2048e322014-08-22 18:36:26 +0800411 return -ENODEV;
Mark Yao5bad7d22015-11-10 16:47:19 +0800412 /*
413 * Bind the crtc ports first, so that
414 * drm_of_find_possible_crtcs called from encoder .bind callbacks
415 * works as expected.
416 */
417 for (i = 0;; i++) {
Mark Yao2d90d472016-04-19 10:13:27 +0800418 struct device_node *iommu;
419
Mark Yao5bad7d22015-11-10 16:47:19 +0800420 port = of_parse_phandle(np, "ports", i);
421 if (!port)
422 break;
Mark Yao2048e322014-08-22 18:36:26 +0800423
Mark Yao5bad7d22015-11-10 16:47:19 +0800424 if (!of_device_is_available(port->parent)) {
425 of_node_put(port);
426 continue;
427 }
428
Mark Yao2d90d472016-04-19 10:13:27 +0800429 iommu = of_parse_phandle(port->parent, "iommus", 0);
430 if (!iommu || !of_device_is_available(iommu->parent)) {
431 dev_dbg(dev, "no iommu attached for %s, using non-iommu buffers\n",
432 port->parent->full_name);
433 /*
434 * if there is a crtc not support iommu, force set all
435 * crtc use non-iommu buffer.
436 */
437 is_support_iommu = false;
438 }
439
Peter Chen6d5fa282016-07-05 10:04:48 +0800440 of_node_put(iommu);
Russell King97ac0e42016-10-19 11:28:27 +0100441 drm_of_component_match_add(dev, &match, compare_of,
442 port->parent);
Mark Yao5bad7d22015-11-10 16:47:19 +0800443 of_node_put(port);
444 }
445
446 if (i == 0) {
447 dev_err(dev, "missing 'ports' property\n");
448 return -ENODEV;
449 }
450
451 if (!match) {
452 dev_err(dev, "No available vop found for display-subsystem.\n");
453 return -ENODEV;
454 }
455 /*
456 * For each bound crtc, bind the encoders attached to its
457 * remote endpoint.
458 */
459 for (i = 0;; i++) {
460 port = of_parse_phandle(np, "ports", i);
461 if (!port)
462 break;
463
464 if (!of_device_is_available(port->parent)) {
465 of_node_put(port);
466 continue;
467 }
468
469 rockchip_add_endpoints(dev, &match, port);
470 of_node_put(port);
471 }
472
473 return component_master_add_with_match(dev, &rockchip_drm_ops, match);
Mark Yao2048e322014-08-22 18:36:26 +0800474}
475
476static int rockchip_drm_platform_remove(struct platform_device *pdev)
477{
478 component_master_del(&pdev->dev, &rockchip_drm_ops);
479
480 return 0;
481}
482
483static const struct of_device_id rockchip_drm_dt_ids[] = {
484 { .compatible = "rockchip,display-subsystem", },
485 { /* sentinel */ },
486};
487MODULE_DEVICE_TABLE(of, rockchip_drm_dt_ids);
488
489static struct platform_driver rockchip_drm_platform_driver = {
490 .probe = rockchip_drm_platform_probe,
491 .remove = rockchip_drm_platform_remove,
492 .driver = {
Mark Yao2048e322014-08-22 18:36:26 +0800493 .name = "rockchip-drm",
494 .of_match_table = rockchip_drm_dt_ids,
495 .pm = &rockchip_drm_pm_ops,
496 },
497};
498
499module_platform_driver(rockchip_drm_platform_driver);
500
501MODULE_AUTHOR("Mark Yao <mark.yao@rock-chips.com>");
502MODULE_DESCRIPTION("ROCKCHIP DRM Driver");
503MODULE_LICENSE("GPL v2");