mirror of
https://xff.cz/git/u-boot/
synced 2025-09-27 05:21:16 +02:00
efi: Drop old LCD code
This relies on the old LCD implementation which is to be removed. Drop the existing #ifdef and convert it to C code. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
committed by
Anatolij Gustschin
parent
f9b7bd7e91
commit
777f3e3695
@@ -252,21 +252,13 @@ static efi_uintn_t gop_get_bpp(struct efi_gop *this)
|
|||||||
efi_uintn_t vid_bpp = 0;
|
efi_uintn_t vid_bpp = 0;
|
||||||
|
|
||||||
switch (gopobj->bpix) {
|
switch (gopobj->bpix) {
|
||||||
#ifdef CONFIG_DM_VIDEO
|
|
||||||
case VIDEO_BPP32:
|
case VIDEO_BPP32:
|
||||||
#else
|
|
||||||
case LCD_COLOR32:
|
|
||||||
#endif
|
|
||||||
if (gopobj->info.pixel_format == EFI_GOT_BGRA8)
|
if (gopobj->info.pixel_format == EFI_GOT_BGRA8)
|
||||||
vid_bpp = 32;
|
vid_bpp = 32;
|
||||||
else
|
else
|
||||||
vid_bpp = 30;
|
vid_bpp = 30;
|
||||||
break;
|
break;
|
||||||
#ifdef CONFIG_DM_VIDEO
|
|
||||||
case VIDEO_BPP16:
|
case VIDEO_BPP16:
|
||||||
#else
|
|
||||||
case LCD_COLOR16:
|
|
||||||
#endif
|
|
||||||
vid_bpp = 16;
|
vid_bpp = 16;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -476,8 +468,6 @@ efi_status_t efi_gop_register(void)
|
|||||||
u64 fb_base, fb_size;
|
u64 fb_base, fb_size;
|
||||||
void *fb;
|
void *fb;
|
||||||
efi_status_t ret;
|
efi_status_t ret;
|
||||||
|
|
||||||
#ifdef CONFIG_DM_VIDEO
|
|
||||||
struct udevice *vdev;
|
struct udevice *vdev;
|
||||||
struct video_priv *priv;
|
struct video_priv *priv;
|
||||||
|
|
||||||
@@ -495,26 +485,10 @@ efi_status_t efi_gop_register(void)
|
|||||||
fb_base = (uintptr_t)priv->fb;
|
fb_base = (uintptr_t)priv->fb;
|
||||||
fb_size = priv->fb_size;
|
fb_size = priv->fb_size;
|
||||||
fb = priv->fb;
|
fb = priv->fb;
|
||||||
#else
|
|
||||||
int line_len;
|
|
||||||
|
|
||||||
bpix = panel_info.vl_bpix;
|
|
||||||
format = VIDEO_UNKNOWN;
|
|
||||||
col = panel_info.vl_col;
|
|
||||||
row = panel_info.vl_row;
|
|
||||||
fb_base = gd->fb_base;
|
|
||||||
fb_size = lcd_get_size(&line_len);
|
|
||||||
fb = (void*)gd->fb_base;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
switch (bpix) {
|
switch (bpix) {
|
||||||
#ifdef CONFIG_DM_VIDEO
|
|
||||||
case VIDEO_BPP16:
|
case VIDEO_BPP16:
|
||||||
case VIDEO_BPP32:
|
case VIDEO_BPP32:
|
||||||
#else
|
|
||||||
case LCD_COLOR32:
|
|
||||||
case LCD_COLOR16:
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* So far, we only work in 16 or 32 bit mode */
|
/* So far, we only work in 16 or 32 bit mode */
|
||||||
@@ -553,11 +527,7 @@ efi_status_t efi_gop_register(void)
|
|||||||
gopobj->info.version = 0;
|
gopobj->info.version = 0;
|
||||||
gopobj->info.width = col;
|
gopobj->info.width = col;
|
||||||
gopobj->info.height = row;
|
gopobj->info.height = row;
|
||||||
#ifdef CONFIG_DM_VIDEO
|
|
||||||
if (bpix == VIDEO_BPP32)
|
if (bpix == VIDEO_BPP32)
|
||||||
#else
|
|
||||||
if (bpix == LCD_COLOR32)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
if (format == VIDEO_X2R10G10B10) {
|
if (format == VIDEO_X2R10G10B10) {
|
||||||
gopobj->info.pixel_format = EFI_GOT_BITMASK;
|
gopobj->info.pixel_format = EFI_GOT_BITMASK;
|
||||||
|
@@ -326,11 +326,11 @@ efi_status_t efi_init_obj_list(void)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_LCD) || defined(CONFIG_DM_VIDEO)
|
if (IS_ENABLED(CONFIG_DM_VIDEO)) {
|
||||||
ret = efi_gop_register();
|
ret = efi_gop_register();
|
||||||
if (ret != EFI_SUCCESS)
|
if (ret != EFI_SUCCESS)
|
||||||
goto out;
|
goto out;
|
||||||
#endif
|
}
|
||||||
#ifdef CONFIG_NET
|
#ifdef CONFIG_NET
|
||||||
ret = efi_net_register();
|
ret = efi_net_register();
|
||||||
if (ret != EFI_SUCCESS)
|
if (ret != EFI_SUCCESS)
|
||||||
|
Reference in New Issue
Block a user