public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Igor Opaniuk <igor.opaniuk@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC 1/6] video: mxsfb: change mxs_lcd_init signature
Date: Tue,  4 Jun 2019 00:05:56 +0300	[thread overview]
Message-ID: <20190603210601.30857-2-igor.opaniuk@gmail.com> (raw)
In-Reply-To: <20190603210601.30857-1-igor.opaniuk@gmail.com>

From: Igor Opaniuk <igor.opaniuk@toradex.com>

Provide directly framebuffer address instead of pointer to
GraphicDevice struct, which will let to re-use this function in
DM_VIDEO configurations.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
---
 drivers/video/mxsfb.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index 02fde05908..0f3a10b0f6 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -46,8 +46,7 @@ __weak void mxsfb_system_setup(void)
  * 	 le:89,ri:164,up:23,lo:10,hs:10,vs:10,sync:0,vmode:0
  */
 
-static void mxs_lcd_init(GraphicDevice *panel,
-			struct ctfb_res_modes *mode, int bpp)
+static void mxs_lcd_init(u32 fb_addr, struct ctfb_res_modes *mode, int bpp)
 {
 	struct mxs_lcdif_regs *regs = (struct mxs_lcdif_regs *)MXS_LCDIF_BASE;
 	uint32_t word_len = 0, bus_width = 0;
@@ -112,8 +111,8 @@ static void mxs_lcd_init(GraphicDevice *panel,
 	writel((0 << LCDIF_VDCTRL4_DOTCLK_DLY_SEL_OFFSET) | mode->xres,
 		&regs->hw_lcdif_vdctrl4);
 
-	writel(panel->frameAdrs, &regs->hw_lcdif_cur_buf);
-	writel(panel->frameAdrs, &regs->hw_lcdif_next_buf);
+	writel(fb_addr, &regs->hw_lcdif_cur_buf);
+	writel(fb_addr, &regs->hw_lcdif_next_buf);
 
 	/* Flush FIFO first */
 	writel(LCDIF_CTRL1_FIFO_CLEAR, &regs->hw_lcdif_ctrl1_set);
@@ -214,7 +213,7 @@ void *video_hw_init(void)
 	printf("%s\n", panel.modeIdent);
 
 	/* Start framebuffer */
-	mxs_lcd_init(&panel, &mode, bpp);
+	mxs_lcd_init(panel.frameAdrs, &mode, bpp);
 
 #ifdef CONFIG_VIDEO_MXS_MODE_SYSTEM
 	/*
-- 
2.17.1

  reply	other threads:[~2019-06-03 21:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-03 21:05 [U-Boot] [RFC 0/6] Convert mxsfb to DM_VIDEO Igor Opaniuk
2019-06-03 21:05 ` Igor Opaniuk [this message]
2019-06-03 21:05 ` [U-Boot] [RFC 2/6] video: mxsfb: reorder includes Igor Opaniuk
2019-06-03 21:05 ` [U-Boot] [RFC 3/6] video: mxsfb: refactor video_hw_init() Igor Opaniuk
2019-06-03 21:05 ` [U-Boot] [RFC 4/6] video: mxsfb: add DM_VIDEO support Igor Opaniuk
2019-06-03 21:06 ` [U-Boot] [RFC 5/6] ARM: dts: colibri_imx7: Add lcdif node Igor Opaniuk
2019-06-04 22:06   ` Fabio Estevam
2019-06-05 13:29     ` Igor Opaniuk
2019-06-05 13:55       ` Igor Opaniuk
2019-06-03 21:06 ` [U-Boot] [RFC 6/6] colibri_imx7_emmc: enable DM_VIDEO Igor Opaniuk
2019-06-04 21:38 ` [U-Boot] [RFC 0/6] Convert mxsfb to DM_VIDEO Anatolij Gustschin

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=20190603210601.30857-2-igor.opaniuk@gmail.com \
    --to=igor.opaniuk@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox