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

Add support to load tegra-drm without any engine
enabled under host1x node.

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

Bug 5055946

Change-Id: I18076391e37e01926b621bb8f3e19f72f62d2533
Signed-off-by: Vamsee Vardhan Thummala <vthummala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3306748
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
This commit is contained in:
Vamsee Vardhan Thummala
2025-02-20 09:43:22 +00:00
committed by Jon Hunter
parent 5e58030479
commit 05fdb35d8e
2 changed files with 14 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2012 Avionic Design GmbH
* Copyright (C) 2012-2024, NVIDIA Corporation
* Copyright (C) 2012-2025, NVIDIA Corporation
*/
#include <nvidia/conftest.h>
@@ -503,6 +503,18 @@ static int host1x_device_add(struct host1x *host1x,
mutex_unlock(&clients_lock);
/*
* Add device even if there are no subdevs to ensure syncpoint functionality
* is available regardless of whether any engine subdevices are present
*/
if (list_empty(&device->subdevs)) {
err = device_add(&device->dev);
if (err < 0)
dev_err(&device->dev, "failed to add device: %d\n", err);
else
device->registered = true;
}
return 0;
}

View File

@@ -1420,6 +1420,7 @@ u64 host1x_get_dma_mask(struct host1x *host1x)
}
EXPORT_SYMBOL(host1x_get_dma_mask);
MODULE_SOFTDEP("post: tegra-drm");
MODULE_AUTHOR("Thierry Reding <thierry.reding@avionic-design.de>");
MODULE_AUTHOR("Terje Bergstrom <tbergstrom@nvidia.com>");
MODULE_DESCRIPTION("Host1x driver for Tegra products");