drm/mcde: Fix display data flow control
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 29 Jul 2020 09:09:15 +0000 (11:09 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 13 Aug 2020 14:36:47 +0000 (16:36 +0200)
commit709c27730a11d6681297d733eb8ee18166e9c38a
tree3b148b6883c7524ce08aadb5ec505ccabb278f9b
parentea66a9be7e93e5a87f1cdb37b4246882f7c73e45
drm/mcde: Fix display data flow control

Revamp the way that the flow of data to the display is
defined.

I realized that the hardware supports something like
5 different modes of flow: oneshot, command with TE IRQ,
command with BTA (bus turn around) and TE IRQ, video
with TE IRQ and video without TE IRQ instead synchronizing
to the output of the MCDE DSI formatter.

Like before the selection of the type of flow is done
from the DSI driver when we attach it to the MCDE and we
get to know what the display wants.

The new video mode synchronization method from the MCDE DSI
formatter is used on some upstream devices such as Golden.
This is the new default for video mode: stateless panels
do not as a rule generate TE IRQs.

Another semantic change is that we stop sending
a TE request before every command when sending data to
a display in command mode: this should only be explicitly
requested when using BTA, according to the vendor driver.

This has been tested and works fine with the command mode
displays I have. (All that are supported upstream.)

Reported-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Stephan Gerhold <stephan@gerhold.net>
Cc: Stephan Gerhold <stephan@gerhold.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20200729090915.252730-2-linus.walleij@linaro.org
drivers/gpu/drm/mcde/mcde_display.c
drivers/gpu/drm/mcde/mcde_drm.h
drivers/gpu/drm/mcde/mcde_drv.c
drivers/gpu/drm/mcde/mcde_dsi.c