1
0
Fork 0
forked from nuttx/nuttx-update

driver: add GOLDFISH_GPU_FB_PRIORITY for goldfish_gpu_fb_vsync_thread

We need to configure the priority of FB Vsync thread to prevent nxcamera from preempting scheduling without sleep, which currently causes issues with Goldfish x86_64's default FIFO scheduling.

Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
This commit is contained in:
jianglianfang 2024-08-15 14:44:51 +08:00 committed by Xiang Xiao
parent d63056bd72
commit 7db5e6bdb0
2 changed files with 7 additions and 1 deletions

View file

@ -72,6 +72,11 @@ config GOLDFISH_GPU_FB
depends on VIDEO_FB
default n
config GOLDFISH_GPU_FB_PRIORITY
int "Goldfish GPU Framebuffer vsync task priority"
depends on GOLDFISH_GPU_FB
default 100
config GOLDFISH_FB_VIDEO_MODE
bool "Goldfish Framebuffer display mode"
depends on GOLDFISH_FB

View file

@ -568,7 +568,8 @@ int goldfish_gpu_fb_register(int display)
snprintf(arg1, 32, "%p", fb);
argv[0] = arg1;
argv[1] = NULL;
pid = kthread_create("goldfish_gpu_fb_thread", SCHED_PRIORITY_DEFAULT,
pid = kthread_create("goldfish_gpu_fb_thread",
CONFIG_GOLDFISH_GPU_FB_PRIORITY,
CONFIG_DEFAULT_TASK_STACKSIZE,
goldfish_gpu_fb_vsync_thread, argv);
if (pid < 0)