mirror of
https://github.com/apache/nuttx.git
synced 2026-05-29 04:19:37 +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
|
depends on !DISABLE_MOUNTPOINT
|
||||||
default n
|
default n
|
||||||
|
|
||||||
|
config DRIVERS_VIRTIO_GPU
|
||||||
|
bool "Virtio gpu support"
|
||||||
|
default n
|
||||||
|
depends on VIDEO_FB
|
||||||
|
select FB_UPDATE
|
||||||
|
|
||||||
config DRIVERS_VIRTIO_NET
|
config DRIVERS_VIRTIO_NET
|
||||||
bool "Virtio network support"
|
bool "Virtio network support"
|
||||||
depends on NETDEVICES
|
depends on NETDEVICES
|
||||||
|
|||||||
@@ -32,6 +32,10 @@ ifeq ($(CONFIG_DRIVERS_VIRTIO_BLK),y)
|
|||||||
CSRCS += virtio-blk.c
|
CSRCS += virtio-blk.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_DRIVERS_VIRTIO_GPU),y)
|
||||||
|
CSRCS += virtio-gpu.c
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_DRIVERS_VIRTIO_NET),y)
|
ifeq ($(CONFIG_DRIVERS_VIRTIO_NET),y)
|
||||||
CSRCS += virtio-net.c
|
CSRCS += virtio-net.c
|
||||||
endif
|
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 <nuttx/virtio/virtio.h>
|
||||||
|
|
||||||
#include "virtio-blk.h"
|
#include "virtio-blk.h"
|
||||||
|
#include "virtio-gpu.h"
|
||||||
#include "virtio-net.h"
|
#include "virtio-net.h"
|
||||||
#include "virtio-rng.h"
|
#include "virtio-rng.h"
|
||||||
#include "virtio-serial.h"
|
#include "virtio-serial.h"
|
||||||
@@ -125,6 +126,14 @@ void virtio_register_drivers(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#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
|
#ifdef CONFIG_DRIVERS_VIRTIO_NET
|
||||||
ret = virtio_register_net_driver();
|
ret = virtio_register_net_driver();
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user