mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 17:22:22 +02:00
video: mxs: Drop old video code
This is no-longer used and is the last reference to video_hw_init(). Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
committed by
Anatolij Gustschin
parent
92e3fb8b5e
commit
bfd7a1a33c
@@ -252,94 +252,6 @@ static int mxs_remove_common(u32 fb)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef CONFIG_DM_VIDEO
|
|
||||||
|
|
||||||
static GraphicDevice panel;
|
|
||||||
|
|
||||||
void lcdif_power_down(void)
|
|
||||||
{
|
|
||||||
mxs_remove_common(panel.frameAdrs);
|
|
||||||
}
|
|
||||||
|
|
||||||
void *video_hw_init(void)
|
|
||||||
{
|
|
||||||
int bpp = -1;
|
|
||||||
int ret = 0;
|
|
||||||
char *penv;
|
|
||||||
void *fb = NULL;
|
|
||||||
struct ctfb_res_modes mode;
|
|
||||||
struct display_timing timings;
|
|
||||||
|
|
||||||
puts("Video: ");
|
|
||||||
|
|
||||||
/* Suck display configuration from "videomode" variable */
|
|
||||||
penv = env_get("videomode");
|
|
||||||
if (!penv) {
|
|
||||||
puts("MXSFB: 'videomode' variable not set!\n");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
bpp = video_get_params(&mode, penv);
|
|
||||||
|
|
||||||
/* fill in Graphic device struct */
|
|
||||||
sprintf(panel.modeIdent, "%dx%dx%d", mode.xres, mode.yres, bpp);
|
|
||||||
|
|
||||||
panel.winSizeX = mode.xres;
|
|
||||||
panel.winSizeY = mode.yres;
|
|
||||||
panel.plnSizeX = mode.xres;
|
|
||||||
panel.plnSizeY = mode.yres;
|
|
||||||
|
|
||||||
switch (bpp) {
|
|
||||||
case 24:
|
|
||||||
case 18:
|
|
||||||
panel.gdfBytesPP = 4;
|
|
||||||
panel.gdfIndex = GDF_32BIT_X888RGB;
|
|
||||||
break;
|
|
||||||
case 16:
|
|
||||||
panel.gdfBytesPP = 2;
|
|
||||||
panel.gdfIndex = GDF_16BIT_565RGB;
|
|
||||||
break;
|
|
||||||
case 8:
|
|
||||||
panel.gdfBytesPP = 1;
|
|
||||||
panel.gdfIndex = GDF__8BIT_INDEX;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
printf("MXSFB: Invalid BPP specified! (bpp = %i)\n", bpp);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
panel.memSize = mode.xres * mode.yres * panel.gdfBytesPP;
|
|
||||||
|
|
||||||
/* Allocate framebuffer */
|
|
||||||
fb = memalign(ARCH_DMA_MINALIGN,
|
|
||||||
roundup(panel.memSize, ARCH_DMA_MINALIGN));
|
|
||||||
if (!fb) {
|
|
||||||
printf("MXSFB: Error allocating framebuffer!\n");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Wipe framebuffer */
|
|
||||||
memset(fb, 0, panel.memSize);
|
|
||||||
|
|
||||||
panel.frameAdrs = (u32)fb;
|
|
||||||
|
|
||||||
printf("%s\n", panel.modeIdent);
|
|
||||||
|
|
||||||
video_ctfb_mode_to_display_timing(&mode, &timings);
|
|
||||||
|
|
||||||
ret = mxs_probe_common(NULL, &timings, bpp, (u32)fb);
|
|
||||||
if (ret)
|
|
||||||
goto dealloc_fb;
|
|
||||||
|
|
||||||
return (void *)&panel;
|
|
||||||
|
|
||||||
dealloc_fb:
|
|
||||||
free(fb);
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
#else /* ifndef CONFIG_DM_VIDEO */
|
|
||||||
|
|
||||||
static int mxs_of_get_timings(struct udevice *dev,
|
static int mxs_of_get_timings(struct udevice *dev,
|
||||||
struct display_timing *timings,
|
struct display_timing *timings,
|
||||||
u32 *bpp)
|
u32 *bpp)
|
||||||
@@ -489,4 +401,3 @@ U_BOOT_DRIVER(mxs_video) = {
|
|||||||
.remove = mxs_video_remove,
|
.remove = mxs_video_remove,
|
||||||
.flags = DM_FLAG_PRE_RELOC | DM_FLAG_OS_PREPARE,
|
.flags = DM_FLAG_PRE_RELOC | DM_FLAG_OS_PREPARE,
|
||||||
};
|
};
|
||||||
#endif /* ifndef CONFIG_DM_VIDEO */
|
|
||||||
|
Reference in New Issue
Block a user