Patchwork [1/5] fsl-diu-fb: fix issue with re-enabling DIU area descriptor on MPC5121

login
register
mail settings
Submitter Anatolij Gustschin
Date April 29, 2010, 11:49 p.m.
Message ID <1272584978-19063-2-git-send-email-agust@denx.de>
Download mbox | patch
Permalink /patch/51309/
State Superseded
Delegated to: Grant Likely
Headers show

Comments

Anatolij Gustschin - April 29, 2010, 11:49 p.m.
On MPC5121 re-configuring the DIU area descriptor by writing
new descriptor address doesn't work. As a result, DIU continues
to display using old area descriptor even if the new one has
been set.

Disabling the DIU before setting the new descriptor and
subsequently enabling it fixes the problem.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
 drivers/video/fsl-diu-fb.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

Patch

diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
index 994358a..ee15a99 100644
--- a/drivers/video/fsl-diu-fb.c
+++ b/drivers/video/fsl-diu-fb.c
@@ -329,8 +329,11 @@  static int fsl_diu_enable_panel(struct fb_info *info)
 	if (mfbi->type != MFB_TYPE_OFF) {
 		switch (mfbi->index) {
 		case 0:				/* plane 0 */
-			if (hw->desc[0] != ad->paddr)
+			if (hw->desc[0] != ad->paddr) {
+				out_be32(&dr.diu_reg->diu_mode, MFB_MODE0);
 				out_be32(&hw->desc[0], ad->paddr);
+				out_be32(&dr.diu_reg->diu_mode, MFB_MODE1);
+			}
 			break;
 		case 1:				/* plane 1 AOI 0 */
 			cmfbi = machine_data->fsl_diu_info[2]->par;