summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-01-23 07:04:13 -0700
committerAnatolij Gustschin <agust@denx.de>2022-03-28 20:18:26 +0200
commitbfd7a1a33cf120dce6154b42643aabb05ec444d5 (patch)
treef4f78a88a83698f94a51078cf8231819a84992c4 /drivers/video
parent92e3fb8b5e7fbace4b347bfa0f97bf9c06ed97c9 (diff)
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>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/mxsfb.c89
1 files changed, 0 insertions, 89 deletions
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index 99a15e0c25..10433949bb 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -252,94 +252,6 @@ static int mxs_remove_common(u32 fb)
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,
struct display_timing *timings,
u32 *bpp)
@@ -489,4 +401,3 @@ U_BOOT_DRIVER(mxs_video) = {
.remove = mxs_video_remove,
.flags = DM_FLAG_PRE_RELOC | DM_FLAG_OS_PREPARE,
};
-#endif /* ifndef CONFIG_DM_VIDEO */