aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/mcde/mcde_dsi_regs.h
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2019-12-17 16:09:59 +0100
committerLinus Walleij <linus.walleij@linaro.org>2019-12-17 21:20:03 +0100
commitc8d4a56082eebabbf96ddb86238808c30124f06b (patch)
tree57993b426c650053e43b7937ea247f812bec9fa5 /drivers/gpu/drm/mcde/mcde_dsi_regs.h
parentdrm/drm_panel: Fix EXPORT of drm_panel_of_backlight() one more time (diff)
downloadlinux-dev-c8d4a56082eebabbf96ddb86238808c30124f06b.tar.xz
linux-dev-c8d4a56082eebabbf96ddb86238808c30124f06b.zip
drm/mcde: Some fixes to handling video mode
The video DSI mode had not really been tested. These fixes makes it more likely to work on real hardware: - Put the active width (x width) in the right bits and the VSA (vertical sync active) in the right bits (those were swapped). - Calculate the packet sizes in bytes as in the vendor driver, rather than in bits. Test the calculations agains a spreadsheet and confirmed by debug prints to be reasonable. - Also verified the register values with relative confidence to register dumps from the Samsung GT-I8190 boot loader graphics. We are not identical but not off by far either. - Error out if the current mode and refresh frequency doesn't work out. (In the future we may simply want to scale down the vrefresh.) - Handle negative result in front/back/sync packages and fall back to zero like in the vendor driver. - Put in lots of clarifying comments and references to the documentation where the code is hard to understand. - Set the DSI_VID_VCA_SETTING2 field DSI_VID_VCA_SETTING2_MAX_LINE_LIMIT to blkline_pck - 6 as in the vendor driver and mask the field properly. - Set the DSI_VID_VCA_SETTING1 field DSI_VID_VCA_SETTING1_MAX_BURST_LIMIT to blkeol_pck - 6 to blkeol_duration - 6 as in the vendor driver. Cc: Stephan Gerhold <stephan@gerhold.net> Fixes: 5fc537bfd000 ("drm/mcde: Add new driver for ST-Ericsson MCDE") Link: https://patchwork.freedesktop.org/patch/msgid/20191217150959.17215-1-linus.walleij@linaro.org Reviewed-by: Stephan Gerhold <stephan@gerhold.net> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to '')
-rw-r--r--drivers/gpu/drm/mcde/mcde_dsi_regs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/mcde/mcde_dsi_regs.h b/drivers/gpu/drm/mcde/mcde_dsi_regs.h
index 8089db805c57..16551af1089e 100644
--- a/drivers/gpu/drm/mcde/mcde_dsi_regs.h
+++ b/drivers/gpu/drm/mcde/mcde_dsi_regs.h
@@ -228,6 +228,7 @@
#define DSI_VID_PCK_TIME 0x000000A8
#define DSI_VID_PCK_TIME_BLKEOL_DURATION_SHIFT 0
+#define DSI_VID_PCK_TIME_BLKEOL_DURATION_MASK 0x00000FFF
#define DSI_VID_DPHY_TIME 0x000000AC
#define DSI_VID_DPHY_TIME_REG_LINE_DURATION_SHIFT 0