@@ -44,7 +44,8 @@
static irqreturn_t vsp1_irq_handler(int irq, void *data)
{
- u32 mask = VI6_WPF_IRQ_STA_DFE | VI6_WPF_IRQ_STA_FRE;
+ u32 mask = VI6_WPF_IRQ_STA_UND | VI6_WPF_IRQ_STA_DFE |
+ VI6_WPF_IRQ_STA_FRE;
struct vsp1_device *vsp1 = data;
irqreturn_t ret = IRQ_NONE;
unsigned int i;
@@ -63,6 +64,11 @@ static irqreturn_t vsp1_irq_handler(int irq, void *data)
vsp1_pipeline_frame_end(wpf->entity.pipe);
ret = IRQ_HANDLED;
}
+
+ if (status & VI6_WPF_IRQ_STA_UND) {
+ dev_err(vsp1->dev, "WPF[%d] Underflow error\n", i);
+ ret = IRQ_HANDLED;
+ }
}
return ret;
@@ -32,10 +32,12 @@
#define VI6_STATUS_SYS_ACT(n) BIT((n) + 8)
#define VI6_WPF_IRQ_ENB(n) (0x0048 + (n) * 12)
+#define VI6_WPF_IRQ_ENB_UNDE BIT(16)
#define VI6_WPF_IRQ_ENB_DFEE BIT(1)
#define VI6_WPF_IRQ_ENB_FREE BIT(0)
#define VI6_WPF_IRQ_STA(n) (0x004c + (n) * 12)
+#define VI6_WPF_IRQ_STA_UND BIT(16)
#define VI6_WPF_IRQ_STA_DFE BIT(1)
#define VI6_WPF_IRQ_STA_FRE BIT(0)
@@ -342,7 +342,7 @@ static void wpf_configure_stream(struct vsp1_entity *entity,
/* Enable interrupts. */
vsp1_dl_body_write(dlb, VI6_WPF_IRQ_STA(index), 0);
vsp1_dl_body_write(dlb, VI6_WPF_IRQ_ENB(index),
- VI6_WPF_IRQ_ENB_DFEE);
+ VI6_WPF_IRQ_ENB_DFEE | VI6_WPF_IRQ_ENB_UNDE);
/*
* Configure writeback for display pipelines (the wpf writeback flag is
In erroneous conditions, the WPF can assert an underrun interrupt. This usually represents a mis-configured pipeline, or bus priority issue. It is likely that in the event of this interrupt being asserted the hardware is no longer operational. A device error message at the least is useful in this scenario Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> --- drivers/media/platform/renesas/vsp1/vsp1_drv.c | 8 +++++++- drivers/media/platform/renesas/vsp1/vsp1_regs.h | 2 ++ drivers/media/platform/renesas/vsp1/vsp1_wpf.c | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-)