From edf6adc35741ffad97d2a2fe911f9eb70b3db82e Mon Sep 17 00:00:00 2001 From: Omar Nemri Date: Mon, 19 Aug 2024 10:02:56 -0700 Subject: [PATCH] gpu: host1x-nvhost: export nvhost_get_host1x_device API Export the API, that can be used by other modules, for retrieving the host1x platform_device data for the right host1x instance. Bug 4793553 Jira HOSTX-5414 Signed-off-by: Santosh BS Change-Id: Iadfb9f1f28468a4ff470ea505512a27f9092e2f2 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3196481 GVS: buildbot_gerritrpt Reviewed-by: Mikko Perttunen --- drivers/gpu/host1x-nvhost/nvhost.c | 3 ++- include/linux/nvhost.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/host1x-nvhost/nvhost.c b/drivers/gpu/host1x-nvhost/nvhost.c index 8f7f71da..178b5eeb 100644 --- a/drivers/gpu/host1x-nvhost/nvhost.c +++ b/drivers/gpu/host1x-nvhost/nvhost.c @@ -81,7 +81,7 @@ struct platform_device *nvhost_get_default_device(void) } EXPORT_SYMBOL(nvhost_get_default_device); -static struct platform_device *nvhost_get_host1x_device(int instance) +struct platform_device *nvhost_get_host1x_device(int instance) { struct platform_device *host1x_pdev; struct device_node *np; @@ -98,6 +98,7 @@ static struct platform_device *nvhost_get_host1x_device(int instance) return NULL; } +EXPORT_SYMBOL(nvhost_get_host1x_device); struct host1x *nvhost_get_host1x(struct platform_device *client_pdev) { diff --git a/include/linux/nvhost.h b/include/linux/nvhost.h index 7bfad65f..3a4d9fbc 100644 --- a/include/linux/nvhost.h +++ b/include/linux/nvhost.h @@ -185,6 +185,7 @@ int nvhost_flcn_finalize_poweron(struct platform_device *dev); /* public api to return platform_device ptr to the default host1x instance */ struct platform_device *nvhost_get_default_device(void); +struct platform_device *nvhost_get_host1x_device(int instance); /* common runtime pm and power domain APIs */ int nvhost_module_init(struct platform_device *ndev);