aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2013-04-24 06:32:51 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-06-17 07:00:57 -0400
commit5d47dbc85228de3ce82dea11af3c169e66cbf520 (patch)
tree8cbfd00544f0d8e1be37f69bb1ccdef0252d3007
parent595470a7853848cb971d5ee3fed443b1e3aa0d1b (diff)
OMAPDSS: public omapdss_register_output()
In order to allow multiple display block in a video pipeline, we need to give the drivers way to register themselves. For now we have the omapdss_register_display() which is used to register panels, and dss_register_output() which is used to register DSS encoders. This patch makes dss_register_output() public (with the name of omapdss_register_output), which can be used to register also external encoders. The distinction between register_output and register_display is that a "display" is an entity at the end of the videopipeline, and "output" is something inside the pipeline. The registration and naming will be made saner in the future, but the current names and functions are kept to minimize changes during the dss device model transition. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--drivers/video/omap2/dss/dpi.c4
-rw-r--r--drivers/video/omap2/dss/dsi.c4
-rw-r--r--drivers/video/omap2/dss/dss.h4
-rw-r--r--drivers/video/omap2/dss/hdmi.c4
-rw-r--r--drivers/video/omap2/dss/output.c7
-rw-r--r--drivers/video/omap2/dss/rfbi.c4
-rw-r--r--drivers/video/omap2/dss/sdi.c4
-rw-r--r--drivers/video/omap2/dss/venc.c4
-rw-r--r--include/video/omapdss.h2
9 files changed, 19 insertions, 18 deletions
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c
index 892a2b207ee4..5351d02e3064 100644
--- a/drivers/video/omap2/dss/dpi.c
+++ b/drivers/video/omap2/dss/dpi.c
@@ -689,14 +689,14 @@ static void dpi_init_output(struct platform_device *pdev)
689 out->dispc_channel = dpi_get_channel(); 689 out->dispc_channel = dpi_get_channel();
690 out->owner = THIS_MODULE; 690 out->owner = THIS_MODULE;
691 691
692 dss_register_output(out); 692 omapdss_register_output(out);
693} 693}
694 694
695static void __exit dpi_uninit_output(struct platform_device *pdev) 695static void __exit dpi_uninit_output(struct platform_device *pdev)
696{ 696{
697 struct omap_dss_device *out = &dpi.output; 697 struct omap_dss_device *out = &dpi.output;
698 698
699 dss_unregister_output(out); 699 omapdss_unregister_output(out);
700} 700}
701 701
702static int omap_dpi_probe(struct platform_device *pdev) 702static int omap_dpi_probe(struct platform_device *pdev)
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index d6b019faed23..58fbff94e018 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -5426,7 +5426,7 @@ static void dsi_init_output(struct platform_device *dsidev)
5426 out->dispc_channel = dsi_get_channel(dsi->module_id); 5426 out->dispc_channel = dsi_get_channel(dsi->module_id);
5427 out->owner = THIS_MODULE; 5427 out->owner = THIS_MODULE;
5428 5428
5429 dss_register_output(out); 5429 omapdss_register_output(out);
5430} 5430}
5431 5431
5432static void dsi_uninit_output(struct platform_device *dsidev) 5432static void dsi_uninit_output(struct platform_device *dsidev)
@@ -5434,7 +5434,7 @@ static void dsi_uninit_output(struct platform_device *dsidev)
5434 struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); 5434 struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
5435 struct omap_dss_device *out = &dsi->output; 5435 struct omap_dss_device *out = &dsi->output;
5436 5436
5437 dss_unregister_output(out); 5437 omapdss_unregister_output(out);
5438} 5438}
5439 5439
5440/* DSI1 HW IP initialisation */ 5440/* DSI1 HW IP initialisation */
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
index ed70fa01d192..50a2362ef8f8 100644
--- a/drivers/video/omap2/dss/dss.h
+++ b/drivers/video/omap2/dss/dss.h
@@ -179,10 +179,6 @@ void dss_put_device(struct omap_dss_device *dssdev);
179void dss_copy_device_pdata(struct omap_dss_device *dst, 179void dss_copy_device_pdata(struct omap_dss_device *dst,
180 const struct omap_dss_device *src); 180 const struct omap_dss_device *src);
181 181
182/* output */
183void dss_register_output(struct omap_dss_device *out);
184void dss_unregister_output(struct omap_dss_device *out);
185
186/* display */ 182/* display */
187int dss_suspend_all_devices(void); 183int dss_suspend_all_devices(void);
188int dss_resume_all_devices(void); 184int dss_resume_all_devices(void);
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index e1c0992b522b..2b0a2aac8aed 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -1036,14 +1036,14 @@ static void hdmi_init_output(struct platform_device *pdev)
1036 out->dispc_channel = OMAP_DSS_CHANNEL_DIGIT; 1036 out->dispc_channel = OMAP_DSS_CHANNEL_DIGIT;
1037 out->owner = THIS_MODULE; 1037 out->owner = THIS_MODULE;
1038 1038
1039 dss_register_output(out); 1039 omapdss_register_output(out);
1040} 1040}
1041 1041
1042static void __exit hdmi_uninit_output(struct platform_device *pdev) 1042static void __exit hdmi_uninit_output(struct platform_device *pdev)
1043{ 1043{
1044 struct omap_dss_device *out = &hdmi.output; 1044 struct omap_dss_device *out = &hdmi.output;
1045 1045
1046 dss_unregister_output(out); 1046 omapdss_unregister_output(out);
1047} 1047}
1048 1048
1049/* HDMI HW IP initialisation */ 1049/* HDMI HW IP initialisation */
diff --git a/drivers/video/omap2/dss/output.c b/drivers/video/omap2/dss/output.c
index 9ad7d2175a7b..0ba168e23907 100644
--- a/drivers/video/omap2/dss/output.c
+++ b/drivers/video/omap2/dss/output.c
@@ -92,15 +92,18 @@ err:
92} 92}
93EXPORT_SYMBOL(omapdss_output_unset_device); 93EXPORT_SYMBOL(omapdss_output_unset_device);
94 94
95void dss_register_output(struct omap_dss_device *out) 95int omapdss_register_output(struct omap_dss_device *out)
96{ 96{
97 list_add_tail(&out->list, &output_list); 97 list_add_tail(&out->list, &output_list);
98 return 0;
98} 99}
100EXPORT_SYMBOL(omapdss_register_output);
99 101
100void dss_unregister_output(struct omap_dss_device *out) 102void omapdss_unregister_output(struct omap_dss_device *out)
101{ 103{
102 list_del(&out->list); 104 list_del(&out->list);
103} 105}
106EXPORT_SYMBOL(omapdss_unregister_output);
104 107
105struct omap_dss_device *omap_dss_get_output(enum omap_dss_output_id id) 108struct omap_dss_device *omap_dss_get_output(enum omap_dss_output_id id)
106{ 109{
diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c
index f18c9466849b..fdfe6e6f25df 100644
--- a/drivers/video/omap2/dss/rfbi.c
+++ b/drivers/video/omap2/dss/rfbi.c
@@ -1022,14 +1022,14 @@ static void rfbi_init_output(struct platform_device *pdev)
1022 out->dispc_channel = OMAP_DSS_CHANNEL_LCD; 1022 out->dispc_channel = OMAP_DSS_CHANNEL_LCD;
1023 out->owner = THIS_MODULE; 1023 out->owner = THIS_MODULE;
1024 1024
1025 dss_register_output(out); 1025 omapdss_register_output(out);
1026} 1026}
1027 1027
1028static void __exit rfbi_uninit_output(struct platform_device *pdev) 1028static void __exit rfbi_uninit_output(struct platform_device *pdev)
1029{ 1029{
1030 struct omap_dss_device *out = &rfbi.output; 1030 struct omap_dss_device *out = &rfbi.output;
1031 1031
1032 dss_unregister_output(out); 1032 omapdss_unregister_output(out);
1033} 1033}
1034 1034
1035/* RFBI HW IP initialisation */ 1035/* RFBI HW IP initialisation */
diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c
index bcb75f5d5373..69d907f7df4a 100644
--- a/drivers/video/omap2/dss/sdi.c
+++ b/drivers/video/omap2/dss/sdi.c
@@ -344,14 +344,14 @@ static void sdi_init_output(struct platform_device *pdev)
344 out->dispc_channel = OMAP_DSS_CHANNEL_LCD; 344 out->dispc_channel = OMAP_DSS_CHANNEL_LCD;
345 out->owner = THIS_MODULE; 345 out->owner = THIS_MODULE;
346 346
347 dss_register_output(out); 347 omapdss_register_output(out);
348} 348}
349 349
350static void __exit sdi_uninit_output(struct platform_device *pdev) 350static void __exit sdi_uninit_output(struct platform_device *pdev)
351{ 351{
352 struct omap_dss_device *out = &sdi.output; 352 struct omap_dss_device *out = &sdi.output;
353 353
354 dss_unregister_output(out); 354 omapdss_unregister_output(out);
355} 355}
356 356
357static int omap_sdi_probe(struct platform_device *pdev) 357static int omap_sdi_probe(struct platform_device *pdev)
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
index 8720f137d4f8..e47b64eee62c 100644
--- a/drivers/video/omap2/dss/venc.c
+++ b/drivers/video/omap2/dss/venc.c
@@ -790,14 +790,14 @@ static void venc_init_output(struct platform_device *pdev)
790 out->dispc_channel = OMAP_DSS_CHANNEL_DIGIT; 790 out->dispc_channel = OMAP_DSS_CHANNEL_DIGIT;
791 out->owner = THIS_MODULE; 791 out->owner = THIS_MODULE;
792 792
793 dss_register_output(out); 793 omapdss_register_output(out);
794} 794}
795 795
796static void __exit venc_uninit_output(struct platform_device *pdev) 796static void __exit venc_uninit_output(struct platform_device *pdev)
797{ 797{
798 struct omap_dss_device *out = &venc.output; 798 struct omap_dss_device *out = &venc.output;
799 799
800 dss_unregister_output(out); 800 omapdss_unregister_output(out);
801} 801}
802 802
803/* VENC HW IP initialisation */ 803/* VENC HW IP initialisation */
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index ef9db241b4a1..cca912a5f32e 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -780,6 +780,8 @@ struct omap_overlay_manager *omap_dss_get_overlay_manager(int num);
780int omap_dss_get_num_overlays(void); 780int omap_dss_get_num_overlays(void);
781struct omap_overlay *omap_dss_get_overlay(int num); 781struct omap_overlay *omap_dss_get_overlay(int num);
782 782
783int omapdss_register_output(struct omap_dss_device *output);
784void omapdss_unregister_output(struct omap_dss_device *output);
783struct omap_dss_device *omap_dss_get_output(enum omap_dss_output_id id); 785struct omap_dss_device *omap_dss_get_output(enum omap_dss_output_id id);
784struct omap_dss_device *omap_dss_find_output(const char *name); 786struct omap_dss_device *omap_dss_find_output(const char *name);
785struct omap_dss_device *omap_dss_find_output_by_node(struct device_node *node); 787struct omap_dss_device *omap_dss_find_output_by_node(struct device_node *node);