efi_uintn_t vid_bpp = 0;
switch (gopobj->bpix) {
-#ifdef CONFIG_DM_VIDEO
case VIDEO_BPP32:
-#else
- case LCD_COLOR32:
-#endif
if (gopobj->info.pixel_format == EFI_GOT_BGRA8)
vid_bpp = 32;
else
vid_bpp = 30;
break;
-#ifdef CONFIG_DM_VIDEO
case VIDEO_BPP16:
-#else
- case LCD_COLOR16:
-#endif
vid_bpp = 16;
break;
}
u64 fb_base, fb_size;
void *fb;
efi_status_t ret;
-
-#ifdef CONFIG_DM_VIDEO
struct udevice *vdev;
struct video_priv *priv;
fb_base = (uintptr_t)priv->fb;
fb_size = priv->fb_size;
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) {
-#ifdef CONFIG_DM_VIDEO
case VIDEO_BPP16:
case VIDEO_BPP32:
-#else
- case LCD_COLOR32:
- case LCD_COLOR16:
-#endif
break;
default:
/* So far, we only work in 16 or 32 bit mode */
gopobj->info.version = 0;
gopobj->info.width = col;
gopobj->info.height = row;
-#ifdef CONFIG_DM_VIDEO
if (bpix == VIDEO_BPP32)
-#else
- if (bpix == LCD_COLOR32)
-#endif
{
if (format == VIDEO_X2R10G10B10) {
gopobj->info.pixel_format = EFI_GOT_BITMASK;
goto out;
}
-#if defined(CONFIG_LCD) || defined(CONFIG_DM_VIDEO)
- ret = efi_gop_register();
- if (ret != EFI_SUCCESS)
- goto out;
-#endif
+ if (IS_ENABLED(CONFIG_DM_VIDEO)) {
+ ret = efi_gop_register();
+ if (ret != EFI_SUCCESS)
+ goto out;
+ }
#ifdef CONFIG_NET
ret = efi_net_register();
if (ret != EFI_SUCCESS)