diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2018-04-20 13:42:51 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-05-04 09:54:47 -0400 |
commit | 771f7be87ff921e9a3d744febd606af39a150e14 (patch) | |
tree | be48aa4309f493b92289512300009ec2aa2bfd69 /include/video | |
parent | a31d19f88932d92ac8674e21409c08ca82607920 (diff) |
media: omapfb: omapfb_dss.h: add stubs to build with COMPILE_TEST && DRM_OMAP
Add stubs for omapfb_dss.h, in the case it is included by
some driver when CONFIG_FB_OMAP2 is not defined, with can
happen on ARM when DRM_OMAP is not 'n'.
That allows building such driver(s) with COMPILE_TEST.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'include/video')
-rw-r--r-- | include/video/omapfb_dss.h | 54 |
1 files changed, 52 insertions, 2 deletions
diff --git a/include/video/omapfb_dss.h b/include/video/omapfb_dss.h index 1d38901d599d..e9775144ff3b 100644 --- a/include/video/omapfb_dss.h +++ b/include/video/omapfb_dss.h | |||
@@ -774,6 +774,12 @@ struct omap_dss_driver { | |||
774 | const struct hdmi_avi_infoframe *avi); | 774 | const struct hdmi_avi_infoframe *avi); |
775 | }; | 775 | }; |
776 | 776 | ||
777 | #define for_each_dss_dev(d) while ((d = omap_dss_get_next_device(d)) != NULL) | ||
778 | |||
779 | typedef void (*omap_dispc_isr_t) (void *arg, u32 mask); | ||
780 | |||
781 | #ifdef CONFIG_FB_OMAP2 | ||
782 | |||
777 | enum omapdss_version omapdss_get_version(void); | 783 | enum omapdss_version omapdss_get_version(void); |
778 | bool omapdss_is_initialized(void); | 784 | bool omapdss_is_initialized(void); |
779 | 785 | ||
@@ -785,7 +791,6 @@ void omapdss_unregister_display(struct omap_dss_device *dssdev); | |||
785 | 791 | ||
786 | struct omap_dss_device *omap_dss_get_device(struct omap_dss_device *dssdev); | 792 | struct omap_dss_device *omap_dss_get_device(struct omap_dss_device *dssdev); |
787 | void omap_dss_put_device(struct omap_dss_device *dssdev); | 793 | void omap_dss_put_device(struct omap_dss_device *dssdev); |
788 | #define for_each_dss_dev(d) while ((d = omap_dss_get_next_device(d)) != NULL) | ||
789 | struct omap_dss_device *omap_dss_get_next_device(struct omap_dss_device *from); | 794 | struct omap_dss_device *omap_dss_get_next_device(struct omap_dss_device *from); |
790 | struct omap_dss_device *omap_dss_find_device(void *data, | 795 | struct omap_dss_device *omap_dss_find_device(void *data, |
791 | int (*match)(struct omap_dss_device *dssdev, void *data)); | 796 | int (*match)(struct omap_dss_device *dssdev, void *data)); |
@@ -826,7 +831,6 @@ int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev); | |||
826 | void omapdss_default_get_timings(struct omap_dss_device *dssdev, | 831 | void omapdss_default_get_timings(struct omap_dss_device *dssdev, |
827 | struct omap_video_timings *timings); | 832 | struct omap_video_timings *timings); |
828 | 833 | ||
829 | typedef void (*omap_dispc_isr_t) (void *arg, u32 mask); | ||
830 | int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask); | 834 | int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask); |
831 | int omap_dispc_unregister_isr(omap_dispc_isr_t isr, void *arg, u32 mask); | 835 | int omap_dispc_unregister_isr(omap_dispc_isr_t isr, void *arg, u32 mask); |
832 | 836 | ||
@@ -856,5 +860,51 @@ omapdss_of_get_first_endpoint(const struct device_node *parent); | |||
856 | 860 | ||
857 | struct omap_dss_device * | 861 | struct omap_dss_device * |
858 | omapdss_of_find_source_for_first_ep(struct device_node *node); | 862 | omapdss_of_find_source_for_first_ep(struct device_node *node); |
863 | #else | ||
864 | |||
865 | static inline enum omapdss_version omapdss_get_version(void) | ||
866 | { return OMAPDSS_VER_UNKNOWN; }; | ||
867 | |||
868 | static inline bool omapdss_is_initialized(void) | ||
869 | { return false; }; | ||
870 | |||
871 | static inline int omap_dispc_register_isr(omap_dispc_isr_t isr, | ||
872 | void *arg, u32 mask) | ||
873 | { return 0; }; | ||
874 | |||
875 | static inline int omap_dispc_unregister_isr(omap_dispc_isr_t isr, | ||
876 | void *arg, u32 mask) | ||
877 | { return 0; }; | ||
878 | |||
879 | static inline struct omap_dss_device | ||
880 | *omap_dss_get_device(struct omap_dss_device *dssdev) | ||
881 | { return NULL; }; | ||
882 | |||
883 | static inline struct omap_dss_device | ||
884 | *omap_dss_get_next_device(struct omap_dss_device *from) | ||
885 | {return NULL; }; | ||
886 | |||
887 | static inline void omap_dss_put_device(struct omap_dss_device *dssdev) {}; | ||
888 | |||
889 | static inline int omapdss_compat_init(void) | ||
890 | { return 0; }; | ||
891 | |||
892 | static inline void omapdss_compat_uninit(void) {}; | ||
893 | |||
894 | static inline int omap_dss_get_num_overlay_managers(void) | ||
895 | { return 0; }; | ||
896 | |||
897 | static inline struct omap_overlay_manager *omap_dss_get_overlay_manager(int num) | ||
898 | { return NULL; }; | ||
899 | |||
900 | static inline int omap_dss_get_num_overlays(void) | ||
901 | { return 0; }; | ||
902 | |||
903 | static inline struct omap_overlay *omap_dss_get_overlay(int num) | ||
904 | { return NULL; }; | ||
905 | |||
906 | |||
907 | #endif /* FB_OMAP2 */ | ||
908 | |||
859 | 909 | ||
860 | #endif /* __OMAPFB_DSS_H */ | 910 | #endif /* __OMAPFB_DSS_H */ |