Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpu: host1x: Allow loading tegra-drm without enabled engines

Add support to register host1x devices without requiring subdevices.
This ensures syncpoint functionality remains available even when engine
subdevices are not present.

Add softdep for tegra-drm to make userspace interface available
without module autoloading through device tree entries.

Signed-off-by: Vamsee Vardhan Thummala <vthummala@nvidia.com>
[mperttunen@nvidia.com: some rewording]
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20250708-host1x-allow-no-subdevs-v1-1-93c66c251f03@nvidia.com

authored by

Vamsee Vardhan Thummala and committed by
Thierry Reding
fab823d8 63d47cc6

+13
+12
drivers/gpu/host1x/bus.c
··· 471 471 472 472 mutex_unlock(&clients_lock); 473 473 474 + /* 475 + * Add device even if there are no subdevs to ensure syncpoint functionality 476 + * is available regardless of whether any engine subdevices are present 477 + */ 478 + if (list_empty(&device->subdevs)) { 479 + err = device_add(&device->dev); 480 + if (err < 0) 481 + dev_err(&device->dev, "failed to add device: %d\n", err); 482 + else 483 + device->registered = true; 484 + } 485 + 474 486 return 0; 475 487 } 476 488
+1
drivers/gpu/host1x/dev.c
··· 821 821 } 822 822 EXPORT_SYMBOL(host1x_get_dma_mask); 823 823 824 + MODULE_SOFTDEP("post: tegra-drm"); 824 825 MODULE_AUTHOR("Thierry Reding <thierry.reding@avionic-design.de>"); 825 826 MODULE_AUTHOR("Terje Bergstrom <tbergstrom@nvidia.com>"); 826 827 MODULE_DESCRIPTION("Host1x driver for Tegra products");