[PATCH 4/5] OMAP: DSS2: Video3 pipeline IRQs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Sumit Semwal <sumit.semwal@xxxxxx>

Introduce Video3 pipeline IRQS for dumps and error handling

Signed-off-by: Sumit Semwal <sumit.semwal@xxxxxx>
Signed-off-by: Mukund Mittal <mmittal@xxxxxx>
Signed-off-by: Archit Taneja <archit@xxxxxx>
---
 arch/arm/plat-omap/include/plat/display.h |    2 ++
 drivers/video/omap2/dss/dispc.c           |   23 ++++++++++++++++++++++-
 2 files changed, 24 insertions(+), 1 deletions(-)
 
diff --git a/arch/arm/plat-omap/include/plat/display.h b/arch/arm/plat-omap/include/plat/display.h
index be83766..91796b6
--- a/arch/arm/plat-omap/include/plat/display.h
+++ b/arch/arm/plat-omap/include/plat/display.h
@@ -44,6 +44,8 @@
 #define DISPC_IRQ_WAKEUP		(1 << 16)
 #define DISPC_IRQ_SYNC_LOST_2  (1 << 17)
 #define DISPC_IRQ_VSYNC2               (1 << 18)
+#define DISPC_IRQ_VID3_END_WIN		(1 << 19)
+#define DISPC_IRQ_VID3_FIFO_UNDERFLOW	(1 << 20)
 #define DISPC_IRQ_ACBIAS_COUNT_STAT2   (1 << 21)
 #define DISPC_IRQ_FRAMEDONE2           (1 << 22)
 
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 00aad04..8345ed7
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -173,7 +173,8 @@ struct dispc_reg { u16 idx; };
 					 DISPC_IRQ_SYNC_LOST | \
 					 DISPC_IRQ_SYNC_LOST_DIGIT | \
 					 (cpu_is_omap44xx() ? \
-					 DISPC_IRQ_SYNC_LOST_2 : 0))
+					 (DISPC_IRQ_VID3_FIFO_UNDERFLOW | \
+					 DISPC_IRQ_SYNC_LOST_2) : 0))
 
 #define DISPC_MAX_NR_ISRS		8
 
@@ -2540,6 +2541,8 @@ void dispc_dump_irqs(struct seq_file *s)
 		PIS(VSYNC2);
 		PIS(ACBIAS_COUNT_STAT2);
 		PIS(SYNC_LOST_2);
+		PIS(VID3_FIFO_UNDERFLOW);
+		PIS(VID3_END_WIN);
 	}
 #undef PIS
 }
@@ -3151,6 +3154,24 @@ static void dispc_error_worker(struct work_struct *work)
 		}
 	}
 
+	if (errors & DISPC_IRQ_VID3_FIFO_UNDERFLOW) {
+		DSSERR("VID3_FIFO_UNDERFLOW, disabling VID2\n");
+		for (i = 0; i < omap_dss_get_num_overlays(); ++i) {
+			struct omap_overlay *ovl;
+			ovl = omap_dss_get_overlay(i);
+
+			if (!(ovl->caps & OMAP_DSS_OVL_CAP_DISPC))
+				continue;
+
+			if (ovl->id == 3) {
+				dispc_enable_plane(ovl->id, 0);
+				dispc_go(ovl->manager->id);
+				mdelay(50);
+				break;
+			}
+		}
+	}
+
 	if (errors & DISPC_IRQ_SYNC_LOST) {
 		struct omap_overlay_manager *manager = NULL;
 		bool enable = false;
-- 
1.5.4.7

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux