diff --git a/arch/arm/src/dm320/dm320_framebuffer.c b/arch/arm/src/dm320/dm320_framebuffer.c index 057a4a9d6b..8fd4ec4463 100644 --- a/arch/arm/src/dm320/dm320_framebuffer.c +++ b/arch/arm/src/dm320/dm320_framebuffer.c @@ -1010,10 +1010,11 @@ static int dm320_getvid0planeinfo(FAR struct fb_vtable_s *vtable, int planeno, } #endif - pinfo->fbmem = g_vid0base; - pinfo->fblen = DM320_VID0_FBLEN; - pinfo->stride = DM320_VID0_STRIDE; - pinfo->bpp = DM320_VID0_BPP; + pinfo->fbmem = g_vid0base; + pinfo->fblen = DM320_VID0_FBLEN; + pinfo->stride = DM320_VID0_STRIDE; + pinfo->display = 0; + pinfo->bpp = DM320_VID0_BPP; return OK; } #endif @@ -1056,10 +1057,11 @@ static int dm320_getvid1planeinfo(FAR struct fb_vtable_s *vtable, int planeno, } #endif - pinfo->fbmem = g_vid1base; - pinfo->fblen = DM320_VID1_FBLEN; - pinfo->stride = DM320_VID1_STRIDE; - pinfo->bpp = DM320_VID1_BPP; + pinfo->fbmem = g_vid1base; + pinfo->fblen = DM320_VID1_FBLEN; + pinfo->stride = DM320_VID1_STRIDE; + pinfo->display = 1; + pinfo->bpp = DM320_VID1_BPP; return OK; } #endif @@ -1106,10 +1108,11 @@ static int dm320_getosd0planeinfo(FAR struct fb_vtable_s *vtable, int planeno, } #endif - pinfo->fbmem = g_osd0base; - pinfo->fblen = DM320_OSD0_FBLEN; - pinfo->stride = DM320_OSD0_STRIDE; - pinfo->bpp = DM320_OSD0_BPP; + pinfo->fbmem = g_osd0base; + pinfo->fblen = DM320_OSD0_FBLEN; + pinfo->stride = DM320_OSD0_STRIDE; + pinfo->display = 2; + pinfo->bpp = DM320_OSD0_BPP; return OK; } #endif @@ -1156,10 +1159,11 @@ static int dm320_getosd1planeinfo(FAR struct fb_vtable_s *vtable, int planeno, } #endif - pinfo->fbmem = g_osd1base; - pinfo->fblen = DM320_OSD1_FBLEN; - pinfo->stride = DM320_OSD1_STRIDE; - pinfo->bpp = DM320_OSD1_BPP; + pinfo->fbmem = g_osd1base; + pinfo->fblen = DM320_OSD1_FBLEN; + pinfo->stride = DM320_OSD1_STRIDE; + pinfo->display = 3; + pinfo->bpp = DM320_OSD1_BPP; return OK; } #endif diff --git a/arch/arm/src/lpc17xx/lpc17_lcd.c b/arch/arm/src/lpc17xx/lpc17_lcd.c index f2b892ee4c..79be36191c 100644 --- a/arch/arm/src/lpc17xx/lpc17_lcd.c +++ b/arch/arm/src/lpc17xx/lpc17_lcd.c @@ -153,6 +153,7 @@ static const struct fb_planeinfo_s g_planeinfo = .fbmem = (FAR void *)CONFIG_LPC17_LCD_VRAMBASE, .fblen = LPC17_FBSIZE, .stride = LPC17_STRIDE, + .display = 0, .bpp = LPC17_BPP, }; diff --git a/arch/arm/src/sama5/sam_lcd.c b/arch/arm/src/sama5/sam_lcd.c index f696e71a69..8032bb04f4 100644 --- a/arch/arm/src/sama5/sam_lcd.c +++ b/arch/arm/src/sama5/sam_lcd.c @@ -1122,10 +1122,11 @@ static int sam_base_getplaneinfo(struct fb_vtable_s *vtable, int planeno, gvdbg("vtable=%p planeno=%d pinfo=%p\n", vtable, planeno, pinfo); if (vtable && planeno == 0 && pinfo) { - pinfo->fbmem = (void *)LAYER_BASE.framebuffer; - pinfo->fblen = SAMA5_BASE_FBSIZE; - pinfo->stride = SAMA5_BASE_STRIDE, - pinfo->bpp = LAYER_BASE.bpp; + pinfo->fbmem = (void *)LAYER_BASE.framebuffer; + pinfo->fblen = SAMA5_BASE_FBSIZE; + pinfo->stride = SAMA5_BASE_STRIDE; + pinfo->display = 0; + pinfo->bpp = LAYER_BASE.bpp; return OK; } diff --git a/arch/arm/src/stm32/stm32_dma2d.c b/arch/arm/src/stm32/stm32_dma2d.c index 442b88c3ff..e951e8916d 100644 --- a/arch/arm/src/stm32/stm32_dma2d.c +++ b/arch/arm/src/stm32/stm32_dma2d.c @@ -2047,17 +2047,18 @@ FAR struct dma2d_layer_s *up_dma2dcreatelayer(fb_coord_t width, /* Initialize the videoinfo structure */ - vinfo->fmt = fmt; - vinfo->xres = width; - vinfo->yres = height; - vinfo->nplanes = 1; + vinfo->fmt = fmt; + vinfo->xres = width; + vinfo->yres = height; + vinfo->nplanes = 1; /* Initialize the planeinfo structure */ - pinfo->fbmem = fbmem; - pinfo->fblen = fblen; - pinfo->stride = stride; - pinfo->bpp = bpp; + pinfo->fbmem = fbmem; + pinfo->fblen = fblen; + pinfo->stride = stride; + pinfo->display = 0; + pinfo->bpp = bpp; /* Bind the layer to the identifier */ diff --git a/arch/arm/src/stm32/stm32_ltdc.c b/arch/arm/src/stm32/stm32_ltdc.c index 72bfb53201..8ae8e890fd 100644 --- a/arch/arm/src/stm32/stm32_ltdc.c +++ b/arch/arm/src/stm32/stm32_ltdc.c @@ -735,6 +735,7 @@ static struct stm32_ltdcdev_s g_ltdc = .fbmem = (uint8_t *)STM32_LTDC_BUFFER_L1, .fblen = STM32_L1_FBSIZE, .stride = STM32_L1_STRIDE, + .display = 0, .bpp = STM32_LTDC_L1_BPP }, .vinfo = @@ -761,6 +762,7 @@ static struct stm32_ltdcdev_s g_ltdc = .fbmem = (uint8_t *)STM32_LTDC_BUFFER_L2, .fblen = STM32_L2_FBSIZE, .stride = STM32_L2_STRIDE, + .display = 1, .bpp = STM32_LTDC_L2_BPP }, .vinfo = diff --git a/arch/sim/src/board_lcd.c b/arch/sim/src/board_lcd.c index 94d0d6af87..3760aa195e 100644 --- a/arch/sim/src/board_lcd.c +++ b/arch/sim/src/board_lcd.c @@ -196,20 +196,21 @@ static uint8_t g_runbuffer[FB_STRIDE]; static const struct fb_videoinfo_s g_videoinfo = { - .fmt = FB_FMT, /* Color format: RGB16-565: RRRR RGGG GGGB BBBB */ - .xres = CONFIG_SIM_FBWIDTH, /* Horizontal resolution in pixel columns */ - .yres = CONFIG_SIM_FBHEIGHT, /* Vertical resolution in pixel rows */ - .nplanes = 1, /* Number of color planes supported */ + .fmt = FB_FMT, /* Color format: RGB16-565: RRRR RGGG GGGB BBBB */ + .xres = CONFIG_SIM_FBWIDTH, /* Horizontal resolution in pixel columns */ + .yres = CONFIG_SIM_FBHEIGHT, /* Vertical resolution in pixel rows */ + .nplanes = 1, /* Number of color planes supported */ }; /* This is the standard, NuttX Plane information object */ static const struct lcd_planeinfo_s g_planeinfo = { - .putrun = sim_putrun, /* Put a run into LCD memory */ - .getrun = sim_getrun, /* Get a run from LCD memory */ - .buffer = (FAR uint8_t *)g_runbuffer, /* Run scratch buffer */ - .bpp = CONFIG_SIM_FBBPP, /* Bits-per-pixel */ + .putrun = sim_putrun, /* Put a run into LCD memory */ + .getrun = sim_getrun, /* Get a run from LCD memory */ + .buffer = (FAR uint8_t *)g_runbuffer, /* Run scratch buffer */ + .display = 0, /* Display number */ + .bpp = CONFIG_SIM_FBBPP, /* Bits-per-pixel */ }; /* This is the standard, NuttX LCD driver object */ diff --git a/arch/sim/src/up_framebuffer.c b/arch/sim/src/up_framebuffer.c index 406f49ab22..847fcd0b6a 100644 --- a/arch/sim/src/up_framebuffer.c +++ b/arch/sim/src/up_framebuffer.c @@ -137,6 +137,7 @@ static const struct fb_planeinfo_s g_planeinfo = .fbmem = (FAR void *)&g_fb, .fblen = FB_SIZE, .stride = FB_WIDTH, + .display = 0, .bpp = CONFIG_SIM_FBBPP, }; #else diff --git a/arch/x86/src/qemu/qemu_vga.c b/arch/x86/src/qemu/qemu_vga.c index 78cec8121c..ec56c8aaa8 100644 --- a/arch/x86/src/qemu/qemu_vga.c +++ b/arch/x86/src/qemu/qemu_vga.c @@ -368,10 +368,11 @@ static int vga_getvideoinfo(FAR struct lcd_dev_s *dev, static int vga_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, FAR struct lcd_planeinfo_s *pinfo) { - pinfo->putrun = vga_putrun; /* Put a run into LCD memory */ - pinfo->getrun = vga_getrun; /* Get a run from LCD memory */ - pinfo->buffer = g_runbuffer; /* Run scratch buffer */ - pinfo->bpp = VGA_BPP; /* Bits-per-pixel */ + pinfo->putrun = vga_putrun; /* Put a run into LCD memory */ + pinfo->getrun = vga_getrun; /* Get a run from LCD memory */ + pinfo->buffer = g_runbuffer; /* Run scratch buffer */ + pinfo->display = 0; + pinfo->bpp = VGA_BPP; /* Bits-per-pixel */ return OK; } diff --git a/configs/compal_e99/src/ssd1783.c b/configs/compal_e99/src/ssd1783.c index c2e203d0d0..e33cbd4f80 100644 --- a/configs/compal_e99/src/ssd1783.c +++ b/configs/compal_e99/src/ssd1783.c @@ -148,7 +148,8 @@ static uint16_t g_runbuffer[LCD_XRES]; /* This structure describes the overall LCD video controller */ static const struct fb_videoinfo_s g_videoinfo = -{ .fmt = LCD_COLORFMT, /* Color format: RGB16-565: RRRR RGGG GGGB BBBB */ +{ + .fmt = LCD_COLORFMT, /* Color format: RGB16-565: RRRR RGGG GGGB BBBB */ .xres = LCD_XRES, /* Horizontal resolution in pixel columns */ .yres = LCD_YRES, /* Vertical resolutiSend a command list to the LCD panelon in pixel rows */ .nplanes = 1, /* Number of color planes supported */ @@ -157,7 +158,8 @@ static const struct fb_videoinfo_s g_videoinfo = /* This is the standard, NuttX Plane information object */ static const struct lcd_planeinfo_s g_planeinfo = -{ .putrun = lcd_putrun, /* Put a run into LCD memory */ +{ + .putrun = lcd_putrun, /* Put a run into LCD memory */ // .getrun = lcd_getrun, /* Get a run from LCD memory */ .buffer = (uint8_t*) g_runbuffer, /* Run scratch buffer */ .bpp = LCD_BPP, /* Bits-per-pixel */ @@ -166,7 +168,8 @@ static const struct lcd_planeinfo_s g_planeinfo = /* This is the standard, NuttX LCD driver object */ static struct ssd1783_dev_s g_lcddev = -{ .dev = +{ + .dev = { /* LCD Configuration */ diff --git a/include/nuttx/video/fb.h b/include/nuttx/video/fb.h index 287bddb22a..da702b31fc 100644 --- a/include/nuttx/video/fb.h +++ b/include/nuttx/video/fb.h @@ -218,6 +218,7 @@ struct fb_planeinfo_s FAR void *fbmem; /* Start of frame buffer memory */ uint32_t fblen; /* Length of frame buffer memory in bytes */ fb_coord_t stride; /* Length of a line in bytes */ + uint8_t display; /* Display number */ uint8_t bpp; /* Bits per pixel */ };