forked from nuttx/nuttx-update
drivers/video: passthrough unknown ioctl commands for customized scenarios in fb
driver Signed-off-by: rongyichang <rongyichang@xiaomi.com>
This commit is contained in:
parent
7eeba71366
commit
e6490694a1
2 changed files with 13 additions and 2 deletions
|
@ -685,8 +685,15 @@ static int fb_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
|||
break;
|
||||
|
||||
default:
|
||||
gerr("ERROR: Unsupported IOCTL command: %d\n", cmd);
|
||||
ret = -ENOTTY;
|
||||
if (fb->vtable->ioctl != NULL)
|
||||
{
|
||||
ret = fb->vtable->ioctl(fb->vtable, cmd, arg);
|
||||
}
|
||||
else
|
||||
{
|
||||
gerr("ERROR: Unsupported IOCTL command: %d\n", cmd);
|
||||
ret = -ENOTTY;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -793,6 +793,10 @@ struct fb_vtable_s
|
|||
|
||||
int (*setpower)(FAR struct fb_vtable_s *vtable, int power);
|
||||
|
||||
/* Passthrough the unknown ioctl commands. */
|
||||
|
||||
int (*ioctl)(FAR struct fb_vtable_s *vtable, int cmd, unsigned long arg);
|
||||
|
||||
/* Pointer to framebuffer device private data. */
|
||||
|
||||
FAR void *priv;
|
||||
|
|
Loading…
Reference in a new issue