diff options
author | Marek Vasut <marex@denx.de> | 2023-06-15 23:15:11 +0300 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2023-07-02 03:58:21 +0300 |
commit | 14806c6415820b1c4bc317655c40784d050a2edb (patch) | |
tree | 9e5f94ab4eb20a6057e90cb442603a421cc3f055 /drivers/gpu/drm/bridge/samsung-dsim.c | |
parent | 270689d257c88fd1ad7050041ed196a8188e6914 (diff) | |
download | linux-14806c6415820b1c4bc317655c40784d050a2edb.tar.xz |
drm: bridge: samsung-dsim: Drain command transfer FIFO before transfer
Wait until the command transfer FIFO is empty before loading in the next
command. The previous behavior where the code waited until command transfer
FIFO was not full suffered from transfer corruption, where the last command
in the FIFO could be overwritten in case the FIFO indicates not full, but
also does not have enough space to store another transfer yet.
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com> # imx8mm-icore
Link: https://patchwork.freedesktop.org/patch/msgid/20230615201511.565923-1-marex@denx.de
Diffstat (limited to 'drivers/gpu/drm/bridge/samsung-dsim.c')
-rw-r--r-- | drivers/gpu/drm/bridge/samsung-dsim.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c index 043b8109e64a..9b7a00bafeaa 100644 --- a/drivers/gpu/drm/bridge/samsung-dsim.c +++ b/drivers/gpu/drm/bridge/samsung-dsim.c @@ -1009,7 +1009,7 @@ static int samsung_dsim_wait_for_hdr_fifo(struct samsung_dsim *dsi) do { u32 reg = samsung_dsim_read(dsi, DSIM_FIFOCTRL_REG); - if (!(reg & DSIM_SFR_HEADER_FULL)) + if (reg & DSIM_SFR_HEADER_EMPTY) return 0; if (!cond_resched()) |