Commit cdeaeb9d authored by Danilo Krummrich's avatar Danilo Krummrich
Browse files

drm: nova-drm: add initial driver skeleton

Add the initial nova-drm driver skeleton.

nova-drm is connected to nova-core through the auxiliary bus and
implements the DRM parts of the nova driver stack.

For now, it implements the fundamental DRM abstractions, i.e. creates a
DRM device and registers it, exposing a three sample IOCTLs.

  DRM_IOCTL_NOVA_GETPARAM
    - provides the PCI bar size from the bar that maps the GPUs VRAM
      from nova-core

  DRM_IOCTL_NOVA_GEM_CREATE
    - creates a new dummy DRM GEM object and returns a handle

  DRM_IOCTL_NOVA_GEM_INFO
    - provides metadata for the DRM GEM object behind a given handle

I implemented a small userspace test suite [1] that utilizes this
interface.

Link: https://gitlab.freedesktop.org/dakr/drm-test

 [1]
Reviewed-by: default avatarMaxime Ripard <mripard@kernel.org>
Acked-by: default avatarDave Airlie <airlied@redhat.com>
Link: https://lore.kernel.org/r/20250424160452.8070-3-dakr@kernel.org


[ Kconfig: depend on DRM=y rather than just DRM. - Danilo ]
Signed-off-by: default avatarDanilo Krummrich <dakr@kernel.org>
parent e041d81a
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -7594,6 +7594,18 @@ T: git https://gitlab.freedesktop.org/drm/nova.git nova-next
F:	Documentation/gpu/nova/
F:	drivers/gpu/nova-core/
DRM DRIVER FOR NVIDIA GPUS [RUST]
M:	Danilo Krummrich <dakr@kernel.org>
L:	nouveau@lists.freedesktop.org
S:	Supported
Q:	https://patchwork.freedesktop.org/project/nouveau/
B:	https://gitlab.freedesktop.org/drm/nova/-/issues
C:	irc://irc.oftc.net/nouveau
T:	git https://gitlab.freedesktop.org/drm/nova.git nova-next
F:	Documentation/gpu/nova/
F:	drivers/gpu/drm/nova/
F:	include/uapi/drm/nova_drm.h
DRM DRIVER FOR OLIMEX LCD-OLINUXINO PANELS
M:	Stefan Mavrodiev <stefan@olimex.com>
S:	Maintained
+2 −0
Original line number Diff line number Diff line
@@ -343,6 +343,8 @@ source "drivers/gpu/drm/amd/amdgpu/Kconfig"

source "drivers/gpu/drm/nouveau/Kconfig"

source "drivers/gpu/drm/nova/Kconfig"

source "drivers/gpu/drm/i915/Kconfig"

source "drivers/gpu/drm/xe/Kconfig"
+1 −0
Original line number Diff line number Diff line
@@ -176,6 +176,7 @@ obj-$(CONFIG_DRM_VMWGFX)+= vmwgfx/
obj-$(CONFIG_DRM_VGEM)	+= vgem/
obj-$(CONFIG_DRM_VKMS)	+= vkms/
obj-$(CONFIG_DRM_NOUVEAU) +=nouveau/
obj-$(CONFIG_DRM_NOVA) += nova/
obj-$(CONFIG_DRM_EXYNOS) +=exynos/
obj-$(CONFIG_DRM_ROCKCHIP) +=rockchip/
obj-$(CONFIG_DRM_GMA500) += gma500/
+14 −0
Original line number Diff line number Diff line
config DRM_NOVA
	tristate "Nova DRM driver"
	depends on AUXILIARY_BUS
	depends on DRM=y
	depends on PCI
	depends on RUST
	default n
	help
	  Choose this if you want to build the Nova DRM driver for Nvidia
	  GSP-based GPUs.

	  This driver is work in progress and may not be functional.

	  If M is selected, the module will be called nova.
+3 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0

obj-$(CONFIG_DRM_NOVA) += nova.o
Loading