All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sanchayan Maity <maitysanchayan@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 4/6] video: fsl_dcu_fb: Update DCU layers for Vybrid
Date: Thu, 30 Mar 2017 12:44:04 +0530	[thread overview]
Message-ID: <7686f5784f9dc014ea7ed36f25e7209b39d19016.1490856350.git.maitysanchayan@gmail.com> (raw)
In-Reply-To: <cover.1490856350.git.maitysanchayan@gmail.com>

From: Stefan Agner <stefan.agner@toradex.com>

Users control the graphical content of the panel by manipulating
configuration of elements in DCU4 called layers. The number of
layers is different for Vybrid and LS102XA SoC's. Update this
to reflect for LS102XA accordingly and for use with Vybrid.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
---
 arch/arm/include/asm/arch-ls102xa/config.h | 1 +
 drivers/video/fsl_dcu_fb.c                 | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/arm/include/asm/arch-ls102xa/config.h b/arch/arm/include/asm/arch-ls102xa/config.h
index 2f7233f2fe..7a909c88af 100644
--- a/arch/arm/include/asm/arch-ls102xa/config.h
+++ b/arch/arm/include/asm/arch-ls102xa/config.h
@@ -107,6 +107,7 @@
 #define CONFIG_SYS_FSL_SRK_LE
 
 #define DCU_LAYER_MAX_NUM			16
+#define DCU_TOTAL_LAYER_NUM			16
 
 #ifdef CONFIG_LS102XA
 #define CONFIG_USB_MAX_CONTROLLER_COUNT		1
diff --git a/drivers/video/fsl_dcu_fb.c b/drivers/video/fsl_dcu_fb.c
index a922a91fb2..35550afd63 100644
--- a/drivers/video/fsl_dcu_fb.c
+++ b/drivers/video/fsl_dcu_fb.c
@@ -178,7 +178,7 @@ static void reset_total_layers(void)
 	struct dcu_reg *regs = (struct dcu_reg *)CONFIG_SYS_DCU_ADDR;
 	int i;
 
-	for (i = 0; i < DCU_LAYER_MAX_NUM; i++) {
+	for (i = 0; i < DCU_TOTAL_LAYER_NUM; i++) {
 		dcu_write32(&regs->ctrldescl[i][0], 0);
 		dcu_write32(&regs->ctrldescl[i][1], 0);
 		dcu_write32(&regs->ctrldescl[i][2], 0);
@@ -188,8 +188,10 @@ static void reset_total_layers(void)
 		dcu_write32(&regs->ctrldescl[i][6], 0);
 		dcu_write32(&regs->ctrldescl[i][7], 0);
 		dcu_write32(&regs->ctrldescl[i][8], 0);
+#ifdef CONFIG_LS102XA
 		dcu_write32(&regs->ctrldescl[i][9], 0);
 		dcu_write32(&regs->ctrldescl[i][10], 0);
+#endif
 	}
 }
 
-- 
2.12.1

  parent reply	other threads:[~2017-03-30  7:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-30  7:14 [U-Boot] [PATCH v2 0/6] Introduce DCU support for Vybrid Sanchayan Maity
2017-03-30  7:14 ` [U-Boot] [PATCH v2 1/6] Convert CONFIG_FSL_DCU_FB to Kconfig Sanchayan Maity
2017-03-30  7:14 ` [U-Boot] [PATCH v2 2/6] video: fsl_dcu_fb: fix framebuffer to the end of memory Sanchayan Maity
2017-03-30  7:14 ` [U-Boot] [PATCH v2 3/6] video: fsl_dcu_fb: Enable pixel clock after initialization Sanchayan Maity
2017-03-30  7:14 ` Sanchayan Maity [this message]
2017-03-30 15:34   ` [U-Boot] [PATCH v2 4/6] video: fsl_dcu_fb: Update DCU layers for Vybrid Stefan Agner
2017-03-30  7:14 ` [U-Boot] [PATCH v2 5/6] video: fsl_dcu_fb: add additional modes for DCU Sanchayan Maity
2017-03-30  7:14 ` [U-Boot] [PATCH v2 6/6] board: toradex: colibri_vf: Add DCU support for Colibri Vybrid Sanchayan Maity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7686f5784f9dc014ea7ed36f25e7209b39d19016.1490856350.git.maitysanchayan@gmail.com \
    --to=maitysanchayan@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.