diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-12-13 07:30:56 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-12-13 07:30:56 -0500 |
commit | e7f5c9a16ea2648a3e85af8e34191026bf3dcb62 (patch) | |
tree | ad79eb6b57058e69013408d8ae4267ea06536ca6 /include/video | |
parent | a240af2eb24679f4d27d87281b25faee0a25df1a (diff) | |
parent | bd0f5cc3641cb76ae8fa2cc4924c29da157f8b2d (diff) |
Merge tag 'omapdss-for-3.8' of git://gitorious.org/linux-omap-dss2/linux into for-linus
OMAPDSS changes for 3.8, including:
- use dynanic debug prints
- OMAP platform dependency removals
- Creation of compat-layer, helping us to improve omapdrm
- Misc cleanups, aiming to make omadss more in line with the upcoming common
display framework
* tag 'omapdss-for-3.8' of git://gitorious.org/linux-omap-dss2/linux: (140 commits)
OMAPDSS: fix TV-out issue with DSI PLL
Revert "OMAPFB: simplify locking"
OMAPFB: remove silly loop in fb2display()
OMAPFB: fix error handling in omapfb_find_best_mode()
OMAPFB: use devm_kzalloc to allocate omapfb2_device
OMAPDSS: DISPC: remove dispc fck uses
OMAPDSS: DISPC: get dss clock rate from dss driver
OMAPDSS: use omapdss_compat_init() in other drivers
OMAPDSS: export dispc functions
OMAPDSS: export dss_feat functions
OMAPDSS: export dss_mgr_ops functions
OMAPDSS: separate compat files in the Makefile
OMAPDSS: move display sysfs init to compat layer
OMAPDSS: DPI: use dispc's check_timings
OMAPDSS: DISPC: add dispc_ovl_check()
OMAPDSS: move irq handling to dispc-compat
OMAPDSS: move omap_dispc_wait_for_irq_interruptible_timeout to dispc-compat.c
OMAPDSS: move blocking mgr enable/disable to compat layer
OMAPDSS: manage framedone irq with mgr ops
OMAPDSS: add manager ops
...
Diffstat (limited to 'include/video')
-rw-r--r-- | include/video/omapdss.h | 105 | ||||
-rw-r--r-- | include/video/omapvrfb.h | 68 |
2 files changed, 163 insertions, 10 deletions
diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 3729173b7fbc..caefa093337d 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/list.h> | 21 | #include <linux/list.h> |
22 | #include <linux/kobject.h> | 22 | #include <linux/kobject.h> |
23 | #include <linux/device.h> | 23 | #include <linux/device.h> |
24 | #include <linux/interrupt.h> | ||
24 | 25 | ||
25 | #define DISPC_IRQ_FRAMEDONE (1 << 0) | 26 | #define DISPC_IRQ_FRAMEDONE (1 << 0) |
26 | #define DISPC_IRQ_VSYNC (1 << 1) | 27 | #define DISPC_IRQ_VSYNC (1 << 1) |
@@ -55,6 +56,7 @@ | |||
55 | 56 | ||
56 | struct omap_dss_device; | 57 | struct omap_dss_device; |
57 | struct omap_overlay_manager; | 58 | struct omap_overlay_manager; |
59 | struct dss_lcd_mgr_config; | ||
58 | struct snd_aes_iec958; | 60 | struct snd_aes_iec958; |
59 | struct snd_cea_861_aud_if; | 61 | struct snd_cea_861_aud_if; |
60 | 62 | ||
@@ -158,7 +160,6 @@ enum omap_display_caps { | |||
158 | enum omap_dss_display_state { | 160 | enum omap_dss_display_state { |
159 | OMAP_DSS_DISPLAY_DISABLED = 0, | 161 | OMAP_DSS_DISPLAY_DISABLED = 0, |
160 | OMAP_DSS_DISPLAY_ACTIVE, | 162 | OMAP_DSS_DISPLAY_ACTIVE, |
161 | OMAP_DSS_DISPLAY_SUSPENDED, | ||
162 | }; | 163 | }; |
163 | 164 | ||
164 | enum omap_dss_audio_state { | 165 | enum omap_dss_audio_state { |
@@ -314,6 +315,19 @@ int dsi_vc_send_bta_sync(struct omap_dss_device *dssdev, int channel); | |||
314 | int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel); | 315 | int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel); |
315 | void dsi_disable_video_output(struct omap_dss_device *dssdev, int channel); | 316 | void dsi_disable_video_output(struct omap_dss_device *dssdev, int channel); |
316 | 317 | ||
318 | enum omapdss_version { | ||
319 | OMAPDSS_VER_UNKNOWN = 0, | ||
320 | OMAPDSS_VER_OMAP24xx, | ||
321 | OMAPDSS_VER_OMAP34xx_ES1, /* OMAP3430 ES1.0, 2.0 */ | ||
322 | OMAPDSS_VER_OMAP34xx_ES3, /* OMAP3430 ES3.0+ */ | ||
323 | OMAPDSS_VER_OMAP3630, | ||
324 | OMAPDSS_VER_AM35xx, | ||
325 | OMAPDSS_VER_OMAP4430_ES1, /* OMAP4430 ES1.0 */ | ||
326 | OMAPDSS_VER_OMAP4430_ES2, /* OMAP4430 ES2.0, 2.1, 2.2 */ | ||
327 | OMAPDSS_VER_OMAP4, /* All other OMAP4s */ | ||
328 | OMAPDSS_VER_OMAP5, | ||
329 | }; | ||
330 | |||
317 | /* Board specific data */ | 331 | /* Board specific data */ |
318 | struct omap_dss_board_info { | 332 | struct omap_dss_board_info { |
319 | int (*get_context_loss_count)(struct device *dev); | 333 | int (*get_context_loss_count)(struct device *dev); |
@@ -323,6 +337,7 @@ struct omap_dss_board_info { | |||
323 | int (*dsi_enable_pads)(int dsi_id, unsigned lane_mask); | 337 | int (*dsi_enable_pads)(int dsi_id, unsigned lane_mask); |
324 | void (*dsi_disable_pads)(int dsi_id, unsigned lane_mask); | 338 | void (*dsi_disable_pads)(int dsi_id, unsigned lane_mask); |
325 | int (*set_min_bus_tput)(struct device *dev, unsigned long r); | 339 | int (*set_min_bus_tput)(struct device *dev, unsigned long r); |
340 | enum omapdss_version version; | ||
326 | }; | 341 | }; |
327 | 342 | ||
328 | /* Init with the board info */ | 343 | /* Init with the board info */ |
@@ -607,10 +622,6 @@ struct omap_dss_device { | |||
607 | struct { | 622 | struct { |
608 | struct omap_video_timings timings; | 623 | struct omap_video_timings timings; |
609 | 624 | ||
610 | int acbi; /* ac-bias pin transitions per interrupt */ | ||
611 | /* Unit: line clocks */ | ||
612 | int acb; /* ac-bias pin frequency */ | ||
613 | |||
614 | enum omap_dss_dsi_pixel_format dsi_pix_fmt; | 625 | enum omap_dss_dsi_pixel_format dsi_pix_fmt; |
615 | enum omap_dss_dsi_mode dsi_mode; | 626 | enum omap_dss_dsi_mode dsi_mode; |
616 | struct omap_dss_dsi_videomode_timings dsi_vm_timings; | 627 | struct omap_dss_dsi_videomode_timings dsi_vm_timings; |
@@ -672,8 +683,6 @@ struct omap_dss_driver { | |||
672 | 683 | ||
673 | int (*enable)(struct omap_dss_device *display); | 684 | int (*enable)(struct omap_dss_device *display); |
674 | void (*disable)(struct omap_dss_device *display); | 685 | void (*disable)(struct omap_dss_device *display); |
675 | int (*suspend)(struct omap_dss_device *display); | ||
676 | int (*resume)(struct omap_dss_device *display); | ||
677 | int (*run_test)(struct omap_dss_device *display, int test); | 686 | int (*run_test)(struct omap_dss_device *display, int test); |
678 | 687 | ||
679 | int (*update)(struct omap_dss_device *dssdev, | 688 | int (*update)(struct omap_dss_device *dssdev, |
@@ -731,6 +740,8 @@ struct omap_dss_driver { | |||
731 | 740 | ||
732 | }; | 741 | }; |
733 | 742 | ||
743 | enum omapdss_version omapdss_get_version(void); | ||
744 | |||
734 | int omap_dss_register_driver(struct omap_dss_driver *); | 745 | int omap_dss_register_driver(struct omap_dss_driver *); |
735 | void omap_dss_unregister_driver(struct omap_dss_driver *); | 746 | void omap_dss_unregister_driver(struct omap_dss_driver *); |
736 | 747 | ||
@@ -740,10 +751,19 @@ void omap_dss_put_device(struct omap_dss_device *dssdev); | |||
740 | struct omap_dss_device *omap_dss_get_next_device(struct omap_dss_device *from); | 751 | struct omap_dss_device *omap_dss_get_next_device(struct omap_dss_device *from); |
741 | struct omap_dss_device *omap_dss_find_device(void *data, | 752 | struct omap_dss_device *omap_dss_find_device(void *data, |
742 | int (*match)(struct omap_dss_device *dssdev, void *data)); | 753 | int (*match)(struct omap_dss_device *dssdev, void *data)); |
754 | const char *omapdss_get_default_display_name(void); | ||
743 | 755 | ||
744 | int omap_dss_start_device(struct omap_dss_device *dssdev); | 756 | int omap_dss_start_device(struct omap_dss_device *dssdev); |
745 | void omap_dss_stop_device(struct omap_dss_device *dssdev); | 757 | void omap_dss_stop_device(struct omap_dss_device *dssdev); |
746 | 758 | ||
759 | int dss_feat_get_num_mgrs(void); | ||
760 | int dss_feat_get_num_ovls(void); | ||
761 | enum omap_display_type dss_feat_get_supported_displays(enum omap_channel channel); | ||
762 | enum omap_dss_output_id dss_feat_get_supported_outputs(enum omap_channel channel); | ||
763 | enum omap_color_mode dss_feat_get_supported_color_modes(enum omap_plane plane); | ||
764 | |||
765 | |||
766 | |||
747 | int omap_dss_get_num_overlay_managers(void); | 767 | int omap_dss_get_num_overlay_managers(void); |
748 | struct omap_overlay_manager *omap_dss_get_overlay_manager(int num); | 768 | struct omap_overlay_manager *omap_dss_get_overlay_manager(int num); |
749 | 769 | ||
@@ -765,9 +785,43 @@ typedef void (*omap_dispc_isr_t) (void *arg, u32 mask); | |||
765 | int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask); | 785 | int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask); |
766 | int omap_dispc_unregister_isr(omap_dispc_isr_t isr, void *arg, u32 mask); | 786 | int omap_dispc_unregister_isr(omap_dispc_isr_t isr, void *arg, u32 mask); |
767 | 787 | ||
768 | int omap_dispc_wait_for_irq_timeout(u32 irqmask, unsigned long timeout); | 788 | u32 dispc_read_irqstatus(void); |
769 | int omap_dispc_wait_for_irq_interruptible_timeout(u32 irqmask, | 789 | void dispc_clear_irqstatus(u32 mask); |
770 | unsigned long timeout); | 790 | u32 dispc_read_irqenable(void); |
791 | void dispc_write_irqenable(u32 mask); | ||
792 | |||
793 | int dispc_request_irq(irq_handler_t handler, void *dev_id); | ||
794 | void dispc_free_irq(void *dev_id); | ||
795 | |||
796 | int dispc_runtime_get(void); | ||
797 | void dispc_runtime_put(void); | ||
798 | |||
799 | void dispc_mgr_enable(enum omap_channel channel, bool enable); | ||
800 | bool dispc_mgr_is_enabled(enum omap_channel channel); | ||
801 | u32 dispc_mgr_get_vsync_irq(enum omap_channel channel); | ||
802 | u32 dispc_mgr_get_framedone_irq(enum omap_channel channel); | ||
803 | u32 dispc_mgr_get_sync_lost_irq(enum omap_channel channel); | ||
804 | bool dispc_mgr_go_busy(enum omap_channel channel); | ||
805 | void dispc_mgr_go(enum omap_channel channel); | ||
806 | void dispc_mgr_set_lcd_config(enum omap_channel channel, | ||
807 | const struct dss_lcd_mgr_config *config); | ||
808 | void dispc_mgr_set_timings(enum omap_channel channel, | ||
809 | const struct omap_video_timings *timings); | ||
810 | void dispc_mgr_setup(enum omap_channel channel, | ||
811 | const struct omap_overlay_manager_info *info); | ||
812 | |||
813 | int dispc_ovl_check(enum omap_plane plane, enum omap_channel channel, | ||
814 | const struct omap_overlay_info *oi, | ||
815 | const struct omap_video_timings *timings, | ||
816 | int *x_predecim, int *y_predecim); | ||
817 | |||
818 | int dispc_ovl_enable(enum omap_plane plane, bool enable); | ||
819 | bool dispc_ovl_enabled(enum omap_plane plane); | ||
820 | void dispc_ovl_set_channel_out(enum omap_plane plane, | ||
821 | enum omap_channel channel); | ||
822 | int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi, | ||
823 | bool replication, const struct omap_video_timings *mgr_timings, | ||
824 | bool mem_to_mem); | ||
771 | 825 | ||
772 | #define to_dss_driver(x) container_of((x), struct omap_dss_driver, driver) | 826 | #define to_dss_driver(x) container_of((x), struct omap_dss_driver, driver) |
773 | #define to_dss_device(x) container_of((x), struct omap_dss_device, dev) | 827 | #define to_dss_device(x) container_of((x), struct omap_dss_device, dev) |
@@ -826,4 +880,35 @@ void omapdss_rfbi_set_data_lines(struct omap_dss_device *dssdev, | |||
826 | void omapdss_rfbi_set_interface_timings(struct omap_dss_device *dssdev, | 880 | void omapdss_rfbi_set_interface_timings(struct omap_dss_device *dssdev, |
827 | struct rfbi_timings *timings); | 881 | struct rfbi_timings *timings); |
828 | 882 | ||
883 | int omapdss_compat_init(void); | ||
884 | void omapdss_compat_uninit(void); | ||
885 | |||
886 | struct dss_mgr_ops { | ||
887 | void (*start_update)(struct omap_overlay_manager *mgr); | ||
888 | int (*enable)(struct omap_overlay_manager *mgr); | ||
889 | void (*disable)(struct omap_overlay_manager *mgr); | ||
890 | void (*set_timings)(struct omap_overlay_manager *mgr, | ||
891 | const struct omap_video_timings *timings); | ||
892 | void (*set_lcd_config)(struct omap_overlay_manager *mgr, | ||
893 | const struct dss_lcd_mgr_config *config); | ||
894 | int (*register_framedone_handler)(struct omap_overlay_manager *mgr, | ||
895 | void (*handler)(void *), void *data); | ||
896 | void (*unregister_framedone_handler)(struct omap_overlay_manager *mgr, | ||
897 | void (*handler)(void *), void *data); | ||
898 | }; | ||
899 | |||
900 | int dss_install_mgr_ops(const struct dss_mgr_ops *mgr_ops); | ||
901 | void dss_uninstall_mgr_ops(void); | ||
902 | |||
903 | void dss_mgr_set_timings(struct omap_overlay_manager *mgr, | ||
904 | const struct omap_video_timings *timings); | ||
905 | void dss_mgr_set_lcd_config(struct omap_overlay_manager *mgr, | ||
906 | const struct dss_lcd_mgr_config *config); | ||
907 | int dss_mgr_enable(struct omap_overlay_manager *mgr); | ||
908 | void dss_mgr_disable(struct omap_overlay_manager *mgr); | ||
909 | void dss_mgr_start_update(struct omap_overlay_manager *mgr); | ||
910 | int dss_mgr_register_framedone_handler(struct omap_overlay_manager *mgr, | ||
911 | void (*handler)(void *), void *data); | ||
912 | void dss_mgr_unregister_framedone_handler(struct omap_overlay_manager *mgr, | ||
913 | void (*handler)(void *), void *data); | ||
829 | #endif | 914 | #endif |
diff --git a/include/video/omapvrfb.h b/include/video/omapvrfb.h new file mode 100644 index 000000000000..bb0bd89f8bc6 --- /dev/null +++ b/include/video/omapvrfb.h | |||
@@ -0,0 +1,68 @@ | |||
1 | /* | ||
2 | * VRFB Rotation Engine | ||
3 | * | ||
4 | * Copyright (C) 2009 Nokia Corporation | ||
5 | * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, but | ||
12 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | * General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef __OMAP_VRFB_H__ | ||
22 | #define __OMAP_VRFB_H__ | ||
23 | |||
24 | #define OMAP_VRFB_LINE_LEN 2048 | ||
25 | |||
26 | struct vrfb { | ||
27 | u8 context; | ||
28 | void __iomem *vaddr[4]; | ||
29 | unsigned long paddr[4]; | ||
30 | u16 xres; | ||
31 | u16 yres; | ||
32 | u16 xoffset; | ||
33 | u16 yoffset; | ||
34 | u8 bytespp; | ||
35 | bool yuv_mode; | ||
36 | }; | ||
37 | |||
38 | #ifdef CONFIG_OMAP2_VRFB | ||
39 | extern bool omap_vrfb_supported(void); | ||
40 | extern int omap_vrfb_request_ctx(struct vrfb *vrfb); | ||
41 | extern void omap_vrfb_release_ctx(struct vrfb *vrfb); | ||
42 | extern void omap_vrfb_adjust_size(u16 *width, u16 *height, | ||
43 | u8 bytespp); | ||
44 | extern u32 omap_vrfb_min_phys_size(u16 width, u16 height, u8 bytespp); | ||
45 | extern u16 omap_vrfb_max_height(u32 phys_size, u16 width, u8 bytespp); | ||
46 | extern void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr, | ||
47 | u16 width, u16 height, | ||
48 | unsigned bytespp, bool yuv_mode); | ||
49 | extern int omap_vrfb_map_angle(struct vrfb *vrfb, u16 height, u8 rot); | ||
50 | extern void omap_vrfb_restore_context(void); | ||
51 | |||
52 | #else | ||
53 | static inline bool omap_vrfb_supported(void) { return false; } | ||
54 | static inline int omap_vrfb_request_ctx(struct vrfb *vrfb) { return 0; } | ||
55 | static inline void omap_vrfb_release_ctx(struct vrfb *vrfb) {} | ||
56 | static inline void omap_vrfb_adjust_size(u16 *width, u16 *height, | ||
57 | u8 bytespp) {} | ||
58 | static inline u32 omap_vrfb_min_phys_size(u16 width, u16 height, u8 bytespp) | ||
59 | { return 0; } | ||
60 | static inline u16 omap_vrfb_max_height(u32 phys_size, u16 width, u8 bytespp) | ||
61 | { return 0; } | ||
62 | static inline void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr, | ||
63 | u16 width, u16 height, unsigned bytespp, bool yuv_mode) {} | ||
64 | static inline int omap_vrfb_map_angle(struct vrfb *vrfb, u16 height, u8 rot) | ||
65 | { return 0; } | ||
66 | static inline void omap_vrfb_restore_context(void) {} | ||
67 | #endif | ||
68 | #endif /* __VRFB_H */ | ||