1
0
Fork 0
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:
rongyichang 2023-02-10 18:39:23 +08:00 committed by Xiang Xiao
parent 7eeba71366
commit e6490694a1
2 changed files with 13 additions and 2 deletions

View file

@ -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;
}

View file

@ -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;