aboutsummaryrefslogtreecommitdiffstats
path: root/include/video
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2013-04-19 08:09:34 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-06-17 07:00:51 -0400
commit1f68d9c4b660487c5878c4800ff5a402abc6c005 (patch)
tree1309d1567c05c201739d93db178736d012a48eb2 /include/video
parentd3923933930273a2c1f724c50fe1dd829e196b31 (diff)
OMAPDSS: combine omap_dss_output into omap_dss_device
We currently have omap_dss_device, which represents an external display device, sometimes an external encoder, sometimes a panel. Then we have omap_dss_output, which represents DSS's output encoder. In the future with new display device model, we construct a video pipeline from the display blocks. To accomplish this, all the blocks need to be presented by the same entity. Thus, this patch combines omap_dss_output into omap_dss_device. Some of the fields in omap_dss_output are already found in omap_dss_device, but some are not. This means we'll have DSS output specific fields in omap_dss_device, which is not very nice. However, it is easier to just keep those output specific fields there for now, and after transition to new display device model is made, they can be cleaned up easier than could be done now. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'include/video')
-rw-r--r--include/video/omapdss.h66
1 files changed, 30 insertions, 36 deletions
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index 6a699f537a68..8e5035a54544 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -515,7 +515,7 @@ struct omap_overlay_manager {
515 enum omap_dss_output_id supported_outputs; 515 enum omap_dss_output_id supported_outputs;
516 516
517 /* dynamic fields */ 517 /* dynamic fields */
518 struct omap_dss_output *output; 518 struct omap_dss_device *output;
519 519
520 /* 520 /*
521 * The following functions do not block: 521 * The following functions do not block:
@@ -529,7 +529,7 @@ struct omap_overlay_manager {
529 */ 529 */
530 530
531 int (*set_output)(struct omap_overlay_manager *mgr, 531 int (*set_output)(struct omap_overlay_manager *mgr,
532 struct omap_dss_output *output); 532 struct omap_dss_device *output);
533 int (*unset_output)(struct omap_overlay_manager *mgr); 533 int (*unset_output)(struct omap_overlay_manager *mgr);
534 534
535 int (*set_manager_info)(struct omap_overlay_manager *mgr, 535 int (*set_manager_info)(struct omap_overlay_manager *mgr,
@@ -572,29 +572,6 @@ struct omap_dss_writeback_info {
572 u8 pre_mult_alpha; 572 u8 pre_mult_alpha;
573}; 573};
574 574
575struct omap_dss_output {
576 struct list_head list;
577
578 const char *name;
579
580 /* display type supported by the output */
581 enum omap_display_type type;
582
583 /* DISPC channel for this output */
584 enum omap_channel dispc_channel;
585
586 /* output instance */
587 enum omap_dss_output_id id;
588
589 /* output's platform device pointer */
590 struct platform_device *pdev;
591
592 /* dynamic fields */
593 struct omap_overlay_manager *manager;
594
595 struct omap_dss_device *device;
596};
597
598struct omap_dss_device { 575struct omap_dss_device {
599 /* old device, to be removed */ 576 /* old device, to be removed */
600 struct device old_dev; 577 struct device old_dev;
@@ -608,6 +585,7 @@ struct omap_dss_device {
608 char alias[16]; 585 char alias[16];
609 586
610 enum omap_display_type type; 587 enum omap_display_type type;
588 enum omap_display_type output_type;
611 589
612 /* obsolete, to be removed */ 590 /* obsolete, to be removed */
613 enum omap_channel channel; 591 enum omap_channel channel;
@@ -669,7 +647,7 @@ struct omap_dss_device {
669 647
670 enum omap_display_caps caps; 648 enum omap_display_caps caps;
671 649
672 struct omap_dss_output *output; 650 struct omap_dss_device *output;
673 651
674 enum omap_dss_display_state state; 652 enum omap_dss_display_state state;
675 653
@@ -680,6 +658,22 @@ struct omap_dss_device {
680 void (*platform_disable)(struct omap_dss_device *dssdev); 658 void (*platform_disable)(struct omap_dss_device *dssdev);
681 int (*set_backlight)(struct omap_dss_device *dssdev, int level); 659 int (*set_backlight)(struct omap_dss_device *dssdev, int level);
682 int (*get_backlight)(struct omap_dss_device *dssdev); 660 int (*get_backlight)(struct omap_dss_device *dssdev);
661
662
663 /* OMAP DSS output specific fields */
664
665 struct list_head list;
666
667 /* DISPC channel for this output */
668 enum omap_channel dispc_channel;
669
670 /* output instance */
671 enum omap_dss_output_id id;
672
673 /* dynamic fields */
674 struct omap_overlay_manager *manager;
675
676 struct omap_dss_device *device;
683}; 677};
684 678
685struct omap_dss_hdmi_data 679struct omap_dss_hdmi_data
@@ -798,14 +792,14 @@ struct omap_overlay_manager *omap_dss_get_overlay_manager(int num);
798int omap_dss_get_num_overlays(void); 792int omap_dss_get_num_overlays(void);
799struct omap_overlay *omap_dss_get_overlay(int num); 793struct omap_overlay *omap_dss_get_overlay(int num);
800 794
801struct omap_dss_output *omap_dss_get_output(enum omap_dss_output_id id); 795struct omap_dss_device *omap_dss_get_output(enum omap_dss_output_id id);
802struct omap_dss_output *omap_dss_find_output(const char *name); 796struct omap_dss_device *omap_dss_find_output(const char *name);
803struct omap_dss_output *omap_dss_find_output_by_node(struct device_node *node); 797struct omap_dss_device *omap_dss_find_output_by_node(struct device_node *node);
804int omapdss_output_set_device(struct omap_dss_output *out, 798int omapdss_output_set_device(struct omap_dss_device *out,
805 struct omap_dss_device *dssdev); 799 struct omap_dss_device *dssdev);
806int omapdss_output_unset_device(struct omap_dss_output *out); 800int omapdss_output_unset_device(struct omap_dss_device *out);
807 801
808struct omap_dss_output *omapdss_find_output_from_display(struct omap_dss_device *dssdev); 802struct omap_dss_device *omapdss_find_output_from_display(struct omap_dss_device *dssdev);
809struct omap_overlay_manager *omapdss_find_mgr_from_display(struct omap_dss_device *dssdev); 803struct omap_overlay_manager *omapdss_find_mgr_from_display(struct omap_dss_device *dssdev);
810 804
811void omapdss_default_get_resolution(struct omap_dss_device *dssdev, 805void omapdss_default_get_resolution(struct omap_dss_device *dssdev,
@@ -909,9 +903,9 @@ void omapdss_compat_uninit(void);
909 903
910struct dss_mgr_ops { 904struct dss_mgr_ops {
911 int (*connect)(struct omap_overlay_manager *mgr, 905 int (*connect)(struct omap_overlay_manager *mgr,
912 struct omap_dss_output *dst); 906 struct omap_dss_device *dst);
913 void (*disconnect)(struct omap_overlay_manager *mgr, 907 void (*disconnect)(struct omap_overlay_manager *mgr,
914 struct omap_dss_output *dst); 908 struct omap_dss_device *dst);
915 909
916 void (*start_update)(struct omap_overlay_manager *mgr); 910 void (*start_update)(struct omap_overlay_manager *mgr);
917 int (*enable)(struct omap_overlay_manager *mgr); 911 int (*enable)(struct omap_overlay_manager *mgr);
@@ -930,9 +924,9 @@ int dss_install_mgr_ops(const struct dss_mgr_ops *mgr_ops);
930void dss_uninstall_mgr_ops(void); 924void dss_uninstall_mgr_ops(void);
931 925
932int dss_mgr_connect(struct omap_overlay_manager *mgr, 926int dss_mgr_connect(struct omap_overlay_manager *mgr,
933 struct omap_dss_output *dst); 927 struct omap_dss_device *dst);
934void dss_mgr_disconnect(struct omap_overlay_manager *mgr, 928void dss_mgr_disconnect(struct omap_overlay_manager *mgr,
935 struct omap_dss_output *dst); 929 struct omap_dss_device *dst);
936void dss_mgr_set_timings(struct omap_overlay_manager *mgr, 930void dss_mgr_set_timings(struct omap_overlay_manager *mgr,
937 const struct omap_video_timings *timings); 931 const struct omap_video_timings *timings);
938void dss_mgr_set_lcd_config(struct omap_overlay_manager *mgr, 932void dss_mgr_set_lcd_config(struct omap_overlay_manager *mgr,