linux-stable/drivers/gpu/drm/mcde
Linus Walleij c8d4a56082 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: 5fc537bfd0 ("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>
2019-12-17 21:20:03 +01:00
..
Kconfig
Makefile
mcde_display.c drm/mcde: Handle pending vblank while disabling display 2019-11-09 22:19:14 +01:00
mcde_display_regs.h
mcde_drm.h drm/mcde: Fix frame sync setup for video mode panels 2019-11-09 22:18:51 +01:00
mcde_drv.c drm/mcde: Fix frame sync setup for video mode panels 2019-11-09 22:18:51 +01:00
mcde_dsi.c drm/mcde: Some fixes to handling video mode 2019-12-17 21:20:03 +01:00
mcde_dsi_regs.h drm/mcde: Some fixes to handling video mode 2019-12-17 21:20:03 +01:00