projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib/fdtdec: Fix compiling warning caused by changing fdt_addr_t type
[oweals/u-boot.git]
/
drivers
/
video
/
mxc_ipuv3_fb.c
diff --git
a/drivers/video/mxc_ipuv3_fb.c
b/drivers/video/mxc_ipuv3_fb.c
index fd74370ed48775b811eab7a7bc8e88b582a75c5c..1fa95314fc4621857114bcef2e98e50a60f163b7 100644
(file)
--- a/
drivers/video/mxc_ipuv3_fb.c
+++ b/
drivers/video/mxc_ipuv3_fb.c
@@
-13,6
+13,7
@@
#include <common.h>
#include <asm/errno.h>
#include <common.h>
#include <asm/errno.h>
+#include <asm/global_data.h>
#include <linux/string.h>
#include <linux/list.h>
#include <linux/fb.h>
#include <linux/string.h>
#include <linux/list.h>
#include <linux/fb.h>
@@
-24,6
+25,8
@@
#include "mxcfb.h"
#include "ipu_regs.h"
#include "mxcfb.h"
#include "ipu_regs.h"
+DECLARE_GLOBAL_DATA_PTR;
+
static int mxcfb_map_video_memory(struct fb_info *fbi);
static int mxcfb_unmap_video_memory(struct fb_info *fbi);
static int mxcfb_map_video_memory(struct fb_info *fbi);
static int mxcfb_unmap_video_memory(struct fb_info *fbi);
@@
-33,7
+36,7
@@
static struct fb_videomode const *gmode;
static uint8_t gdisp;
static uint32_t gpixfmt;
static uint8_t gdisp;
static uint32_t gpixfmt;
-void fb_videomode_to_var(struct fb_var_screeninfo *var,
+
static
void fb_videomode_to_var(struct fb_var_screeninfo *var,
const struct fb_videomode *mode)
{
var->xres = mode->xres;
const struct fb_videomode *mode)
{
var->xres = mode->xres;
@@
-255,8
+258,7
@@
static int mxcfb_set_par(struct fb_info *fbi)
if (fbi->var.sync & FB_SYNC_CLK_IDLE_EN)
sig_cfg.clkidle_en = 1;
if (fbi->var.sync & FB_SYNC_CLK_IDLE_EN)
sig_cfg.clkidle_en = 1;
- debug("pixclock = %ul Hz\n",
- (u32) (PICOS2KHZ(fbi->var.pixclock) * 1000UL));
+ debug("pixclock = %lu Hz\n", PICOS2KHZ(fbi->var.pixclock) * 1000UL);
if (ipu_init_sync_panel(mxc_fbi->ipu_di,
(PICOS2KHZ(fbi->var.pixclock)) * 1000UL,
if (ipu_init_sync_panel(mxc_fbi->ipu_di,
(PICOS2KHZ(fbi->var.pixclock)) * 1000UL,
@@
-399,8
+401,9
@@
static int mxcfb_map_video_memory(struct fb_info *fbi)
fbi->fix.smem_len = fbi->var.yres_virtual *
fbi->fix.line_length;
}
fbi->fix.smem_len = fbi->var.yres_virtual *
fbi->fix.line_length;
}
-
- fbi->screen_base = (char *)malloc(fbi->fix.smem_len);
+ fbi->fix.smem_len = roundup(fbi->fix.smem_len, ARCH_DMA_MINALIGN);
+ fbi->screen_base = (char *)memalign(ARCH_DMA_MINALIGN,
+ fbi->fix.smem_len);
fbi->fix.smem_start = (unsigned long)fbi->screen_base;
if (fbi->screen_base == 0) {
puts("Unable to allocate framebuffer memory\n");
fbi->fix.smem_start = (unsigned long)fbi->screen_base;
if (fbi->screen_base == 0) {
puts("Unable to allocate framebuffer memory\n");
@@
-414,6
+417,8
@@
static int mxcfb_map_video_memory(struct fb_info *fbi)
fbi->screen_size = fbi->fix.smem_len;
fbi->screen_size = fbi->fix.smem_len;
+ gd->fb_base = fbi->fix.smem_start;
+
/* Clear the screen */
memset((char *)fbi->screen_base, 0, fbi->fix.smem_len);
/* Clear the screen */
memset((char *)fbi->screen_base, 0, fbi->fix.smem_len);
@@
-480,7
+485,7
@@
static struct fb_info *mxcfb_init_fbinfo(void)
/*
* Probe routine for the framebuffer driver. It is called during the
/*
* Probe routine for the framebuffer driver. It is called during the
- * driver binding process.
The following functions are performed in
+ * driver binding process. The following functions are performed in
* this routine: Framebuffer initialization, Memory allocation and
* mapping, Framebuffer registration, IPU initialization.
*
* this routine: Framebuffer initialization, Memory allocation and
* mapping, Framebuffer registration, IPU initialization.
*
@@
-536,7
+541,7
@@
static int mxcfb_probe(u32 interface_pix_fmt, uint8_t disp,
mxcfb_set_fix(fbi);
mxcfb_set_fix(fbi);
- /* alocate fb first */
+ /* al
l
ocate fb first */
if (mxcfb_map_video_memory(fbi) < 0)
return -ENOMEM;
if (mxcfb_map_video_memory(fbi) < 0)
return -ENOMEM;