summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Gaignard <benjamin.gaignard@linaro.org>2014-07-30 13:41:07 +0200
committerBenjamin Gaignard <benjamin.gaignard@linaro.org>2014-07-30 13:42:40 +0200
commit1efd2b768b527facb9240f07ef0b92c008ffebf2 (patch)
treed4b764084d9b9eb2d970d5d949b5ecd1e1291c27
parent6b3c0a3416840d1976d7ffe498da0954a526fee7 (diff)
downloadkernel-drm_kms_for_next-v7.tar.gz
drm: sti: Allow driver to be built as moduledrm_kms_for_next-v7
Adapt Makefile to create one module per hardware device. Add some EXPORT_SYMBOL and MODULE_LICENSE("GPL") to be able install all the modules. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
-rw-r--r--drivers/gpu/drm/sti/Kconfig2
-rw-r--r--drivers/gpu/drm/sti/Makefile26
-rw-r--r--drivers/gpu/drm/sti/sti_compositor.c4
-rw-r--r--drivers/gpu/drm/sti/sti_drm_crtc.c2
-rw-r--r--drivers/gpu/drm/sti/sti_drm_drv.c5
-rw-r--r--drivers/gpu/drm/sti/sti_hda.c10
-rw-r--r--drivers/gpu/drm/sti/sti_hdmi.c10
-rw-r--r--drivers/gpu/drm/sti/sti_tvout.c4
-rw-r--r--drivers/gpu/drm/sti/sti_vtac.c4
-rw-r--r--drivers/gpu/drm/sti/sti_vtg.c10
10 files changed, 57 insertions, 20 deletions
diff --git a/drivers/gpu/drm/sti/Kconfig b/drivers/gpu/drm/sti/Kconfig
index bb4869642f9d..2d9d4252d598 100644
--- a/drivers/gpu/drm/sti/Kconfig
+++ b/drivers/gpu/drm/sti/Kconfig
@@ -1,5 +1,5 @@
config DRM_STI
- bool "DRM Support for STMicroelectronics SoC stiH41x Series"
+ tristate "DRM Support for STMicroelectronics SoC stiH41x Series"
depends on DRM && (SOC_STIH415 || SOC_STIH416 || ARCH_MULTIPLATFORM)
select DRM_KMS_HELPER
select DRM_GEM_CMA_HELPER
diff --git a/drivers/gpu/drm/sti/Makefile b/drivers/gpu/drm/sti/Makefile
index d1045518b7c3..3c864e22423f 100644
--- a/drivers/gpu/drm/sti/Makefile
+++ b/drivers/gpu/drm/sti/Makefile
@@ -1,17 +1,21 @@
-obj-$(CONFIG_DRM_STI) += \
- sti_vtg.o \
- sti_vtac.o \
+sticompositor-y := \
+ sti_layer.o \
+ sti_mixer.o \
+ sti_gdp.o \
+ sti_vid.o \
sti_compositor.o \
- sti_hdmi.o \
+ sti_drm_crtc.o \
+ sti_drm_plane.o
+
+stihdmi-y := sti_hdmi.o \
sti_hdmi_tx3g0c55phy.o \
sti_hdmi_tx3g4c28phy.o \
+
+obj-$(CONFIG_DRM_STI) = \
+ sti_vtg.o \
+ sti_vtac.o \
+ stihdmi.o \
sti_hda.o \
sti_tvout.o \
- sti_drm_crtc.o \
- sti_drm_plane.o \
- sti_hda.o \
- sti_layer.o \
- sti_mixer.o \
- sti_gdp.o \
- sti_vid.o \
+ sticompositor.o \
sti_drm_drv.o
diff --git a/drivers/gpu/drm/sti/sti_compositor.c b/drivers/gpu/drm/sti/sti_compositor.c
index dade64f4f859..5b6872e2a25e 100644
--- a/drivers/gpu/drm/sti/sti_compositor.c
+++ b/drivers/gpu/drm/sti/sti_compositor.c
@@ -262,3 +262,7 @@ static struct platform_driver sti_compositor_driver = {
};
module_platform_driver(sti_compositor_driver);
+
+MODULE_AUTHOR("Benjamin Gaignard <benjamin.gaignard@st.com>");
+MODULE_DESCRIPTION("STMicroelectronics SoC DRM driver");
+MODULE_LICENSE("GPL");
diff --git a/drivers/gpu/drm/sti/sti_drm_crtc.c b/drivers/gpu/drm/sti/sti_drm_crtc.c
index 3a0a0d1f1724..069993e1836a 100644
--- a/drivers/gpu/drm/sti/sti_drm_crtc.c
+++ b/drivers/gpu/drm/sti/sti_drm_crtc.c
@@ -358,6 +358,7 @@ int sti_drm_crtc_enable_vblank(struct drm_device *dev, int crtc)
return 0;
}
+EXPORT_SYMBOL(sti_drm_crtc_enable_vblank);
void sti_drm_crtc_disable_vblank(struct drm_device *dev, int crtc)
{
@@ -381,6 +382,7 @@ void sti_drm_crtc_disable_vblank(struct drm_device *dev, int crtc)
spin_unlock_irqrestore(&dev->event_lock, flags);
}
+EXPORT_SYMBOL(sti_drm_crtc_disable_vblank);
static struct drm_crtc_funcs sti_crtc_funcs = {
.set_config = drm_crtc_helper_set_config,
diff --git a/drivers/gpu/drm/sti/sti_drm_drv.c b/drivers/gpu/drm/sti/sti_drm_drv.c
index efa49cb08333..a7cc24917a96 100644
--- a/drivers/gpu/drm/sti/sti_drm_drv.c
+++ b/drivers/gpu/drm/sti/sti_drm_drv.c
@@ -197,6 +197,7 @@ static int sti_drm_platform_probe(struct platform_device *pdev)
of_platform_populate(node, NULL, NULL, dev);
+ platform_driver_register(&sti_drm_master_driver);
master = platform_device_register_resndata(dev,
DRIVER_NAME "__master", -1,
NULL, 0, NULL, 0);
@@ -213,6 +214,7 @@ static int sti_drm_platform_remove(struct platform_device *pdev)
of_platform_depopulate(&pdev->dev);
platform_device_unregister(master);
+ platform_driver_unregister(&sti_drm_master_driver);
return 0;
}
@@ -233,8 +235,7 @@ static struct platform_driver sti_drm_platform_driver = {
};
module_platform_driver(sti_drm_platform_driver);
-module_platform_driver(sti_drm_master_driver);
MODULE_AUTHOR("Benjamin Gaignard <benjamin.gaignard@st.com>");
MODULE_DESCRIPTION("STMicroelectronics SoC DRM driver");
-MODULE_LICENSE("GPL V2");
+MODULE_LICENSE("GPL");
diff --git a/drivers/gpu/drm/sti/sti_hda.c b/drivers/gpu/drm/sti/sti_hda.c
index ff8cd6f01dd7..72d957f81c05 100644
--- a/drivers/gpu/drm/sti/sti_hda.c
+++ b/drivers/gpu/drm/sti/sti_hda.c
@@ -612,7 +612,7 @@ static void sti_hda_connector_destroy(struct drm_connector *connector)
struct sti_hda_connector *hda_connector
= to_sti_hda_connector(connector);
- drm_sysfs_connector_remove(connector);
+ drm_connector_unregister(connector);
drm_connector_cleanup(connector);
kfree(hda_connector);
}
@@ -678,7 +678,7 @@ static int sti_hda_bind(struct device *dev, struct device *master, void *data)
drm_connector_helper_add(drm_connector,
&sti_hda_connector_helper_funcs);
- err = drm_sysfs_connector_add(drm_connector);
+ err = drm_connector_register(drm_connector);
if (err)
goto err_connector;
@@ -691,7 +691,7 @@ static int sti_hda_bind(struct device *dev, struct device *master, void *data)
return 0;
err_sysfs:
- drm_sysfs_connector_remove(drm_connector);
+ drm_connector_unregister(drm_connector);
err_connector:
drm_bridge_cleanup(bridge);
drm_connector_cleanup(drm_connector);
@@ -788,3 +788,7 @@ struct platform_driver sti_hda_driver = {
};
module_platform_driver(sti_hda_driver);
+
+MODULE_AUTHOR("Benjamin Gaignard <benjamin.gaignard@st.com>");
+MODULE_DESCRIPTION("STMicroelectronics SoC DRM driver");
+MODULE_LICENSE("GPL");
diff --git a/drivers/gpu/drm/sti/sti_hdmi.c b/drivers/gpu/drm/sti/sti_hdmi.c
index 5ecee9c28de5..284e541d970d 100644
--- a/drivers/gpu/drm/sti/sti_hdmi.c
+++ b/drivers/gpu/drm/sti/sti_hdmi.c
@@ -572,7 +572,7 @@ static void sti_hdmi_connector_destroy(struct drm_connector *connector)
struct sti_hdmi_connector *hdmi_connector
= to_sti_hdmi_connector(connector);
- drm_sysfs_connector_remove(connector);
+ drm_connector_unregister(connector);
drm_connector_cleanup(connector);
kfree(hdmi_connector);
}
@@ -643,7 +643,7 @@ static int sti_hdmi_bind(struct device *dev, struct device *master, void *data)
drm_connector_helper_add(drm_connector,
&sti_hdmi_connector_helper_funcs);
- err = drm_sysfs_connector_add(drm_connector);
+ err = drm_connector_register(drm_connector);
if (err)
goto err_connector;
@@ -659,7 +659,7 @@ static int sti_hdmi_bind(struct device *dev, struct device *master, void *data)
return 0;
err_sysfs:
- drm_sysfs_connector_remove(drm_connector);
+ drm_connector_unregister(drm_connector);
err_connector:
drm_bridge_cleanup(bridge);
drm_connector_cleanup(drm_connector);
@@ -804,3 +804,7 @@ struct platform_driver sti_hdmi_driver = {
};
module_platform_driver(sti_hdmi_driver);
+
+MODULE_AUTHOR("Benjamin Gaignard <benjamin.gaignard@st.com>");
+MODULE_DESCRIPTION("STMicroelectronics SoC DRM driver");
+MODULE_LICENSE("GPL");
diff --git a/drivers/gpu/drm/sti/sti_tvout.c b/drivers/gpu/drm/sti/sti_tvout.c
index febd8d85097f..b69e26fee76e 100644
--- a/drivers/gpu/drm/sti/sti_tvout.c
+++ b/drivers/gpu/drm/sti/sti_tvout.c
@@ -642,3 +642,7 @@ struct platform_driver sti_tvout_driver = {
};
module_platform_driver(sti_tvout_driver);
+
+MODULE_AUTHOR("Benjamin Gaignard <benjamin.gaignard@st.com>");
+MODULE_DESCRIPTION("STMicroelectronics SoC DRM driver");
+MODULE_LICENSE("GPL");
diff --git a/drivers/gpu/drm/sti/sti_vtac.c b/drivers/gpu/drm/sti/sti_vtac.c
index 5226a0475e9a..82a51d488434 100644
--- a/drivers/gpu/drm/sti/sti_vtac.c
+++ b/drivers/gpu/drm/sti/sti_vtac.c
@@ -209,3 +209,7 @@ struct platform_driver sti_vtac_driver = {
};
module_platform_driver(sti_vtac_driver);
+
+MODULE_AUTHOR("Benjamin Gaignard <benjamin.gaignard@st.com>");
+MODULE_DESCRIPTION("STMicroelectronics SoC DRM driver");
+MODULE_LICENSE("GPL");
diff --git a/drivers/gpu/drm/sti/sti_vtg.c b/drivers/gpu/drm/sti/sti_vtg.c
index 49f95d4b13b8..740d6e347a62 100644
--- a/drivers/gpu/drm/sti/sti_vtg.c
+++ b/drivers/gpu/drm/sti/sti_vtg.c
@@ -101,6 +101,7 @@ struct sti_vtg *of_vtg_find(struct device_node *np)
}
return NULL;
}
+EXPORT_SYMBOL(of_vtg_find);
static void vtg_reset(struct sti_vtg *vtg)
{
@@ -191,6 +192,7 @@ void sti_vtg_set_config(struct sti_vtg *vtg,
else
vtg_enable_irq(vtg);
}
+EXPORT_SYMBOL(sti_vtg_set_config);
/**
* sti_vtg_get_line_number
@@ -213,6 +215,7 @@ u32 sti_vtg_get_line_number(struct drm_display_mode mode, int y)
return start_line + y;
}
+EXPORT_SYMBOL(sti_vtg_get_line_number);
/**
* sti_vtg_get_pixel_number
@@ -228,6 +231,7 @@ u32 sti_vtg_get_pixel_number(struct drm_display_mode mode, int x)
{
return mode.htotal - mode.hsync_start + x;
}
+EXPORT_SYMBOL(sti_vtg_get_pixel_number);
int sti_vtg_register_client(struct sti_vtg *vtg,
struct notifier_block *nb, int crtc_id)
@@ -238,6 +242,7 @@ int sti_vtg_register_client(struct sti_vtg *vtg,
vtg->crtc_id = crtc_id;
return raw_notifier_chain_register(&vtg->notifier_list, nb);
}
+EXPORT_SYMBOL(sti_vtg_register_client);
int sti_vtg_unregister_client(struct sti_vtg *vtg, struct notifier_block *nb)
{
@@ -246,6 +251,7 @@ int sti_vtg_unregister_client(struct sti_vtg *vtg, struct notifier_block *nb)
return raw_notifier_chain_unregister(&vtg->notifier_list, nb);
}
+EXPORT_SYMBOL(sti_vtg_unregister_client);
static irqreturn_t vtg_irq_thread(int irq, void *arg)
{
@@ -354,3 +360,7 @@ struct platform_driver sti_vtg_driver = {
};
module_platform_driver(sti_vtg_driver);
+
+MODULE_AUTHOR("Benjamin Gaignard <benjamin.gaignard@st.com>");
+MODULE_DESCRIPTION("STMicroelectronics SoC DRM driver");
+MODULE_LICENSE("GPL");