aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunita Nadampalli2016-05-04 12:00:58 -0500
committerSunita Nadampalli2016-05-04 12:00:58 -0500
commitb6047fed2c9ea9eb116e6290ba18b41127fa3bdd (patch)
tree7bee61e478645809f3e53326146078966f7aa823
parent3afdd94ad010779d0de123278b07508c679683c3 (diff)
downloadkernel-video-b6047fed2c9ea9eb116e6290ba18b41127fa3bdd.tar.gz
kernel-video-b6047fed2c9ea9eb116e6290ba18b41127fa3bdd.tar.xz
kernel-video-b6047fed2c9ea9eb116e6290ba18b41127fa3bdd.zip
DSS: Changes to share Display subsystem with remotecores on DRA7
1. Added DT property parsing and populating the subsystem share property 2. Defined A15 Interrupt masking to not to conflict with DSS interrupts dedicated to remotecore 3. DRM irq handler changes to handle only interrupts assigned to A15 and ignore other interrupts assigned to remotecore. Note: The scenario considered here is: 1. Primary LCD is the display used 2. Both A15 and remotecore (eg.IPU) are using the same Display 3. VID2 and VID3 DSS pipes are used from the remotecore and enables EOW interrupt 4. GFX and VID1 pipes are used on A15 and enables LCD VSYNC interrupt Change-Id: I0dfeeaeb11c5893982efb55d49bb9a4176dfb8b7 Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
-rw-r--r--drivers/gpu/drm/omapdrm/omap_irq.c18
-rw-r--r--drivers/video/fbdev/omap2/dss/core.c19
-rw-r--r--drivers/video/fbdev/omap2/dss/dispc.c14
-rw-r--r--drivers/video/fbdev/omap2/dss/dss.c16
-rw-r--r--ti_config_fragments/audio_display.cfg2
5 files changed, 56 insertions, 13 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_irq.c b/drivers/gpu/drm/omapdrm/omap_irq.c
index 86d88bbc0f0..5cbde7ff96a 100644
--- a/drivers/gpu/drm/omapdrm/omap_irq.c
+++ b/drivers/gpu/drm/omapdrm/omap_irq.c
@@ -212,6 +212,13 @@ irqreturn_t omap_hdmi_hpd_irq_handler(int irq, void *arg)
212 return IRQ_HANDLED; 212 return IRQ_HANDLED;
213} 213}
214 214
215#define A15_DSS_IRQ_MASK (DISPC_IRQ_VSYNC | DISPC_IRQ_FRAMEDONE | DISPC_IRQ_SYNC_LOST | \
216 DISPC_IRQ_EVSYNC_ODD | DISPC_IRQ_EVSYNC_EVEN | DISPC_IRQ_FRAMEDONETV | \
217 DISPC_IRQ_SYNC_LOST_DIGIT | DISPC_IRQ_VSYNC2 | DISPC_IRQ_FRAMEDONE2 | \
218 DISPC_IRQ_VSYNC3 | DISPC_IRQ_FRAMEDONE3 | DISPC_IRQ_SYNC_LOST3 | \
219 DISPC_IRQ_GFX_FIFO_UNDERFLOW | DISPC_IRQ_VID1_FIFO_UNDERFLOW)
220
221
215irqreturn_t omap_irq_handler(int irq, void *arg) 222irqreturn_t omap_irq_handler(int irq, void *arg)
216{ 223{
217 struct drm_device *dev = (struct drm_device *) arg; 224 struct drm_device *dev = (struct drm_device *) arg;
@@ -220,8 +227,19 @@ irqreturn_t omap_irq_handler(int irq, void *arg)
220 unsigned long flags; 227 unsigned long flags;
221 unsigned int id; 228 unsigned int id;
222 u32 irqstatus; 229 u32 irqstatus;
230 u32 irqenable;
223 231
224 irqstatus = dispc_read_irqstatus(); 232 irqstatus = dispc_read_irqstatus();
233 irqenable = dispc_read_irqenable();
234 irqstatus &= irqenable;
235
236 if (omapdss_display_share()) {
237 if ((irqstatus & A15_DSS_IRQ_MASK) == 0x0000) {
238 udelay(1000);
239 return IRQ_HANDLED;
240 }
241 }
242
225 dispc_clear_irqstatus(irqstatus); 243 dispc_clear_irqstatus(irqstatus);
226 dispc_read_irqstatus(); /* flush posted write */ 244 dispc_read_irqstatus(); /* flush posted write */
227 245
diff --git a/drivers/video/fbdev/omap2/dss/core.c b/drivers/video/fbdev/omap2/dss/core.c
index 9fd540257ca..8a59bb407fd 100644
--- a/drivers/video/fbdev/omap2/dss/core.c
+++ b/drivers/video/fbdev/omap2/dss/core.c
@@ -214,18 +214,23 @@ static struct notifier_block omap_dss_pm_notif_block = {
214static int __init omap_dss_probe(struct platform_device *pdev) 214static int __init omap_dss_probe(struct platform_device *pdev)
215{ 215{
216 struct omap_dss_board_info *pdata = pdev->dev.platform_data; 216 struct omap_dss_board_info *pdata = pdev->dev.platform_data;
217 struct device_node *node = pdev->dev.of_node; 217 struct device_node *node;
218 int r; 218 int r;
219
220 core.pdev = pdev; 219 core.pdev = pdev;
221 220
222 of_property_read_u32(node, "skip_init", 221 node = of_find_compatible_node(NULL, NULL, "ti,dra7-dss");
223 &g_display_skip_init); 222 if (node) {
224 if (g_display_skip_init) 223 r = of_property_read_u32(node, "is_shared",
225 g_display_share = 1; 224 &g_display_skip_init);
226 225
227 dss_features_init(omapdss_get_version()); 226 if (r)
227 g_display_skip_init = 0;
228 228
229 if (g_display_skip_init)
230 g_display_share = 1;
231 }
232
233 dss_features_init(omapdss_get_version());
229 r = dss_initialize_debugfs(); 234 r = dss_initialize_debugfs();
230 if (r) 235 if (r)
231 goto err_debugfs; 236 goto err_debugfs;
diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c
index 532aaf120de..b499300db49 100644
--- a/drivers/video/fbdev/omap2/dss/dispc.c
+++ b/drivers/video/fbdev/omap2/dss/dispc.c
@@ -578,12 +578,13 @@ void dispc_mgr_go(enum omap_channel channel)
578{ 578{
579 WARN_ON(dispc_mgr_is_enabled(channel) == false); 579 WARN_ON(dispc_mgr_is_enabled(channel) == false);
580 580
581 if (omapdss_display_share()) 581 if (omapdss_display_share()) {
582 /* In case of display share use case, the remote core 582 /* In case of display share use case, the remote core
583 * will be setting GO bit independently. Hence we might see the 583 * will be setting GO bit independently. Hence we might see the
584 * channel as busy on kernel side. Ignore this and proceed 584 * channel as busy on kernel side. Ignore this and proceed
585 * further */ 585 * further */
586 WARN_ON(dispc_mgr_go_busy(channel)); 586 //WARN_ON(dispc_mgr_go_busy(channel));
587 }
587 588
588 DSSDBG("GO %s\n", mgr_desc[channel].name); 589 DSSDBG("GO %s\n", mgr_desc[channel].name);
589 590
@@ -3723,8 +3724,17 @@ u32 dispc_read_irqstatus(void)
3723} 3724}
3724EXPORT_SYMBOL(dispc_read_irqstatus); 3725EXPORT_SYMBOL(dispc_read_irqstatus);
3725 3726
3727#define A15_DSS_IRQ_MASK (DISPC_IRQ_VSYNC | DISPC_IRQ_FRAMEDONE | DISPC_IRQ_SYNC_LOST | \
3728 DISPC_IRQ_EVSYNC_ODD | DISPC_IRQ_EVSYNC_EVEN | DISPC_IRQ_FRAMEDONETV | \
3729 DISPC_IRQ_SYNC_LOST_DIGIT | DISPC_IRQ_VSYNC2 | DISPC_IRQ_FRAMEDONE2 | \
3730 DISPC_IRQ_VSYNC3 | DISPC_IRQ_FRAMEDONE3 | DISPC_IRQ_SYNC_LOST3 | \
3731 DISPC_IRQ_GFX_FIFO_UNDERFLOW | DISPC_IRQ_VID1_FIFO_UNDERFLOW)
3732
3726void dispc_clear_irqstatus(u32 mask) 3733void dispc_clear_irqstatus(u32 mask)
3727{ 3734{
3735 if (omapdss_display_share())
3736 mask &= A15_DSS_IRQ_MASK;
3737
3728 dispc_write_reg(DISPC_IRQSTATUS, mask); 3738 dispc_write_reg(DISPC_IRQSTATUS, mask);
3729} 3739}
3730EXPORT_SYMBOL(dispc_clear_irqstatus); 3740EXPORT_SYMBOL(dispc_clear_irqstatus);
diff --git a/drivers/video/fbdev/omap2/dss/dss.c b/drivers/video/fbdev/omap2/dss/dss.c
index 46e852839f4..87e02190538 100644
--- a/drivers/video/fbdev/omap2/dss/dss.c
+++ b/drivers/video/fbdev/omap2/dss/dss.c
@@ -752,6 +752,9 @@ int dss_runtime_get(void)
752{ 752{
753 int r; 753 int r;
754 754
755 if (omapdss_skipinit())
756 return 0;
757
755 DSSDBG("dss_runtime_get\n"); 758 DSSDBG("dss_runtime_get\n");
756 759
757 r = pm_runtime_get_sync(&dss.pdev->dev); 760 r = pm_runtime_get_sync(&dss.pdev->dev);
@@ -763,6 +766,9 @@ void dss_runtime_put(void)
763{ 766{
764 int r; 767 int r;
765 768
769 if (omapdss_skipinit())
770 return;
771
766 DSSDBG("dss_runtime_put\n"); 772 DSSDBG("dss_runtime_put\n");
767 773
768 r = pm_runtime_put_sync(&dss.pdev->dev); 774 r = pm_runtime_put_sync(&dss.pdev->dev);
@@ -1082,7 +1088,8 @@ static int __init omap_dsshw_probe(struct platform_device *pdev)
1082 r = dss_runtime_get(); 1088 r = dss_runtime_get();
1083 if (r) 1089 if (r)
1084 goto err_runtime_get; 1090 goto err_runtime_get;
1085 } 1091 }
1092
1086 1093
1087 dss.dss_clk_rate = clk_get_rate(dss.dss_clk); 1094 dss.dss_clk_rate = clk_get_rate(dss.dss_clk);
1088 1095
@@ -1135,7 +1142,9 @@ static int __init omap_dsshw_probe(struct platform_device *pdev)
1135 return 0; 1142 return 0;
1136 1143
1137err_runtime_get: 1144err_runtime_get:
1138 pm_runtime_disable(&pdev->dev); 1145 if (!omapdss_skipinit())
1146 pm_runtime_disable(&pdev->dev);
1147
1139err_setup_clocks: 1148err_setup_clocks:
1140 dss_put_clocks(); 1149 dss_put_clocks();
1141 return r; 1150 return r;
@@ -1145,7 +1154,8 @@ static int __exit omap_dsshw_remove(struct platform_device *pdev)
1145{ 1154{
1146 dss_uninit_ports(pdev); 1155 dss_uninit_ports(pdev);
1147 1156
1148 pm_runtime_disable(&pdev->dev); 1157 if (!omapdss_skipinit())
1158 pm_runtime_disable(&pdev->dev);
1149 1159
1150 dss_put_clocks(); 1160 dss_put_clocks();
1151 1161
diff --git a/ti_config_fragments/audio_display.cfg b/ti_config_fragments/audio_display.cfg
index a7ca202b0dd..ce6864387a5 100644
--- a/ti_config_fragments/audio_display.cfg
+++ b/ti_config_fragments/audio_display.cfg
@@ -13,7 +13,7 @@ CONFIG_DRM_OMAP=y
13CONFIG_DRM_OMAP_NUM_CRTCS=2 13CONFIG_DRM_OMAP_NUM_CRTCS=2
14 14
15CONFIG_OMAP2_DSS=y 15CONFIG_OMAP2_DSS=y
16CONFIG_OMAP2_DSS_NUM_OVLS=4 16CONFIG_OMAP2_DSS_NUM_OVLS=2
17CONFIG_OMAP5_DSS_HDMI=y 17CONFIG_OMAP5_DSS_HDMI=y
18 18
19CONFIG_DISPLAY_PANEL_DPI=y 19CONFIG_DISPLAY_PANEL_DPI=y