diff options
author | PixelBot AutoMerger <android-nexus-securitybot@system.gserviceaccount.com> | 2021-12-26 18:42:25 -0800 |
---|---|---|
committer | SecurityBot <android-nexus-securitybot@system.gserviceaccount.com> | 2021-12-26 18:42:25 -0800 |
commit | 4a0b780c854ae3363a678f91e5877b5f9928e9ab (patch) | |
tree | 17e8694cdb89ba64e8bdde4058251b53b2f85938 | |
parent | f00e446e328a1958a0a99c1e1a6d5c40f25f1040 (diff) | |
parent | 1804e517767b53fc8a8bd6218a11be1aad0efd51 (diff) | |
download | display-4a0b780c854ae3363a678f91e5877b5f9928e9ab.tar.gz |
Merge android12-gs-pixel-5.10-sc-qpr2 into android12-gs-pixel-5.10-sc-v2android-s-qpr3-beta-2_r0.5android-s-qpr3-beta-1_r0.6android-s-qpr3-beta-1_r0.5android-12.1.0_r0.40android-gs-raviole-5.10-s-qpr3-beta-2android-gs-bluejay-5.10-android12L-d2
SBMerger: 410055097
Change-Id: Ic816f82f5c85093c8628757161ad016c11b0ed11
Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
-rw-r--r-- | samsung/exynos_drm_dsim.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/samsung/exynos_drm_dsim.c b/samsung/exynos_drm_dsim.c index 9011ee8..4e0a39e 100644 --- a/samsung/exynos_drm_dsim.c +++ b/samsung/exynos_drm_dsim.c @@ -58,6 +58,7 @@ struct dsim_device *dsim_drvdata[MAX_DSI_CNT]; #define PANEL_DRV_LEN 64 +#define RETRY_READ_FIFO_MAX 10 static char panel_name[PANEL_DRV_LEN]; module_param_string(panel_name, panel_name, sizeof(panel_name), 0644); @@ -1959,8 +1960,8 @@ dsim_read_data(struct dsim_device *dsim, const struct mipi_dsi_msg *msg) } rx_fifo = dsim_reg_get_rx_fifo(dsim->id); - dsim_debug(dsim, "rx fifo:0x%8x, response:0x%x, rx_size:%d\n", rx_fifo, - rx_fifo & 0xff, rx_size); + dsim_debug(dsim, "rx fifo:0x%8x, response:0x%x, rx_len:%lu\n", rx_fifo, + rx_fifo & 0xff, msg->rx_len); /* Parse the RX packet data types */ switch (rx_fifo & 0xff) { @@ -1976,6 +1977,7 @@ dsim_read_data(struct dsim_device *dsim, const struct mipi_dsi_msg *msg) break; case MIPI_DSI_RX_DCS_SHORT_READ_RESPONSE_2BYTE: case MIPI_DSI_RX_GENERIC_SHORT_READ_RESPONSE_2BYTE: + WARN_ON(msg->rx_len > 2); rx_buf[1] = (rx_fifo >> 16) & 0xff; case MIPI_DSI_RX_DCS_SHORT_READ_RESPONSE_1BYTE: case MIPI_DSI_RX_GENERIC_SHORT_READ_RESPONSE_1BYTE: @@ -2006,9 +2008,16 @@ dsim_read_data(struct dsim_device *dsim, const struct mipi_dsi_msg *msg) } if (!dsim_reg_rx_fifo_is_empty(dsim->id)) { - dsim_err(dsim, "RX FIFO is not empty\n"); + u32 retry_cnt = RETRY_READ_FIFO_MAX; + + dsim_warn(dsim, "RX FIFO is not empty: rx_size:%u, rx_len:%lu\n", + rx_size, msg->rx_len); dsim_dump(dsim); - return -EBUSY; + do { + rx_fifo = dsim_reg_get_rx_fifo(dsim->id); + dsim_info(dsim, "rx fifo:0x%8x, response:0x%x\n", + rx_fifo, rx_fifo & 0xff); + } while (!dsim_reg_rx_fifo_is_empty(dsim->id) && --retry_cnt); } return rx_size; |