Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 206bd0bb authored by Xiaoming Zhou's avatar Xiaoming Zhou
Browse files

msm: mdss: fix the display reset error



Increase the dma stop time out value as stopping operation
may take longer than the previous defined value. Gracefully
handle the time out condition to allow it to retry when
the next frame comes in.

Change-Id: I5120f309db2dbaeebef3b2878caa13cec17c9e1f
Signed-off-by: default avatarXiaoming Zhou <zhoux@codeaurora.org>
parent 816351dd
Loading
Loading
Loading
Loading
+11 −3
Original line number Original line Diff line number Diff line
@@ -799,7 +799,7 @@ static int mdp3_ctrl_reset(struct msm_fb_data_type *mfd)


	rc = mdp3_dma->stop(mdp3_dma, mdp3_session->intf);
	rc = mdp3_dma->stop(mdp3_dma, mdp3_session->intf);
	if (rc) {
	if (rc) {
		pr_err("fail to stop the MDP3 dma\n");
		pr_err("fail to stop the MDP3 dma %d\n", rc);
		goto reset_error;
		goto reset_error;
	}
	}


@@ -1013,7 +1013,11 @@ static int mdp3_ctrl_display_commit_kickoff(struct msm_fb_data_type *mfd,
	panel = mdp3_session->panel;
	panel = mdp3_session->panel;
	if (!mdp3_iommu_is_attached(MDP3_CLIENT_DMA_P)) {
	if (!mdp3_iommu_is_attached(MDP3_CLIENT_DMA_P)) {
		pr_debug("continuous splash screen, IOMMU not attached\n");
		pr_debug("continuous splash screen, IOMMU not attached\n");
		mdp3_ctrl_reset(mfd);
		rc = mdp3_ctrl_reset(mfd);
		if (rc) {
			pr_err("fail to reset display\n");
			return -EINVAL;
		}
		reset_done = true;
		reset_done = true;
	}
	}


@@ -1096,7 +1100,11 @@ static void mdp3_ctrl_pan_display(struct msm_fb_data_type *mfd,


	if (!mdp3_iommu_is_attached(MDP3_CLIENT_DMA_P)) {
	if (!mdp3_iommu_is_attached(MDP3_CLIENT_DMA_P)) {
		pr_debug("continuous splash screen, IOMMU not attached\n");
		pr_debug("continuous splash screen, IOMMU not attached\n");
		mdp3_ctrl_reset(mfd);
		rc = mdp3_ctrl_reset(mfd);
		if (rc) {
			pr_err("fail to reset display\n");
			return;
		}
	}
	}


	mutex_lock(&mdp3_session->lock);
	mutex_lock(&mdp3_session->lock);
+1 −1
Original line number Original line Diff line number Diff line
@@ -18,7 +18,7 @@
#include "mdp3_hwio.h"
#include "mdp3_hwio.h"


#define DMA_STOP_POLL_SLEEP_US 1000
#define DMA_STOP_POLL_SLEEP_US 1000
#define DMA_STOP_POLL_TIMEOUT_US 32000
#define DMA_STOP_POLL_TIMEOUT_US 200000
#define DMA_HISTO_RESET_TIMEOUT_MS 40
#define DMA_HISTO_RESET_TIMEOUT_MS 40
#define DMA_LUT_CONFIG_MASK 0xfffffbe8
#define DMA_LUT_CONFIG_MASK 0xfffffbe8
#define DMA_CCS_CONFIG_MASK 0xfffffc17
#define DMA_CCS_CONFIG_MASK 0xfffffc17