One regression fixup to samsung-dsim.c module

- The FORCE_STOP_STATE bit is ineffective for forcing DSI link into LP-11 mode,
   causing timing issues and potential bridge failures.
   This patch reverts previous commits and corrects this issue.
 -----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEEoxi+6c5pRPV/gdXcxWAb7Og/+bYFAmWzujEACgkQxWAb7Og/
 +bbjfgwAyre4Ndo1zyOQ1ba0P86mWobNQAAk6SnkJZtfngtu8O37uJdetzNHoKgW
 ziHD4OHuLGX3BgXfcJdSi1msKxnO2+PvEu3WTRsOh1BMyWnZhCzUehRuMZPwrN4D
 w+InvXCy9xwjBBQHF6nxHg3sJncNCyvGm3V21ABrMFnAr6B4blW6a0RtHmR8k0M0
 Z6EI5Lsj1ngfnN3QDqUQN+oKfnXTZCNgzDcsCqXAIfDf5srjv+kcRK7ab8goV4dA
 N2VvwFocbfbI96tFO733hyH9XV6Z9jgB3J5gQF5BQABQmhE/dlvlfhKU7V+EEIUj
 gY9ABmHp1aada5nuzEW0vVT2Kw7qWcBEJpDGHkGLCHP5B3SLI/uIfm/o+JpTgZdt
 mdlStjyJDzpDYI9xJdiJkg4KVCRy53hXvIkJYyEm73WEnd/SsiSCM+xDK5HDGp/9
 rTuOKnGiRmPwNvpiYnKRUTIdXY/84LgiylSdoSQ1IBw/+wkBcbugGz5bjKIhcsoZ
 UEckhMhx
 =0i9u
 -----END PGP SIGNATURE-----

Merge tag 'drm-misc-fixes-for-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes

One regression fixup to samsung-dsim.c module
- The FORCE_STOP_STATE bit is ineffective for forcing DSI link into LP-11 mode,
  causing timing issues and potential bridge failures.
  This patch reverts previous commits and corrects this issue.

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Inki Dae <inki.dae@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240126141130.15512-1-inki.dae@samsung.com
This commit is contained in:
Dave Airlie 2024-01-27 04:12:14 +10:00
commit 987940f057

View File

@ -969,10 +969,6 @@ static int samsung_dsim_init_link(struct samsung_dsim *dsi)
reg = samsung_dsim_read(dsi, DSIM_ESCMODE_REG);
reg &= ~DSIM_STOP_STATE_CNT_MASK;
reg |= DSIM_STOP_STATE_CNT(driver_data->reg_values[STOP_STATE_CNT]);
if (!samsung_dsim_hw_is_exynos(dsi->plat_data->hw_type))
reg |= DSIM_FORCE_STOP_STATE;
samsung_dsim_write(dsi, DSIM_ESCMODE_REG, reg);
reg = DSIM_BTA_TIMEOUT(0xff) | DSIM_LPDR_TIMEOUT(0xffff);
@ -1431,18 +1427,6 @@ static void samsung_dsim_disable_irq(struct samsung_dsim *dsi)
disable_irq(dsi->irq);
}
static void samsung_dsim_set_stop_state(struct samsung_dsim *dsi, bool enable)
{
u32 reg = samsung_dsim_read(dsi, DSIM_ESCMODE_REG);
if (enable)
reg |= DSIM_FORCE_STOP_STATE;
else
reg &= ~DSIM_FORCE_STOP_STATE;
samsung_dsim_write(dsi, DSIM_ESCMODE_REG, reg);
}
static int samsung_dsim_init(struct samsung_dsim *dsi)
{
const struct samsung_dsim_driver_data *driver_data = dsi->driver_data;
@ -1492,9 +1476,6 @@ static void samsung_dsim_atomic_pre_enable(struct drm_bridge *bridge,
ret = samsung_dsim_init(dsi);
if (ret)
return;
samsung_dsim_set_display_mode(dsi);
samsung_dsim_set_display_enable(dsi, true);
}
}
@ -1503,12 +1484,8 @@ static void samsung_dsim_atomic_enable(struct drm_bridge *bridge,
{
struct samsung_dsim *dsi = bridge_to_dsi(bridge);
if (samsung_dsim_hw_is_exynos(dsi->plat_data->hw_type)) {
samsung_dsim_set_display_mode(dsi);
samsung_dsim_set_display_enable(dsi, true);
} else {
samsung_dsim_set_stop_state(dsi, false);
}
samsung_dsim_set_display_mode(dsi);
samsung_dsim_set_display_enable(dsi, true);
dsi->state |= DSIM_STATE_VIDOUT_AVAILABLE;
}
@ -1521,9 +1498,6 @@ static void samsung_dsim_atomic_disable(struct drm_bridge *bridge,
if (!(dsi->state & DSIM_STATE_ENABLED))
return;
if (!samsung_dsim_hw_is_exynos(dsi->plat_data->hw_type))
samsung_dsim_set_stop_state(dsi, true);
dsi->state &= ~DSIM_STATE_VIDOUT_AVAILABLE;
}
@ -1828,8 +1802,6 @@ static ssize_t samsung_dsim_host_transfer(struct mipi_dsi_host *host,
if (ret)
return ret;
samsung_dsim_set_stop_state(dsi, false);
ret = mipi_dsi_create_packet(&xfer.packet, msg);
if (ret < 0)
return ret;