Skip to content
Snippets Groups Projects
Commit 54788612 authored by Ezequiel Garcia's avatar Ezequiel Garcia
Browse files

SQUASH: drm/ingenic: Fix for module build


Oops! Seems I messed the module build. This commit
should allow that.

Tested on CI20, Samsung HDMI screen.

(Also, wow, modules are broken?)

Module                  Size  Used by
ingenic_drm            13337  -2
dw_hdmi                30579  -2
drm_kms_helper        206229  -2
cfbfillrect             3252  -2
syscopyarea             2722  -2
cfbimgblt               2044  -2
gpio_keys               9862  -2
sysfillrect             3306  -2
sysimgblt               2012  -2
fb_sys_fops             1707  -2
cfbcopyarea             2754  -2
pwm_jz4740              4095  -2
drm                   458664  -2
drm_panel_orientation_quirks      846  -2
firmware_class          6444  -2

Signed-off-by: default avatarEzequiel Garcia <ezequiel@collabora.com>
parent 3e9ca03f
No related branches found
No related tags found
No related merge requests found
......@@ -24,9 +24,12 @@ config DRM_INGENIC_IPU
The Image Processing Unit (IPU) will appear as a second primary plane.
config DRM_DW_HDMI_JZ4780
bool "HDMI Support for Ingenic JZ4780"
config DRM_INGENIC_DW_HDMI
bool "Ingenic specific support for Synopsys DW HDMI"
select DRM_DW_HDMI
help
Choose this option for HDMI output from the Ingenic JZ4780.
Choose this option to enable Synopsys DesignWare HDMI based driver.
If you want to enable HDMI on Ingenic JZ4780 based SoC, you should
select this option..
endif
obj-$(CONFIG_DRM_INGENIC) += ingenic-drm.o
ingenic-drm-y = ingenic-drm-drv.o
ingenic-drm-$(CONFIG_DRM_INGENIC_IPU) += ingenic-ipu.o
ingenic-drm-$(CONFIG_DRM_DW_HDMI_JZ4780) += dw_hdmi-jz4780.o
ingenic-drm-$(CONFIG_DRM_INGENIC_DW_HDMI) += ingenic-dw-hdmi.o
......@@ -1142,13 +1142,31 @@ static int ingenic_drm_init(void)
{
int err;
if (IS_ENABLED(CONFIG_DRM_INGENIC_DW_HDMI)) {
err = platform_driver_register(ingenic_dw_hdmi_driver_ptr);
if (err)
return err;
}
if (IS_ENABLED(CONFIG_DRM_INGENIC_IPU)) {
err = platform_driver_register(ingenic_ipu_driver_ptr);
if (err)
return err;
goto err_hdmi_unreg;
}
return platform_driver_register(&ingenic_drm_driver);
err = platform_driver_register(&ingenic_drm_driver);
if (err)
goto err_ipu_unreg;
return 0;
err_ipu_unreg:
if (IS_ENABLED(CONFIG_DRM_INGENIC_IPU))
platform_driver_unregister(ingenic_ipu_driver_ptr);
err_hdmi_unreg:
if (IS_ENABLED(CONFIG_DRM_INGENIC_DW_HDMI))
platform_driver_unregister(ingenic_dw_hdmi_driver_ptr);
return err;
}
module_init(ingenic_drm_init);
......@@ -1156,6 +1174,8 @@ static void ingenic_drm_exit(void)
{
platform_driver_unregister(&ingenic_drm_driver);
if (IS_ENABLED(CONFIG_DRM_INGENIC_DW_HDMI))
platform_driver_unregister(ingenic_dw_hdmi_driver_ptr);
if (IS_ENABLED(CONFIG_DRM_INGENIC_IPU))
platform_driver_unregister(ingenic_ipu_driver_ptr);
}
......
......@@ -221,5 +221,6 @@ void ingenic_drm_plane_config(struct device *dev,
void ingenic_drm_plane_disable(struct device *dev, struct drm_plane *plane);
extern struct platform_driver *ingenic_ipu_driver_ptr;
extern struct platform_driver *ingenic_dw_hdmi_driver_ptr;
#endif /* DRIVERS_GPU_DRM_INGENIC_INGENIC_DRM_H */
......@@ -13,7 +13,7 @@
#include <drm/bridge/dw_hdmi.h>
#include <drm/drm_of.h>
static const struct dw_hdmi_mpll_config jz4780_mpll_cfg[] = {
static const struct dw_hdmi_mpll_config ingenic_mpll_cfg[] = {
{ 45250000, { { 0x01e0, 0x0000 }, { 0x21e1, 0x0000 }, { 0x41e2, 0x0000 } } },
{ 92500000, { { 0x0140, 0x0005 }, { 0x2141, 0x0005 }, { 0x4142, 0x0005 } } },
{ 148500000, { { 0x00a0, 0x000a }, { 0x20a1, 0x000a }, { 0x40a2, 0x000a } } },
......@@ -21,7 +21,7 @@ static const struct dw_hdmi_mpll_config jz4780_mpll_cfg[] = {
{ ~0UL, { { 0x0000, 0x0000 }, { 0x0000, 0x0000 }, { 0x0000, 0x0000 } } }
};
static const struct dw_hdmi_curr_ctrl jz4780_cur_ctr[] = {
static const struct dw_hdmi_curr_ctrl ingenic_cur_ctr[] = {
/*pixelclk bpp8 bpp10 bpp12 */
{ 54000000, { 0x091c, 0x091c, 0x06dc } },
{ 58400000, { 0x091c, 0x06dc, 0x06dc } },
......@@ -37,14 +37,14 @@ static const struct dw_hdmi_curr_ctrl jz4780_cur_ctr[] = {
* PREEMP config 0.00
* TX/CK level 10
*/
static const struct dw_hdmi_phy_config jz4780_phy_config[] = {
static const struct dw_hdmi_phy_config ingenic_phy_config[] = {
/*pixelclk symbol term vlev */
{ 216000000, 0x800d, 0x0005, 0x01ad},
{ ~0UL, 0x0000, 0x0000, 0x0000}
};
static enum drm_mode_status
jz4780_dw_hdmi_mode_valid(struct dw_hdmi *hdmi, void *data,
ingenic_dw_hdmi_mode_valid(struct dw_hdmi *hdmi, void *data,
const struct drm_display_info *info,
const struct drm_display_mode *mode)
{
......@@ -58,7 +58,7 @@ jz4780_dw_hdmi_mode_valid(struct dw_hdmi *hdmi, void *data,
}
static bool
jz4780_dw_hdmi_mode_fixup(struct drm_bridge *bridge,
ingenic_dw_hdmi_mode_fixup(struct drm_bridge *bridge,
const struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
{
......@@ -68,30 +68,30 @@ jz4780_dw_hdmi_mode_fixup(struct drm_bridge *bridge,
return true;
}
static const struct drm_bridge_timings jz4780_dw_hdmi_timings = {
static const struct drm_bridge_timings ingenic_dw_hdmi_timings = {
.input_bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE,
};
static struct dw_hdmi_plat_data jz4780_dw_hdmi_plat_data = {
.mpll_cfg = jz4780_mpll_cfg,
.cur_ctr = jz4780_cur_ctr,
.phy_config = jz4780_phy_config,
.mode_valid = jz4780_dw_hdmi_mode_valid,
.mode_fixup = jz4780_dw_hdmi_mode_fixup,
.timings = &jz4780_dw_hdmi_timings,
static struct dw_hdmi_plat_data ingenic_dw_hdmi_plat_data = {
.mpll_cfg = ingenic_mpll_cfg,
.cur_ctr = ingenic_cur_ctr,
.phy_config = ingenic_phy_config,
.mode_valid = ingenic_dw_hdmi_mode_valid,
.mode_fixup = ingenic_dw_hdmi_mode_fixup,
.timings = &ingenic_dw_hdmi_timings,
};
static const struct of_device_id jz4780_dw_hdmi_dt_ids[] = {
static const struct of_device_id ingenic_dw_hdmi_dt_ids[] = {
{ .compatible = "ingenic,jz4780-dw-hdmi" },
{ /* Sentinel */ },
};
MODULE_DEVICE_TABLE(of, jz4780_dw_hdmi_dt_ids);
MODULE_DEVICE_TABLE(of, ingenic_dw_hdmi_dt_ids);
static int jz4780_dw_hdmi_probe(struct platform_device *pdev)
static int ingenic_dw_hdmi_probe(struct platform_device *pdev)
{
struct dw_hdmi *hdmi;
hdmi = dw_hdmi_probe(pdev, &jz4780_dw_hdmi_plat_data);
hdmi = dw_hdmi_probe(pdev, &ingenic_dw_hdmi_plat_data);
if (IS_ERR(hdmi))
return PTR_ERR(hdmi);
......@@ -100,7 +100,7 @@ static int jz4780_dw_hdmi_probe(struct platform_device *pdev)
return 0;
}
static int jz4780_dw_hdmi_remove(struct platform_device *pdev)
static int ingenic_dw_hdmi_remove(struct platform_device *pdev)
{
struct dw_hdmi *hdmi = platform_get_drvdata(pdev);
......@@ -109,20 +109,13 @@ static int jz4780_dw_hdmi_remove(struct platform_device *pdev)
return 0;
}
static struct platform_driver jz4780_dw_hdmi_platform_driver = {
.probe = jz4780_dw_hdmi_probe,
.remove = jz4780_dw_hdmi_remove,
static struct platform_driver ingenic_dw_hdmi_driver = {
.probe = ingenic_dw_hdmi_probe,
.remove = ingenic_dw_hdmi_remove,
.driver = {
.name = "dw-hdmi-jz4780",
.of_match_table = jz4780_dw_hdmi_dt_ids,
.name = "dw-hdmi-ingenic",
.of_match_table = ingenic_dw_hdmi_dt_ids,
},
};
module_platform_driver(jz4780_dw_hdmi_platform_driver);
MODULE_AUTHOR("Andy Yan <andy.yan@rock-chips.com>");
MODULE_AUTHOR("Yakir Yang <ykk@rock-chips.com>");
MODULE_AUTHOR("Paul Boddie <paul@boddie.org.uk>");
MODULE_DESCRIPTION("Ingenic JZ4780 DW-HDMI Driver Extension");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:dw-hdmi-jz4780");
struct platform_driver *ingenic_dw_hdmi_driver_ptr = &ingenic_dw_hdmi_driver;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment