projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
imx: imx8qm/qxp: Fix issue in get_effective_memsize
[oweals/u-boot.git]
/
drivers
/
video
/
da8xx-fb.c
diff --git
a/drivers/video/da8xx-fb.c
b/drivers/video/da8xx-fb.c
index 468f385d8d4d9902e61e526dc72cfff18d828694..5fb68865ef4631adffba5be54598ed35ef6d2360 100644
(file)
--- a/
drivers/video/da8xx-fb.c
+++ b/
drivers/video/da8xx-fb.c
@@
-1,3
+1,4
@@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Porting to u-boot:
*
/*
* Porting to u-boot:
*
@@
-9,17
+10,16
@@
*
* Based on the LCD driver for TI Avalanche processors written by
* Ajay Singh and Shalom Hai.
*
* Based on the LCD driver for TI Avalanche processors written by
* Ajay Singh and Shalom Hai.
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <malloc.h>
*/
#include <common.h>
#include <malloc.h>
+#include <memalign.h>
#include <video_fb.h>
#include <linux/list.h>
#include <linux/fb.h>
#include <video_fb.h>
#include <linux/list.h>
#include <linux/fb.h>
-#include <
asm
/errno.h>
+#include <
linux
/errno.h>
#include <asm/io.h>
#include <asm/arch/hardware.h>
#include <asm/io.h>
#include <asm/arch/hardware.h>
@@
-853,9
+853,10
@@
static u32 wait_for_event(u32 event)
do {
ret = lcdc_irq_handler();
udelay(1000);
do {
ret = lcdc_irq_handler();
udelay(1000);
- } while (!(ret & event));
+ --timeout;
+ } while (!(ret & event) && timeout);
- if (
timeout <= 0
) {
+ if (
!(ret & event)
) {
printf("%s: event %d not hit\n", __func__, event);
return -1;
}
printf("%s: event %d not hit\n", __func__, event);
return -1;
}
@@
-924,7
+925,7
@@
void *video_hw_init(void)
da8xx_lcd_cfg->bpp);
size = sizeof(struct fb_info) + sizeof(struct da8xx_fb_par);
da8xx_lcd_cfg->bpp);
size = sizeof(struct fb_info) + sizeof(struct da8xx_fb_par);
- da8xx_fb_info = malloc(size);
+ da8xx_fb_info = malloc
_cache_aligned
(size);
debug("da8xx_fb_info at %x\n", (unsigned int)da8xx_fb_info);
if (!da8xx_fb_info) {
debug("da8xx_fb_info at %x\n", (unsigned int)da8xx_fb_info);
if (!da8xx_fb_info) {
@@
-949,7
+950,7
@@
void *video_hw_init(void)
da8xx_lcd_cfg->bpp;
par->vram_size = par->vram_size * LCD_NUM_BUFFERS / 8;
da8xx_lcd_cfg->bpp;
par->vram_size = par->vram_size * LCD_NUM_BUFFERS / 8;
- par->vram_virt = malloc(par->vram_size);
+ par->vram_virt = malloc
_cache_aligned
(par->vram_size);
par->vram_phys = (dma_addr_t) par->vram_virt;
debug("Requesting 0x%x bytes for framebuffer at 0x%x\n",
par->vram_phys = (dma_addr_t) par->vram_virt;
debug("Requesting 0x%x bytes for framebuffer at 0x%x\n",
@@
-972,7
+973,7
@@
void *video_hw_init(void)
da8xx_fb_fix.line_length - 1;
/* allocate palette buffer */
da8xx_fb_fix.line_length - 1;
/* allocate palette buffer */
- par->v_palette_base = malloc(PALETTE_SIZE);
+ par->v_palette_base = malloc
_cache_aligned
(PALETTE_SIZE);
if (!par->v_palette_base) {
printf("GLCD: malloc for palette buffer failed\n");
goto err_release_fb_mem;
if (!par->v_palette_base) {
printf("GLCD: malloc for palette buffer failed\n");
goto err_release_fb_mem;