summaryrefslogtreecommitdiffstats
path: root/meta-uhmi/meta-rvgpu/recipes-kernel
diff options
context:
space:
mode:
authorFumiya Kohzu <kohzu.fumiya@jp.panasonic.com>2023-06-22 20:17:58 +0900
committerFumiya Kohzu <kohzu.fumiya@jp.panasonic.com>2023-09-25 10:31:00 +0900
commit951ac4aae235477716db29f1c707a5f0e7edf895 (patch)
tree5f5764b3caf0e3512ad0208e15c7c844b9811cd7 /meta-uhmi/meta-rvgpu/recipes-kernel
parentb3bb5faf49e6a6c4f490f6f842b7e0f13d4a477d (diff)
Unified HMI: initial commit
This is the initial commit for RVGPU of Unified HMI. `Unified HMI` is a common platform that promotes UX innovation in integrated cockpits and enables flexible information display from various applications across multiple displays. `RVGPU` is a client-server based rendering engine that creates 3D commands on a client device, sends them to a server for GPU rendering, and displays the results. - create new layer, meta-uhmi - create sub-layer, meta-rvgpu - add 1 feature to enable basesystem, agl-rvgpu Bug-AGL: SPEC-4744 Change-Id: I9b6f3966e3d5a859787f81c41b584fa686fd1f87 Signed-off-by: Fumiya Kohzu <kohzu.fumiya@jp.panasonic.com>
Diffstat (limited to 'meta-uhmi/meta-rvgpu/recipes-kernel')
-rw-r--r--meta-uhmi/meta-rvgpu/recipes-kernel/linux/linux-common/uinput.cfg2
-rw-r--r--meta-uhmi/meta-rvgpu/recipes-kernel/linux/linux-common/virtio-gpu.cfg1
-rw-r--r--meta-uhmi/meta-rvgpu/recipes-kernel/linux/linux-rvgpu.inc6
-rw-r--r--meta-uhmi/meta-rvgpu/recipes-kernel/linux/linux-yocto_%.bbappend1
-rw-r--r--meta-uhmi/meta-rvgpu/recipes-kernel/virtio-loopback-driver/virtio-loopback-driver.inc6
-rw-r--r--meta-uhmi/meta-rvgpu/recipes-kernel/virtio-loopback-driver/virtio-loopback-driver/0001-Remove-card_index-option.patch70
-rw-r--r--meta-uhmi/meta-rvgpu/recipes-kernel/virtio-loopback-driver/virtio-loopback-driver/Kbuild3
-rw-r--r--meta-uhmi/meta-rvgpu/recipes-kernel/virtio-loopback-driver/virtio-loopback-driver/Makefile.driver17
-rw-r--r--meta-uhmi/meta-rvgpu/recipes-kernel/virtio-loopback-driver/virtio-loopback-driver_git.bb41
9 files changed, 147 insertions, 0 deletions
diff --git a/meta-uhmi/meta-rvgpu/recipes-kernel/linux/linux-common/uinput.cfg b/meta-uhmi/meta-rvgpu/recipes-kernel/linux/linux-common/uinput.cfg
new file mode 100644
index 00000000..fd1f78ea
--- /dev/null
+++ b/meta-uhmi/meta-rvgpu/recipes-kernel/linux/linux-common/uinput.cfg
@@ -0,0 +1,2 @@
+CONFIG_INPUT_UINPUT=y
+CONFIG_INPUT_MISC=y
diff --git a/meta-uhmi/meta-rvgpu/recipes-kernel/linux/linux-common/virtio-gpu.cfg b/meta-uhmi/meta-rvgpu/recipes-kernel/linux/linux-common/virtio-gpu.cfg
new file mode 100644
index 00000000..5db61502
--- /dev/null
+++ b/meta-uhmi/meta-rvgpu/recipes-kernel/linux/linux-common/virtio-gpu.cfg
@@ -0,0 +1 @@
+CONFIG_DRM_VIRTIO_GPU=y
diff --git a/meta-uhmi/meta-rvgpu/recipes-kernel/linux/linux-rvgpu.inc b/meta-uhmi/meta-rvgpu/recipes-kernel/linux/linux-rvgpu.inc
new file mode 100644
index 00000000..b052dfd1
--- /dev/null
+++ b/meta-uhmi/meta-rvgpu/recipes-kernel/linux/linux-rvgpu.inc
@@ -0,0 +1,6 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/linux-common/:"
+
+SRC_URI:append = " \
+ file://virtio-gpu.cfg \
+ file://uinput.cfg \
+"
diff --git a/meta-uhmi/meta-rvgpu/recipes-kernel/linux/linux-yocto_%.bbappend b/meta-uhmi/meta-rvgpu/recipes-kernel/linux/linux-yocto_%.bbappend
new file mode 100644
index 00000000..9dd82e3c
--- /dev/null
+++ b/meta-uhmi/meta-rvgpu/recipes-kernel/linux/linux-yocto_%.bbappend
@@ -0,0 +1 @@
+require linux-rvgpu.inc
diff --git a/meta-uhmi/meta-rvgpu/recipes-kernel/virtio-loopback-driver/virtio-loopback-driver.inc b/meta-uhmi/meta-rvgpu/recipes-kernel/virtio-loopback-driver/virtio-loopback-driver.inc
new file mode 100644
index 00000000..3c21d446
--- /dev/null
+++ b/meta-uhmi/meta-rvgpu/recipes-kernel/virtio-loopback-driver/virtio-loopback-driver.inc
@@ -0,0 +1,6 @@
+PV = "0.0+git${SRCPV}"
+SRCREV = "db18183e68033fd4a6798e8998a5d9a3c6410cfc"
+BRANCH ?= "main"
+SRC_URI = " \
+ git://github.com/unified-hmi/virtio-loopback-driver.git;protocol=https;branch=${BRANCH} \
+"
diff --git a/meta-uhmi/meta-rvgpu/recipes-kernel/virtio-loopback-driver/virtio-loopback-driver/0001-Remove-card_index-option.patch b/meta-uhmi/meta-rvgpu/recipes-kernel/virtio-loopback-driver/virtio-loopback-driver/0001-Remove-card_index-option.patch
new file mode 100644
index 00000000..e20df709
--- /dev/null
+++ b/meta-uhmi/meta-rvgpu/recipes-kernel/virtio-loopback-driver/virtio-loopback-driver/0001-Remove-card_index-option.patch
@@ -0,0 +1,70 @@
+From ba9b19b36f7c7f7df8c4041569f7cef04b2d42da Mon Sep 17 00:00:00 2001
+From: murakami <murakami.kenta002@jp.panasonic.jp>
+Date: Fri, 28 Jul 2023 13:05:19 +0900
+Subject: [PATCH] Remove card_index option
+
+Remove card_index option support from virtio-loopback-driver,
+because the kernel needs to be patched to run that option
+in rvgpu-proxy.
+
+Upstream-Status: Inappropriate [embedded specific]
+---
+ src/virtio_lo.h | 1 -
+ src/virtio_lo_device.c | 1 -
+ src/virtio_lo_device.h | 1 -
+ src/virtio_lo_driver.c | 3 ---
+ 4 files changed, 6 deletions(-)
+
+diff --git a/src/virtio_lo.h b/src/virtio_lo.h
+index a07fa91..0da681e 100644
+--- a/src/virtio_lo.h
++++ b/src/virtio_lo.h
+@@ -25,7 +25,6 @@ struct virtio_lo_devinfo {
+ __u64 features; /* IN/OUT */
+ __u32 config_size; /* IN */
+ __s32 config_kick; /* IN */
+- __s32 card_index; /* IN */
+ __u32 padding; /* IN */
+ __u8 *config; /* IN/OUT */
+ struct virtio_lo_qinfo *qinfo; /* IN/OUT */
+diff --git a/src/virtio_lo_device.c b/src/virtio_lo_device.c
+index 39e8788..22687b7 100644
+--- a/src/virtio_lo_device.c
++++ b/src/virtio_lo_device.c
+@@ -171,7 +171,6 @@ static long vilo_ioctl_adddev(struct virtio_lo_owner *owner,
+
+ dev->device_id = di.device_id;
+ dev->vendor_id = di.vendor_id;
+- dev->card_index = di.card_index;
+ dev->nqueues = di.nqueues;
+ dev->features = dev->device_features = di.features;
+
+diff --git a/src/virtio_lo_device.h b/src/virtio_lo_device.h
+index 2d872a7..bc40b3e 100644
+--- a/src/virtio_lo_device.h
++++ b/src/virtio_lo_device.h
+@@ -25,7 +25,6 @@ struct virtio_lo_device {
+ unsigned idx;
+ u32 device_id;
+ u32 vendor_id;
+- int card_index;
+
+ struct platform_device *pdev;
+
+diff --git a/src/virtio_lo_driver.c b/src/virtio_lo_driver.c
+index 30d1852..d7f517d 100644
+--- a/src/virtio_lo_driver.c
++++ b/src/virtio_lo_driver.c
+@@ -284,9 +284,6 @@ static int virtio_lo_probe(struct platform_device *pdev)
+ vl_driv->device = device;
+ vl_driv->pdev = pdev;
+
+-#ifdef CONFIG_VIRTIO_LO_DEVICE_INDEX
+- vl_driv->vdev.card_index = device->card_index;
+-#endif /* CONFIG_VIRTIO_LO_DEVICE_INDEX */
+ vl_driv->vdev.dev.parent = &pdev->dev;
+ vl_driv->vdev.dev.release = virtio_lo_release_dev_empty;
+ vl_driv->vdev.config = &virtio_lo_config_ops;
+--
+2.17.1
+
diff --git a/meta-uhmi/meta-rvgpu/recipes-kernel/virtio-loopback-driver/virtio-loopback-driver/Kbuild b/meta-uhmi/meta-rvgpu/recipes-kernel/virtio-loopback-driver/virtio-loopback-driver/Kbuild
new file mode 100644
index 00000000..27e54e58
--- /dev/null
+++ b/meta-uhmi/meta-rvgpu/recipes-kernel/virtio-loopback-driver/virtio-loopback-driver/Kbuild
@@ -0,0 +1,3 @@
+# KBuild for virtio-lo
+obj-m += virtio_lo.o
+virtio_lo-y := virtio_lo_device.o virtio_lo_driver.o
diff --git a/meta-uhmi/meta-rvgpu/recipes-kernel/virtio-loopback-driver/virtio-loopback-driver/Makefile.driver b/meta-uhmi/meta-rvgpu/recipes-kernel/virtio-loopback-driver/virtio-loopback-driver/Makefile.driver
new file mode 100644
index 00000000..662c18ea
--- /dev/null
+++ b/meta-uhmi/meta-rvgpu/recipes-kernel/virtio-loopback-driver/virtio-loopback-driver/Makefile.driver
@@ -0,0 +1,17 @@
+#
+# Makefile for virtio-lo
+#
+ifeq ($(KDIR),)
+$(error "KDIR must be specified.")
+endif
+
+default:
+ $(MAKE) -C $(KDIR) M=$$PWD/src
+
+modules_install:
+ $(MAKE) -C $(KDIR) M=$$PWD/src $@
+
+clean:
+ $(MAKE) -C $(KDIR) M=$$PWD/src $@
+
+.PHONY: default modules_install clean
diff --git a/meta-uhmi/meta-rvgpu/recipes-kernel/virtio-loopback-driver/virtio-loopback-driver_git.bb b/meta-uhmi/meta-rvgpu/recipes-kernel/virtio-loopback-driver/virtio-loopback-driver_git.bb
new file mode 100644
index 00000000..687c33dd
--- /dev/null
+++ b/meta-uhmi/meta-rvgpu/recipes-kernel/virtio-loopback-driver/virtio-loopback-driver_git.bb
@@ -0,0 +1,41 @@
+SUMMARY = "Virtio Loopback Driver for Remote virtual display device"
+
+LICENSE = "GPL-2.0-only"
+LIC_FILES_CHKSUM = "file://LICENSE.md;md5=688693ebbe31e3eadf819d7d007fa654"
+
+require virtio-loopback-driver.inc
+
+SRC_URI:append = " \
+ file://0001-Remove-card_index-option.patch \
+ file://Makefile.driver \
+ file://Kbuild \
+"
+
+S = "${WORKDIR}/git"
+EXTRA_OEMAKE = "KDIR=${STAGING_KERNEL_BUILDDIR}"
+MODULES_MODULE_SYMVERS_LOCATION = "src"
+
+inherit module
+
+do_compile:prepend() {
+ cp ${WORKDIR}/Makefile.driver ${S}/Makefile
+ cp ${WORKDIR}/Kbuild ${S}/src/
+}
+
+do_install:append() {
+ install -d ${D}${PKG_CONFIG_SYSTEM_INCLUDE_PATH}/remote-virtio-gpu
+ install -m 755 ${S}/src/virtio_lo.h ${D}${PKG_CONFIG_SYSTEM_INCLUDE_PATH}/remote-virtio-gpu/virtio_lo.h
+}
+
+FILES:${PN} = " \
+ ${libdir}/modules/${KERNEL_VERSION}/extra/virtio_lo* \
+ ${sysconfdir}/modules-load.d \
+"
+
+RPROVIDES:${PN} += " \
+ kernel-module-virtiolo \
+ kernel-module-virtio-lo${KERNEL_MODULE_PACKAGE_SUFFIX} \
+"
+
+# Autoload virtio lo driver
+KERNEL_MODULE_AUTOLOAD:append = " virtio_lo"