From 18b99f9275cdb2473f52706c0d4d33636e8055c5 Mon Sep 17 00:00:00 2001 From: Fumiya Kohzu Date: Thu, 22 Jun 2023 20:17:58 +0900 Subject: 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 --- .../virtio-loopback-driver.inc | 6 ++ .../0001-Remove-card_index-option.patch | 70 ++++++++++++++++++++++ .../virtio-loopback-driver/Kbuild | 3 + .../virtio-loopback-driver/Makefile.driver | 17 ++++++ .../virtio-loopback-driver_git.bb | 41 +++++++++++++ 5 files changed, 137 insertions(+) create mode 100644 meta-uhmi/meta-rvgpu/recipes-kernel/virtio-loopback-driver/virtio-loopback-driver.inc create mode 100644 meta-uhmi/meta-rvgpu/recipes-kernel/virtio-loopback-driver/virtio-loopback-driver/0001-Remove-card_index-option.patch create mode 100644 meta-uhmi/meta-rvgpu/recipes-kernel/virtio-loopback-driver/virtio-loopback-driver/Kbuild create mode 100644 meta-uhmi/meta-rvgpu/recipes-kernel/virtio-loopback-driver/virtio-loopback-driver/Makefile.driver create mode 100644 meta-uhmi/meta-rvgpu/recipes-kernel/virtio-loopback-driver/virtio-loopback-driver_git.bb (limited to 'meta-uhmi/meta-rvgpu/recipes-kernel/virtio-loopback-driver') 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 +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" -- cgit 1.2.3-korg