summaryrefslogtreecommitdiff
path: root/drivers/video/exynos_fimd.c
diff options
context:
space:
mode:
authorDonghwa Lee <dh09.lee@samsung.com>2012-04-23 15:37:05 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2012-05-15 08:31:30 +0200
commitf78095e40b5d9f0c03985e296289be5a84a40f8a (patch)
tree30edd5c12252f69c63f1eb093df3f865b03cf836 /drivers/video/exynos_fimd.c
parent51b1cd6df7fbabe3f85ff3ba693f181deef44473 (diff)
downloadu-boot-imx-f78095e40b5d9f0c03985e296289be5a84a40f8a.zip
u-boot-imx-f78095e40b5d9f0c03985e296289be5a84a40f8a.tar.gz
u-boot-imx-f78095e40b5d9f0c03985e296289be5a84a40f8a.tar.bz2
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. Signed-off-by: Donghwa Lee <dh09.lee@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'drivers/video/exynos_fimd.c')
-rw-r--r--drivers/video/exynos_fimd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/video/exynos_fimd.c b/drivers/video/exynos_fimd.c
index 2a60fcf..6416b90 100644
--- a/drivers/video/exynos_fimd.c
+++ b/drivers/video/exynos_fimd.c
@@ -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);
}