drm/nouveau: merge nouveau_platform.ko into nouveau.ko
Having the two modules separated causes various unneeded complications, including having to export symbols accessed between the modules. Make things simpler by compiling platform device support into nouveau.ko. Platform device support remains optional and is only compiled on Tegra. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Reviewed-by: Vince Hsu <vinceh@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
4dc63933ea
commit
055a65d598
5 changed files with 14 additions and 11 deletions
|
@ -26,7 +26,7 @@ config DRM_NOUVEAU
|
||||||
Choose this option for open-source NVIDIA support.
|
Choose this option for open-source NVIDIA support.
|
||||||
|
|
||||||
config NOUVEAU_PLATFORM_DRIVER
|
config NOUVEAU_PLATFORM_DRIVER
|
||||||
tristate "Nouveau (NVIDIA) SoC GPUs"
|
bool "Nouveau (NVIDIA) SoC GPUs"
|
||||||
depends on DRM_NOUVEAU && ARCH_TEGRA
|
depends on DRM_NOUVEAU && ARCH_TEGRA
|
||||||
default y
|
default y
|
||||||
help
|
help
|
||||||
|
|
|
@ -394,8 +394,7 @@ nouveau-$(CONFIG_ACPI) += nouveau_acpi.o
|
||||||
endif
|
endif
|
||||||
nouveau-$(CONFIG_DRM_NOUVEAU_BACKLIGHT) += nouveau_backlight.o
|
nouveau-$(CONFIG_DRM_NOUVEAU_BACKLIGHT) += nouveau_backlight.o
|
||||||
nouveau-$(CONFIG_DEBUG_FS) += nouveau_debugfs.o
|
nouveau-$(CONFIG_DEBUG_FS) += nouveau_debugfs.o
|
||||||
|
nouveau-$(CONFIG_NOUVEAU_PLATFORM_DRIVER) += nouveau_platform.o
|
||||||
|
|
||||||
obj-$(CONFIG_DRM_NOUVEAU)+= nouveau.o
|
obj-$(CONFIG_DRM_NOUVEAU)+= nouveau.o
|
||||||
|
|
||||||
# platform driver
|
|
||||||
obj-$(CONFIG_NOUVEAU_PLATFORM_DRIVER) += nouveau_platform.o
|
|
||||||
|
|
|
@ -52,6 +52,7 @@
|
||||||
#include "nouveau_debugfs.h"
|
#include "nouveau_debugfs.h"
|
||||||
#include "nouveau_usif.h"
|
#include "nouveau_usif.h"
|
||||||
#include "nouveau_connector.h"
|
#include "nouveau_connector.h"
|
||||||
|
#include "nouveau_platform.h"
|
||||||
|
|
||||||
MODULE_PARM_DESC(config, "option string to pass to driver core");
|
MODULE_PARM_DESC(config, "option string to pass to driver core");
|
||||||
static char *nouveau_config;
|
static char *nouveau_config;
|
||||||
|
@ -533,7 +534,6 @@ nouveau_drm_device_remove(struct drm_device *dev)
|
||||||
nouveau_object_ref(NULL, &device);
|
nouveau_object_ref(NULL, &device);
|
||||||
nouveau_object_debug();
|
nouveau_object_debug();
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(nouveau_drm_device_remove);
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nouveau_drm_remove(struct pci_dev *pdev)
|
nouveau_drm_remove(struct pci_dev *pdev)
|
||||||
|
@ -1083,7 +1083,6 @@ err_free:
|
||||||
|
|
||||||
return ERR_PTR(err);
|
return ERR_PTR(err);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(nouveau_platform_device_create_);
|
|
||||||
|
|
||||||
static int __init
|
static int __init
|
||||||
nouveau_drm_init(void)
|
nouveau_drm_init(void)
|
||||||
|
@ -1105,6 +1104,10 @@ nouveau_drm_init(void)
|
||||||
if (!nouveau_modeset)
|
if (!nouveau_modeset)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
#ifdef CONFIG_NOUVEAU_PLATFORM_DRIVER
|
||||||
|
platform_driver_register(&nouveau_platform_driver);
|
||||||
|
#endif
|
||||||
|
|
||||||
nouveau_register_dsm_handler();
|
nouveau_register_dsm_handler();
|
||||||
return drm_pci_init(&driver_pci, &nouveau_drm_pci_driver);
|
return drm_pci_init(&driver_pci, &nouveau_drm_pci_driver);
|
||||||
}
|
}
|
||||||
|
@ -1117,6 +1120,10 @@ nouveau_drm_exit(void)
|
||||||
|
|
||||||
drm_pci_exit(&driver_pci, &nouveau_drm_pci_driver);
|
drm_pci_exit(&driver_pci, &nouveau_drm_pci_driver);
|
||||||
nouveau_unregister_dsm_handler();
|
nouveau_unregister_dsm_handler();
|
||||||
|
|
||||||
|
#ifdef CONFIG_NOUVEAU_PLATFORM_DRIVER
|
||||||
|
platform_driver_unregister(&nouveau_platform_driver);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
module_init(nouveau_drm_init);
|
module_init(nouveau_drm_init);
|
||||||
|
|
|
@ -177,9 +177,3 @@ struct platform_driver nouveau_platform_driver = {
|
||||||
.probe = nouveau_platform_probe,
|
.probe = nouveau_platform_probe,
|
||||||
.remove = nouveau_platform_remove,
|
.remove = nouveau_platform_remove,
|
||||||
};
|
};
|
||||||
|
|
||||||
module_platform_driver(nouveau_platform_driver);
|
|
||||||
|
|
||||||
MODULE_AUTHOR(DRIVER_AUTHOR);
|
|
||||||
MODULE_DESCRIPTION(DRIVER_DESC);
|
|
||||||
MODULE_LICENSE("GPL and additional rights");
|
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
struct reset_control;
|
struct reset_control;
|
||||||
struct clk;
|
struct clk;
|
||||||
struct regulator;
|
struct regulator;
|
||||||
|
struct platform_driver;
|
||||||
|
|
||||||
struct nouveau_platform_gpu {
|
struct nouveau_platform_gpu {
|
||||||
struct reset_control *rst;
|
struct reset_control *rst;
|
||||||
|
@ -48,4 +49,6 @@ struct nouveau_platform_device {
|
||||||
#define nv_device_to_platform(d) \
|
#define nv_device_to_platform(d) \
|
||||||
container_of(d, struct nouveau_platform_device, device)
|
container_of(d, struct nouveau_platform_device, device)
|
||||||
|
|
||||||
|
extern struct platform_driver nouveau_platform_driver;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue