mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 13:13:08 +08:00
drivers/virtio: add virtio gpu driver
This patch provides basic framebuffer display support for virtio. Multiple displays are supported. Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
This commit is contained in:
@@ -27,6 +27,12 @@ config DRIVERS_VIRTIO_BLK
|
||||
depends on !DISABLE_MOUNTPOINT
|
||||
default n
|
||||
|
||||
config DRIVERS_VIRTIO_GPU
|
||||
bool "Virtio gpu support"
|
||||
default n
|
||||
depends on VIDEO_FB
|
||||
select FB_UPDATE
|
||||
|
||||
config DRIVERS_VIRTIO_NET
|
||||
bool "Virtio network support"
|
||||
depends on NETDEVICES
|
||||
|
||||
@@ -32,6 +32,10 @@ ifeq ($(CONFIG_DRIVERS_VIRTIO_BLK),y)
|
||||
CSRCS += virtio-blk.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_DRIVERS_VIRTIO_GPU),y)
|
||||
CSRCS += virtio-gpu.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_DRIVERS_VIRTIO_NET),y)
|
||||
CSRCS += virtio-net.c
|
||||
endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -29,6 +29,7 @@
|
||||
#include <nuttx/virtio/virtio.h>
|
||||
|
||||
#include "virtio-blk.h"
|
||||
#include "virtio-gpu.h"
|
||||
#include "virtio-net.h"
|
||||
#include "virtio-rng.h"
|
||||
#include "virtio-serial.h"
|
||||
@@ -125,6 +126,14 @@ void virtio_register_drivers(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DRIVERS_VIRTIO_GPU
|
||||
ret = virtio_register_gpu_driver();
|
||||
if (ret < 0)
|
||||
{
|
||||
vrterr("virtio_register_gpu_driver failed, ret=%d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DRIVERS_VIRTIO_NET
|
||||
ret = virtio_register_net_driver();
|
||||
if (ret < 0)
|
||||
|
||||
Reference in New Issue
Block a user