aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2012-07-06 11:22:37 -0400
committerArchit Taneja <archit@ti.com>2012-08-15 06:19:23 -0400
commit156fd99e92c30b0a894f7f4874c6901bfdc65c44 (patch)
tree7b40d42af877119d5c23ab5a1f147298fc8d4d7d
parent9b4a5716ef54bbf2f57c75f790b12fc63a4be640 (diff)
OMAPDSS: VENC: Split VENC into interface and panel driver
The current venc.c driver contains both the interface and panel driver code. This makes the driver hard to read, and difficult to understand the work split between the interface and panel driver and the how the locking works. This also makes it easier to clearly define the VENC interface ops called by the panel driver. Split venc.c into venc.c and venc_panel.c representing the interface and panel driver respectively. This split is done along the lines of the HDMI interface and panel drivers. Signed-off-by: Archit Taneja <archit@ti.com>
-rw-r--r--drivers/video/omap2/dss/Makefile2
-rw-r--r--drivers/video/omap2/dss/dss.h10
-rw-r--r--drivers/video/omap2/dss/venc.c208
-rw-r--r--drivers/video/omap2/dss/venc_panel.c244
4 files changed, 308 insertions, 156 deletions
diff --git a/drivers/video/omap2/dss/Makefile b/drivers/video/omap2/dss/Makefile
index 5c450b0f94d..30a48fba75b 100644
--- a/drivers/video/omap2/dss/Makefile
+++ b/drivers/video/omap2/dss/Makefile
@@ -3,7 +3,7 @@ omapdss-y := core.o dss.o dss_features.o dispc.o dispc_coefs.o display.o \
3 manager.o overlay.o apply.o 3 manager.o overlay.o apply.o
4omapdss-$(CONFIG_OMAP2_DSS_DPI) += dpi.o 4omapdss-$(CONFIG_OMAP2_DSS_DPI) += dpi.o
5omapdss-$(CONFIG_OMAP2_DSS_RFBI) += rfbi.o 5omapdss-$(CONFIG_OMAP2_DSS_RFBI) += rfbi.o
6omapdss-$(CONFIG_OMAP2_DSS_VENC) += venc.o 6omapdss-$(CONFIG_OMAP2_DSS_VENC) += venc.o venc_panel.o
7omapdss-$(CONFIG_OMAP2_DSS_SDI) += sdi.o 7omapdss-$(CONFIG_OMAP2_DSS_SDI) += sdi.o
8omapdss-$(CONFIG_OMAP2_DSS_DSI) += dsi.o 8omapdss-$(CONFIG_OMAP2_DSS_DSI) += dsi.o
9omapdss-$(CONFIG_OMAP4_DSS_HDMI) += hdmi.o \ 9omapdss-$(CONFIG_OMAP4_DSS_HDMI) += hdmi.o \
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
index ea39a994d1f..78493dbd38e 100644
--- a/drivers/video/omap2/dss/dss.h
+++ b/drivers/video/omap2/dss/dss.h
@@ -469,6 +469,16 @@ static inline unsigned long venc_get_pixel_clock(void)
469 return 0; 469 return 0;
470} 470}
471#endif 471#endif
472int omapdss_venc_display_enable(struct omap_dss_device *dssdev);
473void omapdss_venc_display_disable(struct omap_dss_device *dssdev);
474void omapdss_venc_set_timings(struct omap_dss_device *dssdev,
475 struct omap_video_timings *timings);
476int omapdss_venc_check_timings(struct omap_dss_device *dssdev,
477 struct omap_video_timings *timings);
478u32 omapdss_venc_get_wss(struct omap_dss_device *dssdev);
479int omapdss_venc_set_wss(struct omap_dss_device *dssdev, u32 wss);
480int venc_panel_init(void);
481void venc_panel_exit(void);
472 482
473/* HDMI */ 483/* HDMI */
474#ifdef CONFIG_OMAP4_DSS_HDMI 484#ifdef CONFIG_OMAP4_DSS_HDMI
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
index 3a220877461..ffca542a224 100644
--- a/drivers/video/omap2/dss/venc.c
+++ b/drivers/video/omap2/dss/venc.c
@@ -427,6 +427,10 @@ static int venc_power_on(struct omap_dss_device *dssdev)
427 u32 l; 427 u32 l;
428 int r; 428 int r;
429 429
430 r = venc_runtime_get();
431 if (r)
432 goto err0;
433
430 venc_reset(); 434 venc_reset();
431 venc_write_config(venc_timings_to_config(&dssdev->panel.timings)); 435 venc_write_config(venc_timings_to_config(&dssdev->panel.timings));
432 436
@@ -449,26 +453,22 @@ static int venc_power_on(struct omap_dss_device *dssdev)
449 453
450 r = regulator_enable(venc.vdda_dac_reg); 454 r = regulator_enable(venc.vdda_dac_reg);
451 if (r) 455 if (r)
452 goto err; 456 goto err1;
453
454 if (dssdev->platform_enable)
455 dssdev->platform_enable(dssdev);
456 457
457 r = dss_mgr_enable(dssdev->manager); 458 r = dss_mgr_enable(dssdev->manager);
458 if (r) 459 if (r)
459 goto err; 460 goto err2;
460 461
461 return 0; 462 return 0;
462 463
463err: 464err2:
465 regulator_disable(venc.vdda_dac_reg);
466err1:
464 venc_write_reg(VENC_OUTPUT_CONTROL, 0); 467 venc_write_reg(VENC_OUTPUT_CONTROL, 0);
465 dss_set_dac_pwrdn_bgz(0); 468 dss_set_dac_pwrdn_bgz(0);
466 469
467 if (dssdev->platform_disable) 470 venc_runtime_put();
468 dssdev->platform_disable(dssdev); 471err0:
469
470 regulator_disable(venc.vdda_dac_reg);
471
472 return r; 472 return r;
473} 473}
474 474
@@ -479,10 +479,9 @@ static void venc_power_off(struct omap_dss_device *dssdev)
479 479
480 dss_mgr_disable(dssdev->manager); 480 dss_mgr_disable(dssdev->manager);
481 481
482 if (dssdev->platform_disable)
483 dssdev->platform_disable(dssdev);
484
485 regulator_disable(venc.vdda_dac_reg); 482 regulator_disable(venc.vdda_dac_reg);
483
484 venc_runtime_put();
486} 485}
487 486
488unsigned long venc_get_pixel_clock(void) 487unsigned long venc_get_pixel_clock(void)
@@ -491,171 +490,95 @@ unsigned long venc_get_pixel_clock(void)
491 return 13500000; 490 return 13500000;
492} 491}
493 492
494static ssize_t display_output_type_show(struct device *dev, 493int omapdss_venc_display_enable(struct omap_dss_device *dssdev)
495 struct device_attribute *attr, char *buf)
496{ 494{
497 struct omap_dss_device *dssdev = to_dss_device(dev); 495 int r;
498 const char *ret;
499
500 switch (dssdev->phy.venc.type) {
501 case OMAP_DSS_VENC_TYPE_COMPOSITE:
502 ret = "composite";
503 break;
504 case OMAP_DSS_VENC_TYPE_SVIDEO:
505 ret = "svideo";
506 break;
507 default:
508 return -EINVAL;
509 }
510 496
511 return snprintf(buf, PAGE_SIZE, "%s\n", ret); 497 DSSDBG("venc_display_enable\n");
512}
513
514static ssize_t display_output_type_store(struct device *dev,
515 struct device_attribute *attr, const char *buf, size_t size)
516{
517 struct omap_dss_device *dssdev = to_dss_device(dev);
518 enum omap_dss_venc_type new_type;
519
520 if (sysfs_streq("composite", buf))
521 new_type = OMAP_DSS_VENC_TYPE_COMPOSITE;
522 else if (sysfs_streq("svideo", buf))
523 new_type = OMAP_DSS_VENC_TYPE_SVIDEO;
524 else
525 return -EINVAL;
526 498
527 mutex_lock(&venc.venc_lock); 499 mutex_lock(&venc.venc_lock);
528 500
529 if (dssdev->phy.venc.type != new_type) { 501 if (dssdev->manager == NULL) {
530 dssdev->phy.venc.type = new_type; 502 DSSERR("Failed to enable display: no manager\n");
531 if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) { 503 r = -ENODEV;
532 venc_power_off(dssdev); 504 goto err0;
533 venc_power_on(dssdev);
534 }
535 } 505 }
536 506
537 mutex_unlock(&venc.venc_lock);
538
539 return size;
540}
541
542static DEVICE_ATTR(output_type, S_IRUGO | S_IWUSR,
543 display_output_type_show, display_output_type_store);
544
545/* driver */
546static int venc_panel_probe(struct omap_dss_device *dssdev)
547{
548 dssdev->panel.timings = omap_dss_pal_timings;
549
550 return device_create_file(&dssdev->dev, &dev_attr_output_type);
551}
552
553static void venc_panel_remove(struct omap_dss_device *dssdev)
554{
555 device_remove_file(&dssdev->dev, &dev_attr_output_type);
556}
557
558static int venc_panel_enable(struct omap_dss_device *dssdev)
559{
560 int r = 0;
561
562 DSSDBG("venc_enable_display\n");
563
564 mutex_lock(&venc.venc_lock);
565
566 r = omap_dss_start_device(dssdev); 507 r = omap_dss_start_device(dssdev);
567 if (r) { 508 if (r) {
568 DSSERR("failed to start device\n"); 509 DSSERR("failed to start device\n");
569 goto err0; 510 goto err0;
570 } 511 }
571 512
572 if (dssdev->state != OMAP_DSS_DISPLAY_DISABLED) { 513 if (dssdev->platform_enable)
573 r = -EINVAL; 514 dssdev->platform_enable(dssdev);
574 goto err1;
575 }
576 515
577 r = venc_runtime_get();
578 if (r)
579 goto err1;
580 516
581 r = venc_power_on(dssdev); 517 r = venc_power_on(dssdev);
582 if (r) 518 if (r)
583 goto err2; 519 goto err1;
584 520
585 venc.wss_data = 0; 521 venc.wss_data = 0;
586 522
587 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
588
589 mutex_unlock(&venc.venc_lock); 523 mutex_unlock(&venc.venc_lock);
524
590 return 0; 525 return 0;
591err2:
592 venc_runtime_put();
593err1: 526err1:
527 if (dssdev->platform_disable)
528 dssdev->platform_disable(dssdev);
594 omap_dss_stop_device(dssdev); 529 omap_dss_stop_device(dssdev);
595err0: 530err0:
596 mutex_unlock(&venc.venc_lock); 531 mutex_unlock(&venc.venc_lock);
597
598 return r; 532 return r;
599} 533}
600 534
601static void venc_panel_disable(struct omap_dss_device *dssdev) 535void omapdss_venc_display_disable(struct omap_dss_device *dssdev)
602{ 536{
603 DSSDBG("venc_disable_display\n"); 537 DSSDBG("venc_display_disable\n");
604 538
605 mutex_lock(&venc.venc_lock); 539 mutex_lock(&venc.venc_lock);
606 540
607 if (dssdev->state == OMAP_DSS_DISPLAY_DISABLED)
608 goto end;
609
610 if (dssdev->state == OMAP_DSS_DISPLAY_SUSPENDED) {
611 /* suspended is the same as disabled with venc */
612 dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
613 goto end;
614 }
615
616 venc_power_off(dssdev); 541 venc_power_off(dssdev);
617 542
618 venc_runtime_put();
619
620 dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
621
622 omap_dss_stop_device(dssdev); 543 omap_dss_stop_device(dssdev);
623end:
624 mutex_unlock(&venc.venc_lock);
625}
626 544
627static int venc_panel_suspend(struct omap_dss_device *dssdev) 545 if (dssdev->platform_disable)
628{ 546 dssdev->platform_disable(dssdev);
629 venc_panel_disable(dssdev);
630 return 0;
631}
632 547
633static int venc_panel_resume(struct omap_dss_device *dssdev) 548 mutex_unlock(&venc.venc_lock);
634{
635 return venc_panel_enable(dssdev);
636} 549}
637 550
638static void venc_set_timings(struct omap_dss_device *dssdev, 551void omapdss_venc_set_timings(struct omap_dss_device *dssdev,
639 struct omap_video_timings *timings) 552 struct omap_video_timings *timings)
640{ 553{
641 DSSDBG("venc_set_timings\n"); 554 DSSDBG("venc_set_timings\n");
642 555
556 mutex_lock(&venc.venc_lock);
557
643 /* Reset WSS data when the TV standard changes. */ 558 /* Reset WSS data when the TV standard changes. */
644 if (memcmp(&dssdev->panel.timings, timings, sizeof(*timings))) 559 if (memcmp(&dssdev->panel.timings, timings, sizeof(*timings)))
645 venc.wss_data = 0; 560 venc.wss_data = 0;
646 561
647 dssdev->panel.timings = *timings; 562 dssdev->panel.timings = *timings;
563
648 if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) { 564 if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) {
565 int r;
566
649 /* turn the venc off and on to get new timings to use */ 567 /* turn the venc off and on to get new timings to use */
650 venc_panel_disable(dssdev); 568 venc_power_off(dssdev);
651 venc_panel_enable(dssdev); 569
570 r = venc_power_on(dssdev);
571 if (r)
572 DSSERR("failed to power on VENC\n");
652 } else { 573 } else {
653 dss_mgr_set_timings(dssdev->manager, timings); 574 dss_mgr_set_timings(dssdev->manager, timings);
654 } 575 }
576
577 mutex_unlock(&venc.venc_lock);
655} 578}
656 579
657static int venc_check_timings(struct omap_dss_device *dssdev, 580int omapdss_venc_check_timings(struct omap_dss_device *dssdev,
658 struct omap_video_timings *timings) 581 struct omap_video_timings *timings)
659{ 582{
660 DSSDBG("venc_check_timings\n"); 583 DSSDBG("venc_check_timings\n");
661 584
@@ -668,13 +591,13 @@ static int venc_check_timings(struct omap_dss_device *dssdev,
668 return -EINVAL; 591 return -EINVAL;
669} 592}
670 593
671static u32 venc_get_wss(struct omap_dss_device *dssdev) 594u32 omapdss_venc_get_wss(struct omap_dss_device *dssdev)
672{ 595{
673 /* Invert due to VENC_L21_WC_CTL:INV=1 */ 596 /* Invert due to VENC_L21_WC_CTL:INV=1 */
674 return (venc.wss_data >> 8) ^ 0xfffff; 597 return (venc.wss_data >> 8) ^ 0xfffff;
675} 598}
676 599
677static int venc_set_wss(struct omap_dss_device *dssdev, u32 wss) 600int omapdss_venc_set_wss(struct omap_dss_device *dssdev, u32 wss)
678{ 601{
679 const struct venc_config *config; 602 const struct venc_config *config;
680 int r; 603 int r;
@@ -703,31 +626,6 @@ err:
703 return r; 626 return r;
704} 627}
705 628
706static struct omap_dss_driver venc_driver = {
707 .probe = venc_panel_probe,
708 .remove = venc_panel_remove,
709
710 .enable = venc_panel_enable,
711 .disable = venc_panel_disable,
712 .suspend = venc_panel_suspend,
713 .resume = venc_panel_resume,
714
715 .get_resolution = omapdss_default_get_resolution,
716 .get_recommended_bpp = omapdss_default_get_recommended_bpp,
717
718 .set_timings = venc_set_timings,
719 .check_timings = venc_check_timings,
720
721 .get_wss = venc_get_wss,
722 .set_wss = venc_set_wss,
723
724 .driver = {
725 .name = "venc",
726 .owner = THIS_MODULE,
727 },
728};
729/* driver end */
730
731static int __init venc_init_display(struct omap_dss_device *dssdev) 629static int __init venc_init_display(struct omap_dss_device *dssdev)
732{ 630{
733 DSSDBG("init_display\n"); 631 DSSDBG("init_display\n");
@@ -897,9 +795,9 @@ static int __init omap_venchw_probe(struct platform_device *pdev)
897 795
898 venc_runtime_put(); 796 venc_runtime_put();
899 797
900 r = omap_dss_register_driver(&venc_driver); 798 r = venc_panel_init();
901 if (r) 799 if (r)
902 goto err_reg_panel_driver; 800 goto err_panel_init;
903 801
904 dss_debugfs_create_file("venc", venc_dump_regs); 802 dss_debugfs_create_file("venc", venc_dump_regs);
905 803
@@ -907,7 +805,7 @@ static int __init omap_venchw_probe(struct platform_device *pdev)
907 805
908 return 0; 806 return 0;
909 807
910err_reg_panel_driver: 808err_panel_init:
911err_runtime_get: 809err_runtime_get:
912 pm_runtime_disable(&pdev->dev); 810 pm_runtime_disable(&pdev->dev);
913 venc_put_clocks(); 811 venc_put_clocks();
@@ -923,7 +821,7 @@ static int __exit omap_venchw_remove(struct platform_device *pdev)
923 venc.vdda_dac_reg = NULL; 821 venc.vdda_dac_reg = NULL;
924 } 822 }
925 823
926 omap_dss_unregister_driver(&venc_driver); 824 venc_panel_exit();
927 825
928 pm_runtime_disable(&pdev->dev); 826 pm_runtime_disable(&pdev->dev);
929 venc_put_clocks(); 827 venc_put_clocks();
diff --git a/drivers/video/omap2/dss/venc_panel.c b/drivers/video/omap2/dss/venc_panel.c
new file mode 100644
index 00000000000..cfed9077d2f
--- /dev/null
+++ b/drivers/video/omap2/dss/venc_panel.c
@@ -0,0 +1,244 @@
1/*
2 * Copyright (C) 2009 Nokia Corporation
3 * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com>
4 *
5 * VENC panel driver
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * more details.
15 *
16 * You should have received a copy of the GNU General Public License along with
17 * this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#include <linux/kernel.h>
21#include <linux/err.h>
22#include <linux/io.h>
23#include <linux/mutex.h>
24#include <linux/module.h>
25
26#include <video/omapdss.h>
27
28#include "dss.h"
29
30static struct {
31 struct mutex lock;
32} venc_panel;
33
34static ssize_t display_output_type_show(struct device *dev,
35 struct device_attribute *attr, char *buf)
36{
37 struct omap_dss_device *dssdev = to_dss_device(dev);
38 const char *ret;
39
40 switch (dssdev->phy.venc.type) {
41 case OMAP_DSS_VENC_TYPE_COMPOSITE:
42 ret = "composite";
43 break;
44 case OMAP_DSS_VENC_TYPE_SVIDEO:
45 ret = "svideo";
46 break;
47 default:
48 return -EINVAL;
49 }
50
51 return snprintf(buf, PAGE_SIZE, "%s\n", ret);
52}
53
54static ssize_t display_output_type_store(struct device *dev,
55 struct device_attribute *attr, const char *buf, size_t size)
56{
57 struct omap_dss_device *dssdev = to_dss_device(dev);
58 enum omap_dss_venc_type new_type;
59
60 if (sysfs_streq("composite", buf))
61 new_type = OMAP_DSS_VENC_TYPE_COMPOSITE;
62 else if (sysfs_streq("svideo", buf))
63 new_type = OMAP_DSS_VENC_TYPE_SVIDEO;
64 else
65 return -EINVAL;
66
67 mutex_lock(&venc_panel.lock);
68
69 if (dssdev->phy.venc.type != new_type) {
70 dssdev->phy.venc.type = new_type;
71 if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) {
72 omapdss_venc_display_disable(dssdev);
73 omapdss_venc_display_enable(dssdev);
74 }
75 }
76
77 mutex_unlock(&venc_panel.lock);
78
79 return size;
80}
81
82static DEVICE_ATTR(output_type, S_IRUGO | S_IWUSR,
83 display_output_type_show, display_output_type_store);
84
85static int venc_panel_probe(struct omap_dss_device *dssdev)
86{
87 /* set default timings to PAL */
88 const struct omap_video_timings default_timings = {
89 .x_res = 720,
90 .y_res = 574,
91 .pixel_clock = 13500,
92 .hsw = 64,
93 .hfp = 12,
94 .hbp = 68,
95 .vsw = 5,
96 .vfp = 5,
97 .vbp = 41,
98
99 .vsync_level = OMAPDSS_SIG_ACTIVE_HIGH,
100 .hsync_level = OMAPDSS_SIG_ACTIVE_HIGH,
101
102 .interlace = true,
103 };
104
105 mutex_init(&venc_panel.lock);
106
107 dssdev->panel.timings = default_timings;
108
109 return device_create_file(&dssdev->dev, &dev_attr_output_type);
110}
111
112static void venc_panel_remove(struct omap_dss_device *dssdev)
113{
114 device_remove_file(&dssdev->dev, &dev_attr_output_type);
115}
116
117static int venc_panel_enable(struct omap_dss_device *dssdev)
118{
119 int r;
120
121 dev_dbg(&dssdev->dev, "venc_panel_enable\n");
122
123 mutex_lock(&venc_panel.lock);
124
125 if (dssdev->state != OMAP_DSS_DISPLAY_DISABLED) {
126 r = -EINVAL;
127 goto err;
128 }
129
130 r = omapdss_venc_display_enable(dssdev);
131 if (r)
132 goto err;
133
134 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
135
136 mutex_unlock(&venc_panel.lock);
137
138 return 0;
139err:
140 mutex_unlock(&venc_panel.lock);
141
142 return r;
143}
144
145static void venc_panel_disable(struct omap_dss_device *dssdev)
146{
147 dev_dbg(&dssdev->dev, "venc_panel_disable\n");
148
149 mutex_lock(&venc_panel.lock);
150
151 if (dssdev->state == OMAP_DSS_DISPLAY_DISABLED)
152 goto end;
153
154 if (dssdev->state == OMAP_DSS_DISPLAY_SUSPENDED) {
155 /* suspended is the same as disabled with venc */
156 dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
157 goto end;
158 }
159
160 omapdss_venc_display_disable(dssdev);
161
162 dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
163end:
164 mutex_unlock(&venc_panel.lock);
165}
166
167static int venc_panel_suspend(struct omap_dss_device *dssdev)
168{
169 venc_panel_disable(dssdev);
170 return 0;
171}
172
173static int venc_panel_resume(struct omap_dss_device *dssdev)
174{
175 return venc_panel_enable(dssdev);
176}
177
178static void venc_panel_set_timings(struct omap_dss_device *dssdev,
179 struct omap_video_timings *timings)
180{
181 dev_dbg(&dssdev->dev, "venc_panel_set_timings\n");
182
183 mutex_lock(&venc_panel.lock);
184
185 omapdss_venc_set_timings(dssdev, timings);
186
187 mutex_unlock(&venc_panel.lock);
188}
189
190static int venc_panel_check_timings(struct omap_dss_device *dssdev,
191 struct omap_video_timings *timings)
192{
193 dev_dbg(&dssdev->dev, "venc_panel_check_timings\n");
194
195 return omapdss_venc_check_timings(dssdev, timings);
196}
197
198static u32 venc_panel_get_wss(struct omap_dss_device *dssdev)
199{
200 dev_dbg(&dssdev->dev, "venc_panel_get_wss\n");
201
202 return omapdss_venc_get_wss(dssdev);
203}
204
205static int venc_panel_set_wss(struct omap_dss_device *dssdev, u32 wss)
206{
207 dev_dbg(&dssdev->dev, "venc_panel_set_wss\n");
208
209 return omapdss_venc_set_wss(dssdev, wss);
210}
211
212static struct omap_dss_driver venc_driver = {
213 .probe = venc_panel_probe,
214 .remove = venc_panel_remove,
215
216 .enable = venc_panel_enable,
217 .disable = venc_panel_disable,
218 .suspend = venc_panel_suspend,
219 .resume = venc_panel_resume,
220
221 .get_resolution = omapdss_default_get_resolution,
222 .get_recommended_bpp = omapdss_default_get_recommended_bpp,
223
224 .set_timings = venc_panel_set_timings,
225 .check_timings = venc_panel_check_timings,
226
227 .get_wss = venc_panel_get_wss,
228 .set_wss = venc_panel_set_wss,
229
230 .driver = {
231 .name = "venc",
232 .owner = THIS_MODULE,
233 },
234};
235
236int venc_panel_init(void)
237{
238 return omap_dss_register_driver(&venc_driver);
239}
240
241void venc_panel_exit(void)
242{
243 omap_dss_unregister_driver(&venc_driver);
244}