Skip to contentSkip to conversation

EXYNOS: Change bits per pixel value proper for u-boot.

PATCH New Donghwa Lee 3 participants 3 messages Apr 24, 2012 – Apr 25, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 EXYNOS: Change bits per pixel value proper for u-boot.

vl_bpix of vidinfo_t was changed proper value for u-boot. It is used to multiple of 2 by using NBITS() macro.

---
 board/samsung/trats/trats.c |    2 +-
 drivers/video/exynos_fb.c   |    2 +-
 drivers/video/exynos_fimd.c |    6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)
board/samsung/trats/trats.c +1 -1
index f0775fd..3085de1 100644
@@ -467,7 +467,7 @@ void init_panel_info(vidinfo_t *vid)
 	vid->vl_vsp	= CONFIG_SYS_LOW;
 	vid->vl_dp	= CONFIG_SYS_LOW;
 
-	vid->vl_bpix	= 32;
+	vid->vl_bpix	= 5;
 	vid->dual_lcd_enabled = 0;
 
 	/* s6e8ax0 Panel */
drivers/video/exynos_fb.c +1 -1
index 0eb7f58..a1cf449 100644
@@ -52,7 +52,7 @@ static void exynos_lcd_init_mem(void *lcdbase, vidinfo_t *vid)
 	unsigned long palette_size;
 	unsigned int fb_size;
 
-	fb_size = vid->vl_row * vid->vl_col * (vid->vl_bpix >> 3);
+	fb_size = vid->vl_row * vid->vl_col * (NBITS(vid->vl_bpix) >> 3);
 
 	lcd_base = lcdbase;
 
drivers/video/exynos_fimd.c +3 -3
index 2a60fcf..6416b90 100644
@@ -110,7 +110,7 @@ static void exynos_fimd_set_buffer_address(unsigned int win_id)
 		(struct exynos4_fb *)samsung_get_base_fimd();
 
 	start_addr = (unsigned long)lcd_base_addr;
-	end_addr = start_addr + ((pvid->vl_col * (pvid->vl_bpix / 8)) *
+	end_addr = start_addr + ((pvid->vl_col * (NBITS(pvid->vl_bpix) / 8)) *
 				pvid->vl_row);
 
 	writel(start_addr, (unsigned int)&fimd_ctrl->vidw00add0b0 +
@@ -331,7 +331,7 @@ void exynos_fimd_lcd_init(vidinfo_t *vid)
 	exynos_fimd_set_buffer_address(pvid->win_id);
 
 	/* set buffer size */
-	cfg = EXYNOS_VIDADDR_PAGEWIDTH(pvid->vl_col * pvid->vl_bpix / 8);
+	cfg = EXYNOS_VIDADDR_PAGEWIDTH(pvid->vl_col * NBITS(pvid->vl_bpix) / 8);
 	writel(cfg, (unsigned int)&fimd_ctrl->vidw00add2 +
 					EXYNOS_BUFFER_SIZE(pvid->win_id));
 
@@ -350,5 +350,5 @@ void exynos_fimd_lcd_init(vidinfo_t *vid)
 
 unsigned long exynos_fimd_calc_fbsize(void)
 {
-	return pvid->vl_col * pvid->vl_row * (pvid->vl_bpix / 8);
+	return pvid->vl_col * pvid->vl_row * (NBITS(pvid->vl_bpix) / 8);
 }
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 1/1 EXYNOS: Change bits per pixel value proper for u-boot.

Hi,

Quoted 10 lines · On Tue, 24 Apr 2012 10:37:05 +0900 Donghwa Lee <[email protected]> wrote:

vl_bpix of vidinfo_t was changed proper value for u-boot. It is used to multiple of 2 by using NBITS() macro.

---
 board/samsung/trats/trats.c |    2 +-
 drivers/video/exynos_fb.c   |    2 +-
 drivers/video/exynos_fimd.c |    6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

This patch should go through u-boot-samsung.git tree as the other exynos_fb patches are in this tree.

Thanks,
Anatolij

#2 lore raw

PATCH 1/1 EXYNOS: Change bits per pixel value proper for u-boot.

Quoted 16 lines · Anatolij Gustschin

Hi,

Quoted 10 lines · On Tue, 24 Apr 2012 10:37:05 +0900 Donghwa Lee <[email protected]> wrote:

vl_bpix of vidinfo_t was changed proper value for u-boot. It is used to multiple of 2 by using NBITS() macro.

---

?board/samsung/trats/trats.c | ? ?2 +-
?drivers/video/exynos_fb.c ? | ? ?2 +-
?drivers/video/exynos_fimd.c | ? ?6 +++---

?3 files changed, 5 insertions(+), 5 deletions(-)

Quoted 2 lines

applied to u-boot-samsung.

Thanks
Minkyu Kang.

Signature · 2 lines
from. prom.
www.promsoft.net