• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2012 Avionic Design GmbH
3  * Copyright (C) 2012-2013 NVIDIA CORPORATION.  All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation.
8  */
9 
10 #include <linux/module.h>
11 #include <linux/of_address.h>
12 #include <linux/of_platform.h>
13 
14 #include <linux/dma-mapping.h>
15 #include <asm/dma-iommu.h>
16 
17 #include <drm/drm.h>
18 #include <drm/drmP.h>
19 
20 #include "host1x_client.h"
21 #include "dev.h"
22 #include "drm.h"
23 #include "gem.h"
24 #include "syncpt.h"
25 
26 #define DRIVER_NAME "tegra"
27 #define DRIVER_DESC "NVIDIA Tegra graphics"
28 #define DRIVER_DATE "20120330"
29 #define DRIVER_MAJOR 0
30 #define DRIVER_MINOR 0
31 #define DRIVER_PATCHLEVEL 0
32 
33 struct host1x_drm_client {
34 	struct host1x_client *client;
35 	struct device_node *np;
36 	struct list_head list;
37 };
38 
host1x_add_drm_client(struct host1x_drm * host1x,struct device_node * np)39 static int host1x_add_drm_client(struct host1x_drm *host1x,
40 				 struct device_node *np)
41 {
42 	struct host1x_drm_client *client;
43 
44 	client = kzalloc(sizeof(*client), GFP_KERNEL);
45 	if (!client)
46 		return -ENOMEM;
47 
48 	INIT_LIST_HEAD(&client->list);
49 	client->np = of_node_get(np);
50 
51 	list_add_tail(&client->list, &host1x->drm_clients);
52 
53 	return 0;
54 }
55 
host1x_activate_drm_client(struct host1x_drm * host1x,struct host1x_drm_client * drm,struct host1x_client * client)56 static int host1x_activate_drm_client(struct host1x_drm *host1x,
57 				      struct host1x_drm_client *drm,
58 				      struct host1x_client *client)
59 {
60 	mutex_lock(&host1x->drm_clients_lock);
61 	list_del_init(&drm->list);
62 	list_add_tail(&drm->list, &host1x->drm_active);
63 	drm->client = client;
64 	mutex_unlock(&host1x->drm_clients_lock);
65 
66 	return 0;
67 }
68 
host1x_remove_drm_client(struct host1x_drm * host1x,struct host1x_drm_client * client)69 static int host1x_remove_drm_client(struct host1x_drm *host1x,
70 				    struct host1x_drm_client *client)
71 {
72 	mutex_lock(&host1x->drm_clients_lock);
73 	list_del_init(&client->list);
74 	mutex_unlock(&host1x->drm_clients_lock);
75 
76 	of_node_put(client->np);
77 	kfree(client);
78 
79 	return 0;
80 }
81 
host1x_parse_dt(struct host1x_drm * host1x)82 static int host1x_parse_dt(struct host1x_drm *host1x)
83 {
84 	static const char * const compat[] = {
85 		"nvidia,tegra20-dc",
86 		"nvidia,tegra20-hdmi",
87 		"nvidia,tegra20-gr2d",
88 		"nvidia,tegra30-dc",
89 		"nvidia,tegra30-hdmi",
90 		"nvidia,tegra30-gr2d",
91 	};
92 	unsigned int i;
93 	int err;
94 
95 	for (i = 0; i < ARRAY_SIZE(compat); i++) {
96 		struct device_node *np;
97 
98 		for_each_child_of_node(host1x->dev->of_node, np) {
99 			if (of_device_is_compatible(np, compat[i]) &&
100 			    of_device_is_available(np)) {
101 				err = host1x_add_drm_client(host1x, np);
102 				if (err < 0)
103 					return err;
104 			}
105 		}
106 	}
107 
108 	return 0;
109 }
110 
host1x_drm_alloc(struct platform_device * pdev)111 int host1x_drm_alloc(struct platform_device *pdev)
112 {
113 	struct host1x_drm *host1x;
114 	int err;
115 
116 	host1x = devm_kzalloc(&pdev->dev, sizeof(*host1x), GFP_KERNEL);
117 	if (!host1x)
118 		return -ENOMEM;
119 
120 	mutex_init(&host1x->drm_clients_lock);
121 	INIT_LIST_HEAD(&host1x->drm_clients);
122 	INIT_LIST_HEAD(&host1x->drm_active);
123 	mutex_init(&host1x->clients_lock);
124 	INIT_LIST_HEAD(&host1x->clients);
125 	host1x->dev = &pdev->dev;
126 
127 	err = host1x_parse_dt(host1x);
128 	if (err < 0) {
129 		dev_err(&pdev->dev, "failed to parse DT: %d\n", err);
130 		return err;
131 	}
132 
133 	host1x_set_drm_data(&pdev->dev, host1x);
134 
135 	return 0;
136 }
137 
host1x_drm_init(struct host1x_drm * host1x,struct drm_device * drm)138 int host1x_drm_init(struct host1x_drm *host1x, struct drm_device *drm)
139 {
140 	struct host1x_client *client;
141 
142 	mutex_lock(&host1x->clients_lock);
143 
144 	list_for_each_entry(client, &host1x->clients, list) {
145 		if (client->ops && client->ops->drm_init) {
146 			int err = client->ops->drm_init(client, drm);
147 			if (err < 0) {
148 				dev_err(host1x->dev,
149 					"DRM setup failed for %s: %d\n",
150 					dev_name(client->dev), err);
151 				return err;
152 			}
153 		}
154 	}
155 
156 	mutex_unlock(&host1x->clients_lock);
157 
158 	return 0;
159 }
160 
host1x_drm_exit(struct host1x_drm * host1x)161 int host1x_drm_exit(struct host1x_drm *host1x)
162 {
163 	struct platform_device *pdev = to_platform_device(host1x->dev);
164 	struct host1x_client *client;
165 
166 	if (!host1x->drm)
167 		return 0;
168 
169 	mutex_lock(&host1x->clients_lock);
170 
171 	list_for_each_entry_reverse(client, &host1x->clients, list) {
172 		if (client->ops && client->ops->drm_exit) {
173 			int err = client->ops->drm_exit(client);
174 			if (err < 0) {
175 				dev_err(host1x->dev,
176 					"DRM cleanup failed for %s: %d\n",
177 					dev_name(client->dev), err);
178 				return err;
179 			}
180 		}
181 	}
182 
183 	mutex_unlock(&host1x->clients_lock);
184 
185 	drm_platform_exit(&tegra_drm_driver, pdev);
186 	host1x->drm = NULL;
187 
188 	return 0;
189 }
190 
host1x_register_client(struct host1x_drm * host1x,struct host1x_client * client)191 int host1x_register_client(struct host1x_drm *host1x,
192 			   struct host1x_client *client)
193 {
194 	struct host1x_drm_client *drm, *tmp;
195 	int err;
196 
197 	mutex_lock(&host1x->clients_lock);
198 	list_add_tail(&client->list, &host1x->clients);
199 	mutex_unlock(&host1x->clients_lock);
200 
201 	list_for_each_entry_safe(drm, tmp, &host1x->drm_clients, list)
202 		if (drm->np == client->dev->of_node)
203 			host1x_activate_drm_client(host1x, drm, client);
204 
205 	if (list_empty(&host1x->drm_clients)) {
206 		struct platform_device *pdev = to_platform_device(host1x->dev);
207 
208 		err = drm_platform_init(&tegra_drm_driver, pdev);
209 		if (err < 0) {
210 			dev_err(host1x->dev, "drm_platform_init(): %d\n", err);
211 			return err;
212 		}
213 	}
214 
215 	return 0;
216 }
217 
host1x_unregister_client(struct host1x_drm * host1x,struct host1x_client * client)218 int host1x_unregister_client(struct host1x_drm *host1x,
219 			     struct host1x_client *client)
220 {
221 	struct host1x_drm_client *drm, *tmp;
222 	int err;
223 
224 	list_for_each_entry_safe(drm, tmp, &host1x->drm_active, list) {
225 		if (drm->client == client) {
226 			err = host1x_drm_exit(host1x);
227 			if (err < 0) {
228 				dev_err(host1x->dev, "host1x_drm_exit(): %d\n",
229 					err);
230 				return err;
231 			}
232 
233 			host1x_remove_drm_client(host1x, drm);
234 			break;
235 		}
236 	}
237 
238 	mutex_lock(&host1x->clients_lock);
239 	list_del_init(&client->list);
240 	mutex_unlock(&host1x->clients_lock);
241 
242 	return 0;
243 }
244 
tegra_drm_load(struct drm_device * drm,unsigned long flags)245 static int tegra_drm_load(struct drm_device *drm, unsigned long flags)
246 {
247 	struct host1x_drm *host1x;
248 	int err;
249 
250 	host1x = host1x_get_drm_data(drm->dev);
251 	drm->dev_private = host1x;
252 	host1x->drm = drm;
253 
254 	drm_mode_config_init(drm);
255 
256 	err = host1x_drm_init(host1x, drm);
257 	if (err < 0)
258 		return err;
259 
260 	err = drm_vblank_init(drm, drm->mode_config.num_crtc);
261 	if (err < 0)
262 		return err;
263 
264 	err = tegra_drm_fb_init(drm);
265 	if (err < 0)
266 		return err;
267 
268 	drm_kms_helper_poll_init(drm);
269 
270 	return 0;
271 }
272 
tegra_drm_unload(struct drm_device * drm)273 static int tegra_drm_unload(struct drm_device *drm)
274 {
275 	drm_kms_helper_poll_fini(drm);
276 	tegra_drm_fb_exit(drm);
277 
278 	drm_mode_config_cleanup(drm);
279 
280 	return 0;
281 }
282 
tegra_drm_open(struct drm_device * drm,struct drm_file * filp)283 static int tegra_drm_open(struct drm_device *drm, struct drm_file *filp)
284 {
285 	struct host1x_drm_file *fpriv;
286 
287 	fpriv = kzalloc(sizeof(*fpriv), GFP_KERNEL);
288 	if (!fpriv)
289 		return -ENOMEM;
290 
291 	INIT_LIST_HEAD(&fpriv->contexts);
292 	filp->driver_priv = fpriv;
293 
294 	return 0;
295 }
296 
host1x_drm_context_free(struct host1x_drm_context * context)297 static void host1x_drm_context_free(struct host1x_drm_context *context)
298 {
299 	context->client->ops->close_channel(context);
300 	kfree(context);
301 }
302 
tegra_drm_lastclose(struct drm_device * drm)303 static void tegra_drm_lastclose(struct drm_device *drm)
304 {
305 	struct host1x_drm *host1x = drm->dev_private;
306 
307 	tegra_fbdev_restore_mode(host1x->fbdev);
308 }
309 
310 #ifdef CONFIG_DRM_TEGRA_STAGING
host1x_drm_file_owns_context(struct host1x_drm_file * file,struct host1x_drm_context * context)311 static bool host1x_drm_file_owns_context(struct host1x_drm_file *file,
312 					 struct host1x_drm_context *context)
313 {
314 	struct host1x_drm_context *ctx;
315 
316 	list_for_each_entry(ctx, &file->contexts, list)
317 		if (ctx == context)
318 			return true;
319 
320 	return false;
321 }
322 
tegra_gem_create(struct drm_device * drm,void * data,struct drm_file * file)323 static int tegra_gem_create(struct drm_device *drm, void *data,
324 			    struct drm_file *file)
325 {
326 	struct drm_tegra_gem_create *args = data;
327 	struct tegra_bo *bo;
328 
329 	bo = tegra_bo_create_with_handle(file, drm, args->size,
330 					 &args->handle);
331 	if (IS_ERR(bo))
332 		return PTR_ERR(bo);
333 
334 	return 0;
335 }
336 
tegra_gem_mmap(struct drm_device * drm,void * data,struct drm_file * file)337 static int tegra_gem_mmap(struct drm_device *drm, void *data,
338 			  struct drm_file *file)
339 {
340 	struct drm_tegra_gem_mmap *args = data;
341 	struct drm_gem_object *gem;
342 	struct tegra_bo *bo;
343 
344 	gem = drm_gem_object_lookup(drm, file, args->handle);
345 	if (!gem)
346 		return -EINVAL;
347 
348 	bo = to_tegra_bo(gem);
349 
350 	args->offset = tegra_bo_get_mmap_offset(bo);
351 
352 	drm_gem_object_unreference(gem);
353 
354 	return 0;
355 }
356 
tegra_syncpt_read(struct drm_device * drm,void * data,struct drm_file * file)357 static int tegra_syncpt_read(struct drm_device *drm, void *data,
358 			     struct drm_file *file)
359 {
360 	struct drm_tegra_syncpt_read *args = data;
361 	struct host1x *host = dev_get_drvdata(drm->dev);
362 	struct host1x_syncpt *sp = host1x_syncpt_get(host, args->id);
363 
364 	if (!sp)
365 		return -EINVAL;
366 
367 	args->value = host1x_syncpt_read_min(sp);
368 	return 0;
369 }
370 
tegra_syncpt_incr(struct drm_device * drm,void * data,struct drm_file * file)371 static int tegra_syncpt_incr(struct drm_device *drm, void *data,
372 			     struct drm_file *file)
373 {
374 	struct drm_tegra_syncpt_incr *args = data;
375 	struct host1x *host = dev_get_drvdata(drm->dev);
376 	struct host1x_syncpt *sp = host1x_syncpt_get(host, args->id);
377 
378 	if (!sp)
379 		return -EINVAL;
380 
381 	host1x_syncpt_incr(sp);
382 	return 0;
383 }
384 
tegra_syncpt_wait(struct drm_device * drm,void * data,struct drm_file * file)385 static int tegra_syncpt_wait(struct drm_device *drm, void *data,
386 			     struct drm_file *file)
387 {
388 	struct drm_tegra_syncpt_wait *args = data;
389 	struct host1x *host = dev_get_drvdata(drm->dev);
390 	struct host1x_syncpt *sp = host1x_syncpt_get(host, args->id);
391 
392 	if (!sp)
393 		return -EINVAL;
394 
395 	return host1x_syncpt_wait(sp, args->thresh, args->timeout,
396 				  &args->value);
397 }
398 
tegra_open_channel(struct drm_device * drm,void * data,struct drm_file * file)399 static int tegra_open_channel(struct drm_device *drm, void *data,
400 			      struct drm_file *file)
401 {
402 	struct drm_tegra_open_channel *args = data;
403 	struct host1x_client *client;
404 	struct host1x_drm_context *context;
405 	struct host1x_drm_file *fpriv = file->driver_priv;
406 	struct host1x_drm *host1x = drm->dev_private;
407 	int err = -ENODEV;
408 
409 	context = kzalloc(sizeof(*context), GFP_KERNEL);
410 	if (!context)
411 		return -ENOMEM;
412 
413 	list_for_each_entry(client, &host1x->clients, list)
414 		if (client->class == args->client) {
415 			err = client->ops->open_channel(client, context);
416 			if (err)
417 				break;
418 
419 			context->client = client;
420 			list_add(&context->list, &fpriv->contexts);
421 			args->context = (uintptr_t)context;
422 			return 0;
423 		}
424 
425 	kfree(context);
426 	return err;
427 }
428 
tegra_close_channel(struct drm_device * drm,void * data,struct drm_file * file)429 static int tegra_close_channel(struct drm_device *drm, void *data,
430 			       struct drm_file *file)
431 {
432 	struct drm_tegra_close_channel *args = data;
433 	struct host1x_drm_file *fpriv = file->driver_priv;
434 	struct host1x_drm_context *context =
435 		(struct host1x_drm_context *)(uintptr_t)args->context;
436 
437 	if (!host1x_drm_file_owns_context(fpriv, context))
438 		return -EINVAL;
439 
440 	list_del(&context->list);
441 	host1x_drm_context_free(context);
442 
443 	return 0;
444 }
445 
tegra_get_syncpt(struct drm_device * drm,void * data,struct drm_file * file)446 static int tegra_get_syncpt(struct drm_device *drm, void *data,
447 			    struct drm_file *file)
448 {
449 	struct drm_tegra_get_syncpt *args = data;
450 	struct host1x_drm_file *fpriv = file->driver_priv;
451 	struct host1x_drm_context *context =
452 		(struct host1x_drm_context *)(uintptr_t)args->context;
453 	struct host1x_syncpt *syncpt;
454 
455 	if (!host1x_drm_file_owns_context(fpriv, context))
456 		return -ENODEV;
457 
458 	if (args->index >= context->client->num_syncpts)
459 		return -EINVAL;
460 
461 	syncpt = context->client->syncpts[args->index];
462 	args->id = host1x_syncpt_id(syncpt);
463 
464 	return 0;
465 }
466 
tegra_submit(struct drm_device * drm,void * data,struct drm_file * file)467 static int tegra_submit(struct drm_device *drm, void *data,
468 			struct drm_file *file)
469 {
470 	struct drm_tegra_submit *args = data;
471 	struct host1x_drm_file *fpriv = file->driver_priv;
472 	struct host1x_drm_context *context =
473 		(struct host1x_drm_context *)(uintptr_t)args->context;
474 
475 	if (!host1x_drm_file_owns_context(fpriv, context))
476 		return -ENODEV;
477 
478 	return context->client->ops->submit(context, args, drm, file);
479 }
480 #endif
481 
482 static struct drm_ioctl_desc tegra_drm_ioctls[] = {
483 #ifdef CONFIG_DRM_TEGRA_STAGING
484 	DRM_IOCTL_DEF_DRV(TEGRA_GEM_CREATE, tegra_gem_create, DRM_UNLOCKED | DRM_AUTH),
485 	DRM_IOCTL_DEF_DRV(TEGRA_GEM_MMAP, tegra_gem_mmap, DRM_UNLOCKED),
486 	DRM_IOCTL_DEF_DRV(TEGRA_SYNCPT_READ, tegra_syncpt_read, DRM_UNLOCKED),
487 	DRM_IOCTL_DEF_DRV(TEGRA_SYNCPT_INCR, tegra_syncpt_incr, DRM_UNLOCKED),
488 	DRM_IOCTL_DEF_DRV(TEGRA_SYNCPT_WAIT, tegra_syncpt_wait, DRM_UNLOCKED),
489 	DRM_IOCTL_DEF_DRV(TEGRA_OPEN_CHANNEL, tegra_open_channel, DRM_UNLOCKED),
490 	DRM_IOCTL_DEF_DRV(TEGRA_CLOSE_CHANNEL, tegra_close_channel, DRM_UNLOCKED),
491 	DRM_IOCTL_DEF_DRV(TEGRA_GET_SYNCPT, tegra_get_syncpt, DRM_UNLOCKED),
492 	DRM_IOCTL_DEF_DRV(TEGRA_SUBMIT, tegra_submit, DRM_UNLOCKED),
493 #endif
494 };
495 
496 static const struct file_operations tegra_drm_fops = {
497 	.owner = THIS_MODULE,
498 	.open = drm_open,
499 	.release = drm_release,
500 	.unlocked_ioctl = drm_ioctl,
501 	.mmap = tegra_drm_mmap,
502 	.poll = drm_poll,
503 	.fasync = drm_fasync,
504 	.read = drm_read,
505 #ifdef CONFIG_COMPAT
506 	.compat_ioctl = drm_compat_ioctl,
507 #endif
508 	.llseek = noop_llseek,
509 };
510 
tegra_crtc_from_pipe(struct drm_device * drm,int pipe)511 static struct drm_crtc *tegra_crtc_from_pipe(struct drm_device *drm, int pipe)
512 {
513 	struct drm_crtc *crtc;
514 
515 	list_for_each_entry(crtc, &drm->mode_config.crtc_list, head) {
516 		struct tegra_dc *dc = to_tegra_dc(crtc);
517 
518 		if (dc->pipe == pipe)
519 			return crtc;
520 	}
521 
522 	return NULL;
523 }
524 
tegra_drm_get_vblank_counter(struct drm_device * dev,int crtc)525 static u32 tegra_drm_get_vblank_counter(struct drm_device *dev, int crtc)
526 {
527 	/* TODO: implement real hardware counter using syncpoints */
528 	return drm_vblank_count(dev, crtc);
529 }
530 
tegra_drm_enable_vblank(struct drm_device * drm,int pipe)531 static int tegra_drm_enable_vblank(struct drm_device *drm, int pipe)
532 {
533 	struct drm_crtc *crtc = tegra_crtc_from_pipe(drm, pipe);
534 	struct tegra_dc *dc = to_tegra_dc(crtc);
535 
536 	if (!crtc)
537 		return -ENODEV;
538 
539 	tegra_dc_enable_vblank(dc);
540 
541 	return 0;
542 }
543 
tegra_drm_disable_vblank(struct drm_device * drm,int pipe)544 static void tegra_drm_disable_vblank(struct drm_device *drm, int pipe)
545 {
546 	struct drm_crtc *crtc = tegra_crtc_from_pipe(drm, pipe);
547 	struct tegra_dc *dc = to_tegra_dc(crtc);
548 
549 	if (crtc)
550 		tegra_dc_disable_vblank(dc);
551 }
552 
tegra_drm_preclose(struct drm_device * drm,struct drm_file * file)553 static void tegra_drm_preclose(struct drm_device *drm, struct drm_file *file)
554 {
555 	struct host1x_drm_file *fpriv = file->driver_priv;
556 	struct host1x_drm_context *context, *tmp;
557 	struct drm_crtc *crtc;
558 
559 	list_for_each_entry(crtc, &drm->mode_config.crtc_list, head)
560 		tegra_dc_cancel_page_flip(crtc, file);
561 
562 	list_for_each_entry_safe(context, tmp, &fpriv->contexts, list)
563 		host1x_drm_context_free(context);
564 
565 	kfree(fpriv);
566 }
567 
568 #ifdef CONFIG_DEBUG_FS
tegra_debugfs_framebuffers(struct seq_file * s,void * data)569 static int tegra_debugfs_framebuffers(struct seq_file *s, void *data)
570 {
571 	struct drm_info_node *node = (struct drm_info_node *)s->private;
572 	struct drm_device *drm = node->minor->dev;
573 	struct drm_framebuffer *fb;
574 
575 	mutex_lock(&drm->mode_config.fb_lock);
576 
577 	list_for_each_entry(fb, &drm->mode_config.fb_list, head) {
578 		seq_printf(s, "%3d: user size: %d x %d, depth %d, %d bpp, refcount %d\n",
579 			   fb->base.id, fb->width, fb->height, fb->depth,
580 			   fb->bits_per_pixel,
581 			   atomic_read(&fb->refcount.refcount));
582 	}
583 
584 	mutex_unlock(&drm->mode_config.fb_lock);
585 
586 	return 0;
587 }
588 
589 static struct drm_info_list tegra_debugfs_list[] = {
590 	{ "framebuffers", tegra_debugfs_framebuffers, 0 },
591 };
592 
tegra_debugfs_init(struct drm_minor * minor)593 static int tegra_debugfs_init(struct drm_minor *minor)
594 {
595 	return drm_debugfs_create_files(tegra_debugfs_list,
596 					ARRAY_SIZE(tegra_debugfs_list),
597 					minor->debugfs_root, minor);
598 }
599 
tegra_debugfs_cleanup(struct drm_minor * minor)600 static void tegra_debugfs_cleanup(struct drm_minor *minor)
601 {
602 	drm_debugfs_remove_files(tegra_debugfs_list,
603 				 ARRAY_SIZE(tegra_debugfs_list), minor);
604 }
605 #endif
606 
607 struct drm_driver tegra_drm_driver = {
608 	.driver_features = DRIVER_BUS_PLATFORM | DRIVER_MODESET | DRIVER_GEM,
609 	.load = tegra_drm_load,
610 	.unload = tegra_drm_unload,
611 	.open = tegra_drm_open,
612 	.preclose = tegra_drm_preclose,
613 	.lastclose = tegra_drm_lastclose,
614 
615 	.get_vblank_counter = tegra_drm_get_vblank_counter,
616 	.enable_vblank = tegra_drm_enable_vblank,
617 	.disable_vblank = tegra_drm_disable_vblank,
618 
619 #if defined(CONFIG_DEBUG_FS)
620 	.debugfs_init = tegra_debugfs_init,
621 	.debugfs_cleanup = tegra_debugfs_cleanup,
622 #endif
623 
624 	.gem_free_object = tegra_bo_free_object,
625 	.gem_vm_ops = &tegra_bo_vm_ops,
626 	.dumb_create = tegra_bo_dumb_create,
627 	.dumb_map_offset = tegra_bo_dumb_map_offset,
628 	.dumb_destroy = tegra_bo_dumb_destroy,
629 
630 	.ioctls = tegra_drm_ioctls,
631 	.num_ioctls = ARRAY_SIZE(tegra_drm_ioctls),
632 	.fops = &tegra_drm_fops,
633 
634 	.name = DRIVER_NAME,
635 	.desc = DRIVER_DESC,
636 	.date = DRIVER_DATE,
637 	.major = DRIVER_MAJOR,
638 	.minor = DRIVER_MINOR,
639 	.patchlevel = DRIVER_PATCHLEVEL,
640 };
641