From 7db5e6bdb0bff46ee9aefada08f0db7688922b69 Mon Sep 17 00:00:00 2001 From: jianglianfang Date: Thu, 15 Aug 2024 14:44:51 +0800 Subject: [PATCH] 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 --- drivers/video/Kconfig | 5 +++++ drivers/video/goldfish_gpu_fb.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 1b9fb92840c..b33401a55dd 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -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 diff --git a/drivers/video/goldfish_gpu_fb.c b/drivers/video/goldfish_gpu_fb.c index 83e204a0721..0457189c036 100644 --- a/drivers/video/goldfish_gpu_fb.c +++ b/drivers/video/goldfish_gpu_fb.c @@ -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)