CHROMIUM: drm/exynos: gem: Remove gem_init_object
[cascardo/linux.git] / drivers / gpu / drm / exynos / exynos_drm_drv.c
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd.
3  * Authors:
4  *      Inki Dae <inki.dae@samsung.com>
5  *      Joonyoung Shim <jy0922.shim@samsung.com>
6  *      Seung-Woo Kim <sw0312.kim@samsung.com>
7  *
8  * Permission is hereby granted, free of charge, to any person obtaining a
9  * copy of this software and associated documentation files (the "Software"),
10  * to deal in the Software without restriction, including without limitation
11  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12  * and/or sell copies of the Software, and to permit persons to whom the
13  * Software is furnished to do so, subject to the following conditions:
14  *
15  * The above copyright notice and this permission notice (including the next
16  * paragraph) shall be included in all copies or substantial portions of the
17  * Software.
18  *
19  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
22  * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
23  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
24  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25  * OTHER DEALINGS IN THE SOFTWARE.
26  */
27
28 #include "drmP.h"
29 #include "drm.h"
30 #include "drm_crtc_helper.h"
31
32 #include <drm/exynos_drm.h>
33
34 #include "exynos_drm_drv.h"
35 #include "exynos_drm_crtc.h"
36 #include "exynos_drm_encoder.h"
37 #include "exynos_drm_fbdev.h"
38 #include "exynos_drm_fb.h"
39 #include "exynos_drm_gem.h"
40 #include "exynos_drm_plane.h"
41 #include "exynos_drm_vidi.h"
42 #include "exynos_drm_dmabuf.h"
43 #include "exynos_drm_display.h"
44
45 #define DRIVER_NAME     "exynos"
46 #define DRIVER_DESC     "Samsung SoC DRM"
47 #define DRIVER_DATE     "20110530"
48 #define DRIVER_MAJOR    1
49 #define DRIVER_MINOR    0
50
51 #define VBLANK_OFF_DELAY        50000
52
53 static int exynos_drm_load(struct drm_device *dev, unsigned long flags)
54 {
55         struct exynos_drm_private *private;
56         int ret;
57         int nr;
58
59         DRM_DEBUG_DRIVER("%s\n", __FILE__);
60
61         private = kzalloc(sizeof(struct exynos_drm_private), GFP_KERNEL);
62         if (!private) {
63                 DRM_ERROR("failed to allocate private\n");
64                 return -ENOMEM;
65         }
66
67 #ifdef CONFIG_DMA_SHARED_BUFFER_USES_KDS
68         if (kds_callback_init(&private->kds_cb, 1,
69                               exynos_drm_kds_callback) < 0) {
70                 DRM_ERROR("kds alloc queue failed.\n");
71                 ret = -ENOMEM;
72                 goto err_kds;
73         }
74 #endif
75
76         DRM_INIT_WAITQUEUE(&private->wait_vsync_queue);
77
78         dev->dev_private = (void *)private;
79
80         drm_mode_config_init(dev);
81
82         /* init kms poll for handling hpd */
83         drm_kms_helper_poll_init(dev);
84
85         exynos_drm_mode_config_init(dev);
86
87         /*
88          * EXYNOS4 is enough to have two CRTCs and each crtc would be used
89          * without dependency of hardware.
90          */
91         for (nr = 0; nr < MAX_CRTC; nr++) {
92                 ret = exynos_drm_crtc_create(dev, nr);
93                 if (ret)
94                         goto err_crtc;
95         }
96
97         for (nr = 0; nr < MAX_PLANE; nr++) {
98                 ret = exynos_plane_init(dev, nr);
99                 if (ret)
100                         goto err_crtc;
101         }
102
103         ret = drm_vblank_init(dev, MAX_CRTC);
104         if (ret)
105                 goto err_crtc;
106
107         /*
108          * probe sub drivers such as display controller and hdmi driver,
109          * that were registered at probe() of platform driver
110          * to the sub driver and create encoder and connector for them.
111          */
112         ret = exynos_drm_device_register(dev);
113         if (ret)
114                 goto err_vblank;
115
116         /* setup possible_clones. */
117         exynos_drm_encoder_setup(dev);
118
119         /*
120          * create and configure fb helper and also exynos specific
121          * fbdev object.
122          */
123         ret = exynos_drm_fbdev_init(dev);
124         if (ret) {
125                 DRM_ERROR("failed to initialize drm fbdev\n");
126                 goto err_drm_device;
127         }
128
129         drm_vblank_offdelay = VBLANK_OFF_DELAY;
130
131         return 0;
132
133 err_drm_device:
134         exynos_drm_device_unregister(dev);
135 err_vblank:
136         drm_vblank_cleanup(dev);
137 err_crtc:
138         drm_mode_config_cleanup(dev);
139 #ifdef CONFIG_DMA_SHARED_BUFFER_USES_KDS
140         kds_callback_term(&private->kds_cb);
141 err_kds:
142 #endif
143         kfree(private);
144
145         return ret;
146 }
147
148 static int exynos_drm_unload(struct drm_device *dev)
149 {
150         struct exynos_drm_private *private = dev->dev_private;
151
152         DRM_DEBUG_DRIVER("%s\n", __FILE__);
153
154         exynos_drm_fbdev_fini(dev);
155         exynos_drm_device_unregister(dev);
156         drm_vblank_cleanup(dev);
157         drm_kms_helper_poll_fini(dev);
158         drm_mode_config_cleanup(dev);
159 #ifdef CONFIG_DMA_SHARED_BUFFER_USES_KDS
160         kds_callback_term(&private->kds_cb);
161 #endif
162         kfree(private);
163
164         dev->dev_private = NULL;
165
166         return 0;
167 }
168
169 static int exynos_drm_open(struct drm_device *dev, struct drm_file *file)
170 {
171         struct exynos_drm_file_private *file_private;
172
173         DRM_DEBUG_DRIVER("%s\n", __FILE__);
174
175         file_private = kzalloc(sizeof(*file_private), GFP_KERNEL);
176         if (!file_private) {
177                 DRM_ERROR("failed to allocate exynos_drm_file_private\n");
178                 return -ENOMEM;
179         }
180         INIT_LIST_HEAD(&file_private->gem_cpu_acquire_list);
181
182         file->driver_priv = file_private;
183
184         return exynos_drm_subdrv_open(dev, file);
185 }
186
187 static void exynos_drm_preclose(struct drm_device *dev,
188                                         struct drm_file *file)
189 {
190         struct exynos_drm_file_private *file_private = file->driver_priv;
191         struct exynos_drm_gem_obj_node *cur, *d;
192
193         DRM_DEBUG_DRIVER("%s\n", __FILE__);
194
195         mutex_lock(&dev->struct_mutex);
196         /* release kds resource sets for outstanding GEM object acquires */
197         list_for_each_entry_safe(cur, d,
198                         &file_private->gem_cpu_acquire_list, list) {
199 #ifdef CONFIG_DMA_SHARED_BUFFER_USES_KDS
200                 BUG_ON(cur->exynos_gem_obj->resource_set == NULL);
201                 kds_resource_set_release(&cur->exynos_gem_obj->resource_set);
202 #endif
203                 drm_gem_object_unreference(&cur->exynos_gem_obj->base);
204                 kfree(cur);
205         }
206         mutex_unlock(&dev->struct_mutex);
207         INIT_LIST_HEAD(&file_private->gem_cpu_acquire_list);
208
209         exynos_drm_subdrv_close(dev, file);
210 }
211
212 static void exynos_drm_postclose(struct drm_device *dev, struct drm_file *file)
213 {
214         DRM_DEBUG_DRIVER("%s\n", __FILE__);
215
216         if (!file->driver_priv)
217                 return;
218
219         kfree(file->driver_priv);
220         file->driver_priv = NULL;
221 }
222
223 static void exynos_drm_lastclose(struct drm_device *dev)
224 {
225         DRM_DEBUG_DRIVER("%s\n", __FILE__);
226
227         exynos_drm_fbdev_restore_mode(dev);
228 }
229
230 static struct vm_operations_struct exynos_drm_gem_vm_ops = {
231         .fault = exynos_drm_gem_fault,
232         .open = drm_gem_vm_open,
233         .close = drm_gem_vm_close,
234 };
235
236 static struct drm_ioctl_desc exynos_ioctls[] = {
237         DRM_IOCTL_DEF_DRV(EXYNOS_GEM_CREATE, exynos_drm_gem_create_ioctl,
238                         DRM_UNLOCKED | DRM_AUTH),
239         DRM_IOCTL_DEF_DRV(EXYNOS_GEM_MAP_OFFSET,
240                         exynos_drm_gem_map_offset_ioctl, DRM_UNLOCKED |
241                         DRM_AUTH),
242         DRM_IOCTL_DEF_DRV(EXYNOS_GEM_MMAP,
243                         exynos_drm_gem_mmap_ioctl, DRM_UNLOCKED | DRM_AUTH),
244         DRM_IOCTL_DEF_DRV(EXYNOS_PLANE_SET_ZPOS, exynos_plane_set_zpos_ioctl,
245                         DRM_UNLOCKED | DRM_AUTH),
246         DRM_IOCTL_DEF_DRV(EXYNOS_VIDI_CONNECTION,
247                         vidi_connection_ioctl, DRM_UNLOCKED | DRM_AUTH),
248         DRM_IOCTL_DEF_DRV(EXYNOS_GEM_CPU_ACQUIRE,
249                         exynos_drm_gem_cpu_acquire_ioctl,
250                         DRM_UNLOCKED | DRM_AUTH),
251         DRM_IOCTL_DEF_DRV(EXYNOS_GEM_CPU_RELEASE,
252                         exynos_drm_gem_cpu_release_ioctl,
253                         DRM_UNLOCKED | DRM_AUTH),
254 };
255
256 static const struct file_operations exynos_drm_driver_fops = {
257         .owner          = THIS_MODULE,
258         .open           = drm_open,
259         .mmap           = exynos_drm_gem_mmap,
260         .poll           = drm_poll,
261         .read           = drm_read,
262         .unlocked_ioctl = drm_ioctl,
263         .release        = drm_release,
264 };
265
266 static struct drm_driver exynos_drm_driver = {
267         .driver_features        = DRIVER_HAVE_IRQ | DRIVER_BUS_PLATFORM |
268                                   DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME,
269         .load                   = exynos_drm_load,
270         .unload                 = exynos_drm_unload,
271         .open                   = exynos_drm_open,
272         .preclose               = exynos_drm_preclose,
273         .lastclose              = exynos_drm_lastclose,
274         .postclose              = exynos_drm_postclose,
275         .get_vblank_counter     = drm_vblank_count,
276         .enable_vblank          = exynos_drm_crtc_enable_vblank,
277         .disable_vblank         = exynos_drm_crtc_disable_vblank,
278 #if defined(CONFIG_DEBUG_FS)
279         .debugfs_init           = exynos_drm_debugfs_init,
280         .debugfs_cleanup        = exynos_drm_debugfs_cleanup,
281 #endif
282         .gem_free_object        = exynos_drm_gem_free_object,
283         .gem_vm_ops             = &exynos_drm_gem_vm_ops,
284         .dumb_create            = exynos_drm_gem_dumb_create,
285         .dumb_map_offset        = exynos_drm_gem_dumb_map_offset,
286         .dumb_destroy           = exynos_drm_gem_dumb_destroy,
287         .prime_handle_to_fd     = drm_gem_prime_handle_to_fd,
288         .prime_fd_to_handle     = drm_gem_prime_fd_to_handle,
289         .gem_prime_export       = exynos_dmabuf_prime_export,
290         .gem_prime_import       = exynos_dmabuf_prime_import,
291         .ioctls                 = exynos_ioctls,
292         .fops                   = &exynos_drm_driver_fops,
293         .name   = DRIVER_NAME,
294         .desc   = DRIVER_DESC,
295         .date   = DRIVER_DATE,
296         .major  = DRIVER_MAJOR,
297         .minor  = DRIVER_MINOR,
298 };
299
300 #ifdef CONFIG_EXYNOS_IOMMU
301 static int iommu_init(struct platform_device *pdev)
302 {
303         /* DRM device expects a IOMMU mapping to be already
304          * created in FIMD. Else this function should
305          * throw an error.
306          */
307         if (exynos_drm_common_mapping==NULL) {
308                 printk(KERN_ERR "exynos drm common mapping is invalid\n");
309                 return -1;
310         }
311
312         /*
313          * The ordering in Makefile warrants that this is initialized after
314          * FIMD, so only just ensure that it works as expected and we are
315          * reusing the mapping originally created in exynos_drm_fimd.c.
316          */
317         WARN_ON(!exynos_drm_common_mapping);
318         if (!s5p_create_iommu_mapping(&pdev->dev, 0,
319                                 0, 0, exynos_drm_common_mapping)) {
320                 printk(KERN_ERR "failed to create IOMMU mapping\n");
321                 return -1;
322         }
323
324         return 0;
325 }
326
327 static void iommu_deinit(struct platform_device *pdev)
328 {
329         /* detach the device and mapping */
330         s5p_destroy_iommu_mapping(&pdev->dev);
331         DRM_DEBUG("released the IOMMU mapping\n");
332
333         return;
334 }
335 #endif
336
337 static int exynos_drm_platform_probe(struct platform_device *pdev)
338 {
339         struct device *dev = &pdev->dev;
340
341         DRM_DEBUG_DRIVER("%s\n", __FILE__);
342
343 #ifdef CONFIG_EXYNOS_IOMMU
344         if (iommu_init(pdev)) {
345                 DRM_ERROR("failed to initialize IOMMU\n");
346                 return -ENODEV;
347         }
348 #endif
349
350         exynos_drm_driver.num_ioctls = DRM_ARRAY_SIZE(exynos_ioctls);
351
352         pm_runtime_enable(dev);
353         pm_runtime_get_sync(dev);
354
355         return drm_platform_init(&exynos_drm_driver, pdev);
356 }
357
358 static int __devexit exynos_drm_platform_remove(struct platform_device *pdev)
359 {
360         struct device *dev = &pdev->dev;
361
362         DRM_DEBUG_DRIVER("%s\n", __FILE__);
363
364         pm_runtime_disable(dev);
365
366         drm_platform_exit(&exynos_drm_driver, pdev);
367
368 #ifdef CONFIG_EXYNOS_IOMMU
369         iommu_deinit(pdev);
370 #endif
371         return 0;
372 }
373
374 /* TODO (seanpaul): Once we remove platform drivers, we'll be calling the
375  * various panel/controller init functions directly. These init functions will
376  * return to us the ops and context, so we can get rid of these attach
377  * functions. Once the attach functions are gone, we can move this array of
378  * display pointers into the drm device's platform data.
379  *
380  * For now, we'll use a global to keep track of things.
381  */
382 static struct exynos_drm_display *displays[EXYNOS_DRM_DISPLAY_NUM_DISPLAYS];
383
384 void exynos_display_attach_panel(enum exynos_drm_display_type type,
385                 struct exynos_panel_ops *ops, void *ctx)
386 {
387         int i;
388         for (i = 0; i < EXYNOS_DRM_DISPLAY_NUM_DISPLAYS; i++) {
389                 if (displays[i]->display_type == type) {
390                         displays[i]->panel_ctx = ctx;
391                         displays[i]->panel_ops = ops;
392                         return;
393                 }
394         }
395 }
396
397 void exynos_display_attach_controller(enum exynos_drm_display_type type,
398                 struct exynos_controller_ops *ops, void *ctx)
399 {
400         int i;
401         for (i = 0; i < EXYNOS_DRM_DISPLAY_NUM_DISPLAYS; i++) {
402                 if (displays[i]->display_type == type) {
403                         displays[i]->controller_ctx = ctx;
404                         displays[i]->controller_ops = ops;
405                         return;
406                 }
407         }
408 }
409
410 static int display_subdrv_probe(struct drm_device *drm_dev,
411                 struct exynos_drm_subdrv *subdrv)
412 {
413         struct exynos_drm_display *display = subdrv->display;
414         int ret;
415
416         if (!display->controller_ops || !display->panel_ops)
417                 return -EINVAL;
418
419         if (display->controller_ops->subdrv_probe) {
420                 ret = display->controller_ops->subdrv_probe(
421                                 display->controller_ctx, drm_dev);
422                 if (ret)
423                         return ret;
424         }
425
426         if (display->panel_ops->subdrv_probe) {
427                 ret = display->panel_ops->subdrv_probe(display->panel_ctx,
428                                 drm_dev);
429                 if (ret)
430                         return ret;
431         }
432
433         return 0;
434 }
435
436 int exynos_display_init(struct exynos_drm_display *display,
437                 enum exynos_drm_display_type type)
438 {
439         struct exynos_drm_subdrv *subdrv;
440
441         subdrv = kzalloc(sizeof(*subdrv), GFP_KERNEL);
442         if (!subdrv) {
443                 DRM_ERROR("Failed to allocate display subdrv\n");
444                 return -ENOMEM;
445         }
446
447         display->display_type = type;
448         display->pipe = -1;
449         display->subdrv = subdrv;
450
451         subdrv->probe = display_subdrv_probe;
452         subdrv->display = display;
453         exynos_drm_subdrv_register(subdrv);
454
455         return 0;
456 }
457
458 void exynos_display_remove(struct exynos_drm_display *display)
459 {
460         if (display->subdrv) {
461                 exynos_drm_subdrv_unregister(display->subdrv);
462                 kfree(display->subdrv);
463         }
464 }
465
466 static int exynos_drm_resume_displays(void)
467 {
468         int i;
469
470         for (i = 0; i < EXYNOS_DRM_DISPLAY_NUM_DISPLAYS; i++) {
471                 struct exynos_drm_display *display = displays[i];
472                 struct drm_encoder *encoder = display->subdrv->encoder;
473
474                 if (!encoder)
475                         continue;
476
477                 exynos_drm_encoder_dpms(encoder, display->suspend_dpms);
478         }
479         return 0;
480 }
481
482 static int exynos_drm_suspend_displays(void)
483 {
484         int i;
485
486         for (i = 0; i < EXYNOS_DRM_DISPLAY_NUM_DISPLAYS; i++) {
487                 struct exynos_drm_display *display = displays[i];
488                 struct drm_encoder *encoder = display->subdrv->encoder;
489
490                 if (!encoder)
491                         continue;
492
493                 display->suspend_dpms = exynos_drm_encoder_get_dpms(encoder);
494                 exynos_drm_encoder_dpms(encoder, DRM_MODE_DPMS_OFF);
495         }
496         return 0;
497 }
498
499 #ifdef CONFIG_PM_SLEEP
500 static int exynos_drm_suspend(struct device *dev)
501 {
502         if (pm_runtime_suspended(dev))
503                 return 0;
504
505         return exynos_drm_suspend_displays();
506 }
507
508 static int exynos_drm_resume(struct device *dev)
509 {
510         if (pm_runtime_suspended(dev))
511                 return 0;
512
513         return exynos_drm_resume_displays();
514 }
515 #endif
516
517 #ifdef CONFIG_PM_RUNTIME
518 static int exynos_drm_runtime_resume(struct device *dev)
519 {
520         return exynos_drm_resume_displays();
521 }
522
523 static int exynos_drm_runtime_suspend(struct device *dev)
524 {
525         return exynos_drm_suspend_displays();
526 }
527 #endif
528
529 static const struct dev_pm_ops drm_pm_ops = {
530         SET_SYSTEM_SLEEP_PM_OPS(exynos_drm_suspend, exynos_drm_resume)
531         SET_RUNTIME_PM_OPS(exynos_drm_runtime_suspend,
532                         exynos_drm_runtime_resume, NULL)
533 };
534
535 static struct platform_driver exynos_drm_platform_driver = {
536         .probe          = exynos_drm_platform_probe,
537         .remove         = __devexit_p(exynos_drm_platform_remove),
538         .driver         = {
539                 .owner  = THIS_MODULE,
540                 .name   = "exynos-drm",
541                 .pm     = &drm_pm_ops,
542         },
543 };
544
545 static int __init exynos_drm_init(void)
546 {
547         int ret, i;
548
549         DRM_DEBUG_DRIVER("%s\n", __FILE__);
550
551         for (i = 0; i < EXYNOS_DRM_DISPLAY_NUM_DISPLAYS; i++) {
552                 displays[i] = kzalloc(sizeof(*displays[i]), GFP_KERNEL);
553                 if (!displays[i]) {
554                         ret = -ENOMEM;
555                         goto out_display;
556                 }
557
558                 ret = exynos_display_init(displays[i], i);
559                 if (ret)
560                         goto out_display;
561         }
562
563 #ifdef CONFIG_DRM_EXYNOS_FIMD
564         ret = platform_driver_register(&fimd_driver);
565         if (ret < 0)
566                 goto out_fimd;
567 #endif
568
569 #ifdef CONFIG_DRM_EXYNOS_DP
570         ret = platform_driver_register(&dp_driver);
571         if (ret < 0)
572                 goto out_dp_driver;
573 #endif
574
575 #ifdef CONFIG_DRM_EXYNOS_HDMI
576         ret = platform_driver_register(&hdmi_driver);
577         if (ret < 0)
578                 goto out_hdmi;
579         ret = platform_driver_register(&mixer_driver);
580         if (ret < 0)
581                 goto out_mixer;
582 #endif
583
584 #ifdef CONFIG_DRM_EXYNOS_VIDI
585         ret = platform_driver_register(&vidi_driver);
586         if (ret < 0)
587                 goto out_vidi;
588 #endif
589
590         ret = platform_driver_register(&exynos_drm_platform_driver);
591         if (ret < 0)
592                 goto out;
593
594         return 0;
595
596 out:
597 #ifdef CONFIG_DRM_EXYNOS_VIDI
598 out_vidi:
599         platform_driver_unregister(&vidi_driver);
600 #endif
601
602 #ifdef CONFIG_DRM_EXYNOS_HDMI
603         platform_driver_unregister(&mixer_driver);
604 out_mixer:
605         platform_driver_unregister(&hdmi_driver);
606 out_hdmi:
607 #endif
608
609         platform_driver_unregister(&dp_driver);
610 out_dp_driver:
611 #ifdef CONFIG_DRM_EXYNOS_FIMD
612         platform_driver_unregister(&fimd_driver);
613 out_fimd:
614 #endif
615 out_display:
616         for (i = 0; i < EXYNOS_DRM_DISPLAY_NUM_DISPLAYS; i++) {
617                 if (!displays[i])
618                         continue;
619
620                 exynos_display_remove(displays[i]);
621                 kfree(displays[i]);
622         }
623         return ret;
624 }
625
626 static void __exit exynos_drm_exit(void)
627 {
628         int i;
629
630         DRM_DEBUG_DRIVER("%s\n", __FILE__);
631
632         platform_driver_unregister(&exynos_drm_platform_driver);
633
634 #ifdef CONFIG_DRM_EXYNOS_HDMI
635         platform_driver_unregister(&mixer_driver);
636         platform_driver_unregister(&hdmi_driver);
637 #endif
638
639 #ifdef CONFIG_DRM_EXYNOS_VIDI
640         platform_driver_unregister(&vidi_driver);
641 #endif
642
643         platform_driver_unregister(&dp_driver);
644 #ifdef CONFIG_DRM_EXYNOS_FIMD
645         platform_driver_unregister(&fimd_driver);
646 #endif
647
648         for (i = 0; i < EXYNOS_DRM_DISPLAY_NUM_DISPLAYS; i++) {
649                 if (!displays[i])
650                         continue;
651
652                 exynos_display_remove(displays[i]);
653                 kfree(displays[i]);
654         }
655 }
656
657 module_init(exynos_drm_init);
658 module_exit(exynos_drm_exit);
659
660 MODULE_AUTHOR("Inki Dae <inki.dae@samsung.com>");
661 MODULE_AUTHOR("Joonyoung Shim <jy0922.shim@samsung.com>");
662 MODULE_AUTHOR("Seung-Woo Kim <sw0312.kim@samsung.com>");
663 MODULE_DESCRIPTION("Samsung SoC DRM Driver");
664 MODULE_LICENSE("GPL");