Commit 57efea87 authored by Stephan Gerhold's avatar Stephan Gerhold Committed by Linus Walleij

drm/mcde: dsi: Make video mode errors more verbose

Triggering an error conditions in DSI video mode only results in
a very generic "some video mode error status" error message
at the moment.

Make this more clear by adding separate error messages for each bit.
Signed-off-by: default avatarStephan Gerhold <stephan@gerhold.net>
Tested-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20191106165835.2863-4-stephan@gerhold.net
parent d920e8da
...@@ -124,7 +124,27 @@ bool mcde_dsi_irq(struct mipi_dsi_device *mdsi) ...@@ -124,7 +124,27 @@ bool mcde_dsi_irq(struct mipi_dsi_device *mdsi)
val = readl(d->regs + DSI_VID_MODE_STS_FLAG); val = readl(d->regs + DSI_VID_MODE_STS_FLAG);
if (val) if (val)
dev_err(d->dev, "some video mode error status\n"); dev_dbg(d->dev, "DSI_VID_MODE_STS_FLAG = %08x\n", val);
if (val & DSI_VID_MODE_STS_VSG_RUNNING)
dev_dbg(d->dev, "VID mode VSG running\n");
if (val & DSI_VID_MODE_STS_ERR_MISSING_DATA)
dev_err(d->dev, "VID mode missing data\n");
if (val & DSI_VID_MODE_STS_ERR_MISSING_HSYNC)
dev_err(d->dev, "VID mode missing HSYNC\n");
if (val & DSI_VID_MODE_STS_ERR_MISSING_VSYNC)
dev_err(d->dev, "VID mode missing VSYNC\n");
if (val & DSI_VID_MODE_STS_REG_ERR_SMALL_LENGTH)
dev_err(d->dev, "VID mode less bytes than expected between two HSYNC\n");
if (val & DSI_VID_MODE_STS_REG_ERR_SMALL_HEIGHT)
dev_err(d->dev, "VID mode less lines than expected between two VSYNC\n");
if (val & (DSI_VID_MODE_STS_ERR_BURSTWRITE |
DSI_VID_MODE_STS_ERR_LINEWRITE |
DSI_VID_MODE_STS_ERR_LONGREAD))
dev_err(d->dev, "VID mode read/write error\n");
if (val & DSI_VID_MODE_STS_ERR_VRS_WRONG_LENGTH)
dev_err(d->dev, "VID mode received packets differ from expected size\n");
if (val & DSI_VID_MODE_STS_VSG_RECOVERY)
dev_err(d->dev, "VID mode VSG in recovery mode\n");
writel(val, d->regs + DSI_VID_MODE_STS_CLR); writel(val, d->regs + DSI_VID_MODE_STS_CLR);
return te_received; return te_received;
......
...@@ -248,6 +248,16 @@ ...@@ -248,6 +248,16 @@
#define DSI_VID_MODE_STS 0x000000BC #define DSI_VID_MODE_STS 0x000000BC
#define DSI_VID_MODE_STS_VSG_RUNNING BIT(0) #define DSI_VID_MODE_STS_VSG_RUNNING BIT(0)
#define DSI_VID_MODE_STS_ERR_MISSING_DATA BIT(1)
#define DSI_VID_MODE_STS_ERR_MISSING_HSYNC BIT(2)
#define DSI_VID_MODE_STS_ERR_MISSING_VSYNC BIT(3)
#define DSI_VID_MODE_STS_REG_ERR_SMALL_LENGTH BIT(4)
#define DSI_VID_MODE_STS_REG_ERR_SMALL_HEIGHT BIT(5)
#define DSI_VID_MODE_STS_ERR_BURSTWRITE BIT(6)
#define DSI_VID_MODE_STS_ERR_LINEWRITE BIT(7)
#define DSI_VID_MODE_STS_ERR_LONGREAD BIT(8)
#define DSI_VID_MODE_STS_ERR_VRS_WRONG_LENGTH BIT(9)
#define DSI_VID_MODE_STS_VSG_RECOVERY BIT(10)
#define DSI_VID_VCA_SETTING1 0x000000C0 #define DSI_VID_VCA_SETTING1 0x000000C0
#define DSI_VID_VCA_SETTING1_MAX_BURST_LIMIT_SHIFT 0 #define DSI_VID_VCA_SETTING1_MAX_BURST_LIMIT_SHIFT 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment