feat: driver: support double buffer for display
add pan display for fb driver. reference links: https://github.com/torvalds/linux/blob/master/drivers/video/fbdev/core/fbmem.c https://github.com/torvalds/linux/blob/master/drivers/video/fbdev/goldfishfb.c Signed-off-by: liushuai25 <liushuai25@xiaomi.com> Update include/nuttx/video/fb.h Co-authored-by: Gustavo Henrique Nihei <38959758+gustavonihei@users.noreply.github.com> Update include/nuttx/video/fb.h Co-authored-by: Gustavo Henrique Nihei <38959758+gustavonihei@users.noreply.github.com>
This commit is contained in:
parent
cf6dcbc6fd
commit
6c374fc06c
@ -554,6 +554,17 @@ static int fb_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
}
|
||||
break;
|
||||
|
||||
case FBIOPAN_DISPLAY:
|
||||
{
|
||||
FAR struct fb_planeinfo_s *pinfo =
|
||||
(FAR struct fb_planeinfo_s *)((uintptr_t)arg);
|
||||
|
||||
DEBUGASSERT(pinfo != NULL && fb->vtable != NULL &&
|
||||
fb->vtable->pandisplay != NULL);
|
||||
ret = fb->vtable->pandisplay(fb->vtable, pinfo);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
gerr("ERROR: Unsupported IOCTL command: %d\n", cmd);
|
||||
ret = -ENOTTY;
|
||||
|
@ -283,6 +283,10 @@
|
||||
#define FBIOGET_FRAMERATE _FBIOC(0x0015) /* Get frame rate
|
||||
* Argument: int* */
|
||||
|
||||
#define FBIOPAN_DISPLAY _FBIOC(0x0016) /* Pan display
|
||||
* Argument: read-only struct
|
||||
* fb_planeinfo_s* */
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
@ -315,11 +319,15 @@ struct fb_videoinfo_s
|
||||
|
||||
struct fb_planeinfo_s
|
||||
{
|
||||
FAR void *fbmem; /* Start of frame buffer memory */
|
||||
size_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 */
|
||||
FAR void *fbmem; /* Start of frame buffer memory */
|
||||
size_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 */
|
||||
uint32_t xres_virtual; /* Virtual Horizontal resolution in pixel columns */
|
||||
uint32_t yres_virtual; /* Virtual Vertical resolution in pixel rows */
|
||||
uint32_t xoffset; /* Offset from virtual to visible resolution */
|
||||
uint32_t yoffset; /* Offset from virtual to visible resolution */
|
||||
};
|
||||
|
||||
/* This structure describes an area. */
|
||||
@ -584,6 +592,11 @@ struct fb_vtable_s
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Pan display for multiple buffers. */
|
||||
|
||||
int (*pandisplay)(FAR struct fb_vtable_s *vtable,
|
||||
FAR struct fb_planeinfo_s *pinfo);
|
||||
|
||||
/* Specific Controls ******************************************************/
|
||||
|
||||
/* Set the frequency of the framebuffer update panel (0: disable refresh) */
|
||||
|
Loading…
Reference in New Issue
Block a user