blob: 2390c8577617adcb8061057d0260bbb717e53d64 [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,
Mark Yao2048e322014-08-22 18:36:26 +0800278 .compat_ioctl = drm_compat_ioctl,
Mark Yao2048e322014-08-22 18:36:26 +0800279 .release = drm_release,
280};
281
Mark Yao2048e322014-08-22 18:36:26 +0800282static struct drm_driver rockchip_drm_driver = {
Mark Yao63ebb9f2015-11-30 18:22:42 +0800283 .driver_features = DRIVER_MODESET | DRIVER_GEM |
284 DRIVER_PRIME | DRIVER_ATOMIC,
Mark Yao2048e322014-08-22 18:36:26 +0800285 .lastclose = rockchip_drm_lastclose,
Ville Syrjäläb44f8402015-09-30 16:46:48 +0300286 .get_vblank_counter = drm_vblank_no_hw_counter,
Mark Yao2048e322014-08-22 18:36:26 +0800287 .enable_vblank = rockchip_drm_crtc_enable_vblank,
288 .disable_vblank = rockchip_drm_crtc_disable_vblank,
Daniel Vetter80f67cd2016-05-30 19:53:12 +0200289 .gem_vm_ops = &drm_gem_cma_vm_ops,
Daniel Vetterc2466ac2016-05-30 19:53:03 +0200290 .gem_free_object_unlocked = rockchip_gem_free_object,
Mark Yao2048e322014-08-22 18:36:26 +0800291 .dumb_create = rockchip_gem_dumb_create,
292 .dumb_map_offset = rockchip_gem_dumb_map_offset,
293 .dumb_destroy = drm_gem_dumb_destroy,
294 .prime_handle_to_fd = drm_gem_prime_handle_to_fd,
295 .prime_fd_to_handle = drm_gem_prime_fd_to_handle,
296 .gem_prime_import = drm_gem_prime_import,
297 .gem_prime_export = drm_gem_prime_export,
298 .gem_prime_get_sg_table = rockchip_gem_prime_get_sg_table,
299 .gem_prime_vmap = rockchip_gem_prime_vmap,
300 .gem_prime_vunmap = rockchip_gem_prime_vunmap,
301 .gem_prime_mmap = rockchip_gem_mmap_buf,
302 .fops = &rockchip_drm_driver_fops,
303 .name = DRIVER_NAME,
304 .desc = DRIVER_DESC,
305 .date = DRIVER_DATE,
306 .major = DRIVER_MAJOR,
307 .minor = DRIVER_MINOR,
308};
309
310#ifdef CONFIG_PM_SLEEP
Baoyou Xie623981772016-09-25 15:43:08 +0800311static void rockchip_drm_fb_suspend(struct drm_device *drm)
Tomeu Vizoso5a587382016-06-06 16:53:32 +0200312{
313 struct rockchip_drm_private *priv = drm->dev_private;
314
315 console_lock();
316 drm_fb_helper_set_suspend(&priv->fbdev_helper, 1);
317 console_unlock();
318}
319
Baoyou Xie623981772016-09-25 15:43:08 +0800320static void rockchip_drm_fb_resume(struct drm_device *drm)
Tomeu Vizoso5a587382016-06-06 16:53:32 +0200321{
322 struct rockchip_drm_private *priv = drm->dev_private;
323
324 console_lock();
325 drm_fb_helper_set_suspend(&priv->fbdev_helper, 0);
326 console_unlock();
327}
328
Mark Yao2048e322014-08-22 18:36:26 +0800329static int rockchip_drm_sys_suspend(struct device *dev)
330{
331 struct drm_device *drm = dev_get_drvdata(dev);
Tomeu Vizoso5a587382016-06-06 16:53:32 +0200332 struct rockchip_drm_private *priv = drm->dev_private;
Mark Yao2048e322014-08-22 18:36:26 +0800333
Tomeu Vizoso5a587382016-06-06 16:53:32 +0200334 drm_kms_helper_poll_disable(drm);
335 rockchip_drm_fb_suspend(drm);
Mark Yao2048e322014-08-22 18:36:26 +0800336
Tomeu Vizoso5a587382016-06-06 16:53:32 +0200337 priv->state = drm_atomic_helper_suspend(drm);
338 if (IS_ERR(priv->state)) {
339 rockchip_drm_fb_resume(drm);
340 drm_kms_helper_poll_enable(drm);
341 return PTR_ERR(priv->state);
Mark Yao2048e322014-08-22 18:36:26 +0800342 }
Mark Yao2048e322014-08-22 18:36:26 +0800343
344 return 0;
345}
346
347static int rockchip_drm_sys_resume(struct device *dev)
348{
349 struct drm_device *drm = dev_get_drvdata(dev);
Tomeu Vizoso5a587382016-06-06 16:53:32 +0200350 struct rockchip_drm_private *priv = drm->dev_private;
Mark Yao2048e322014-08-22 18:36:26 +0800351
Tomeu Vizoso5a587382016-06-06 16:53:32 +0200352 drm_atomic_helper_resume(drm, priv->state);
353 rockchip_drm_fb_resume(drm);
354 drm_kms_helper_poll_enable(drm);
Mark Yao2048e322014-08-22 18:36:26 +0800355
356 return 0;
357}
358#endif
359
360static const struct dev_pm_ops rockchip_drm_pm_ops = {
361 SET_SYSTEM_SLEEP_PM_OPS(rockchip_drm_sys_suspend,
362 rockchip_drm_sys_resume)
363};
364
Mark Yao2048e322014-08-22 18:36:26 +0800365static int compare_of(struct device *dev, void *data)
366{
367 struct device_node *np = data;
368
369 return dev->of_node == np;
370}
371
Mark Yao5bad7d22015-11-10 16:47:19 +0800372static void rockchip_add_endpoints(struct device *dev,
373 struct component_match **match,
374 struct device_node *port)
375{
376 struct device_node *ep, *remote;
377
378 for_each_child_of_node(port, ep) {
379 remote = of_graph_get_remote_port_parent(ep);
380 if (!remote || !of_device_is_available(remote)) {
381 of_node_put(remote);
382 continue;
383 } else if (!of_device_is_available(remote->parent)) {
384 dev_warn(dev, "parent device of %s is not available\n",
385 remote->full_name);
386 of_node_put(remote);
387 continue;
388 }
389
Russell King97ac0e42016-10-19 11:28:27 +0100390 drm_of_component_match_add(dev, match, compare_of, remote);
Mark Yao5bad7d22015-11-10 16:47:19 +0800391 of_node_put(remote);
392 }
393}
394
Mark Yao2048e322014-08-22 18:36:26 +0800395static const struct component_master_ops rockchip_drm_ops = {
396 .bind = rockchip_drm_bind,
397 .unbind = rockchip_drm_unbind,
398};
399
400static int rockchip_drm_platform_probe(struct platform_device *pdev)
401{
Mark Yao5bad7d22015-11-10 16:47:19 +0800402 struct device *dev = &pdev->dev;
403 struct component_match *match = NULL;
404 struct device_node *np = dev->of_node;
405 struct device_node *port;
406 int i;
Mark Yao2048e322014-08-22 18:36:26 +0800407
Mark Yao5bad7d22015-11-10 16:47:19 +0800408 if (!np)
Mark Yao2048e322014-08-22 18:36:26 +0800409 return -ENODEV;
Mark Yao5bad7d22015-11-10 16:47:19 +0800410 /*
411 * Bind the crtc ports first, so that
412 * drm_of_find_possible_crtcs called from encoder .bind callbacks
413 * works as expected.
414 */
415 for (i = 0;; i++) {
Mark Yao2d90d472016-04-19 10:13:27 +0800416 struct device_node *iommu;
417
Mark Yao5bad7d22015-11-10 16:47:19 +0800418 port = of_parse_phandle(np, "ports", i);
419 if (!port)
420 break;
Mark Yao2048e322014-08-22 18:36:26 +0800421
Mark Yao5bad7d22015-11-10 16:47:19 +0800422 if (!of_device_is_available(port->parent)) {
423 of_node_put(port);
424 continue;
425 }
426
Mark Yao2d90d472016-04-19 10:13:27 +0800427 iommu = of_parse_phandle(port->parent, "iommus", 0);
428 if (!iommu || !of_device_is_available(iommu->parent)) {
429 dev_dbg(dev, "no iommu attached for %s, using non-iommu buffers\n",
430 port->parent->full_name);
431 /*
432 * if there is a crtc not support iommu, force set all
433 * crtc use non-iommu buffer.
434 */
435 is_support_iommu = false;
436 }
437
Peter Chen6d5fa282016-07-05 10:04:48 +0800438 of_node_put(iommu);
Russell King97ac0e42016-10-19 11:28:27 +0100439 drm_of_component_match_add(dev, &match, compare_of,
440 port->parent);
Mark Yao5bad7d22015-11-10 16:47:19 +0800441 of_node_put(port);
442 }
443
444 if (i == 0) {
445 dev_err(dev, "missing 'ports' property\n");
446 return -ENODEV;
447 }
448
449 if (!match) {
450 dev_err(dev, "No available vop found for display-subsystem.\n");
451 return -ENODEV;
452 }
453 /*
454 * For each bound crtc, bind the encoders attached to its
455 * remote endpoint.
456 */
457 for (i = 0;; i++) {
458 port = of_parse_phandle(np, "ports", i);
459 if (!port)
460 break;
461
462 if (!of_device_is_available(port->parent)) {
463 of_node_put(port);
464 continue;
465 }
466
467 rockchip_add_endpoints(dev, &match, port);
468 of_node_put(port);
469 }
470
471 return component_master_add_with_match(dev, &rockchip_drm_ops, match);
Mark Yao2048e322014-08-22 18:36:26 +0800472}
473
474static int rockchip_drm_platform_remove(struct platform_device *pdev)
475{
476 component_master_del(&pdev->dev, &rockchip_drm_ops);
477
478 return 0;
479}
480
481static const struct of_device_id rockchip_drm_dt_ids[] = {
482 { .compatible = "rockchip,display-subsystem", },
483 { /* sentinel */ },
484};
485MODULE_DEVICE_TABLE(of, rockchip_drm_dt_ids);
486
487static struct platform_driver rockchip_drm_platform_driver = {
488 .probe = rockchip_drm_platform_probe,
489 .remove = rockchip_drm_platform_remove,
490 .driver = {
Mark Yao2048e322014-08-22 18:36:26 +0800491 .name = "rockchip-drm",
492 .of_match_table = rockchip_drm_dt_ids,
493 .pm = &rockchip_drm_pm_ops,
494 },
495};
496
497module_platform_driver(rockchip_drm_platform_driver);
498
499MODULE_AUTHOR("Mark Yao <mark.yao@rock-chips.com>");
500MODULE_DESCRIPTION("ROCKCHIP DRM Driver");
501MODULE_LICENSE("GPL v2");