]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/omap: dss: Split omapdss_register_display()
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 2 Mar 2018 00:15:36 +0000 (02:15 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 3 Sep 2018 13:13:26 +0000 (16:13 +0300)
Split the function into omapdss_display_init() to perform
display-specific initialization of the omap_dss_device, and
omapdss_register_display() to register the device. The latter will then
be replaced by more generic registration.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 files changed:
drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c
drivers/gpu/drm/omapdrm/displays/connector-dvi.c
drivers/gpu/drm/omapdrm/displays/connector-hdmi.c
drivers/gpu/drm/omapdrm/displays/panel-dpi.c
drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c
drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c
drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c
drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c
drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c
drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c
drivers/gpu/drm/omapdrm/dss/display.c
drivers/gpu/drm/omapdrm/dss/omapdss.h

index 7d16c320749f556f70c082bd949e805db3bcc976..ae3976a97ce21b1e1a281bbed78e693d9561352a 100644 (file)
@@ -171,6 +171,7 @@ static int tvc_probe(struct platform_device *pdev)
        dssdev->type = OMAP_DISPLAY_TYPE_VENC;
        dssdev->owner = THIS_MODULE;
 
+       omapdss_display_init(dssdev);
        r = omapdss_register_display(dssdev);
        if (r) {
                dev_err(&pdev->dev, "Failed to register panel\n");
index 211d59cf8dcd6bd59e3e0256e0aebf40c2674f69..5e3ef5e9e9f640f96fbb3eeafe5aa44e228af7cf 100644 (file)
@@ -390,6 +390,7 @@ static int dvic_probe(struct platform_device *pdev)
        dssdev->type = OMAP_DISPLAY_TYPE_DVI;
        dssdev->owner = THIS_MODULE;
 
+       omapdss_display_init(dssdev);
        r = omapdss_register_display(dssdev);
        if (r) {
                dev_err(&pdev->dev, "Failed to register panel\n");
index 0998b8715096a64217372ea3de885fa27dcd1cc7..cf64742d864619837fd3f11ac78b920897b97b1d 100644 (file)
@@ -350,6 +350,7 @@ static int hdmic_probe(struct platform_device *pdev)
        dssdev->type = OMAP_DISPLAY_TYPE_HDMI;
        dssdev->owner = THIS_MODULE;
 
+       omapdss_display_init(dssdev);
        r = omapdss_register_display(dssdev);
        if (r) {
                dev_err(&pdev->dev, "Failed to register panel\n");
index 5864e24a6e218280aa629b3536fb49cd2983b69f..c4c529531243c0e4d1bd3ac36789f6c2c8f7cc1b 100644 (file)
@@ -218,6 +218,7 @@ static int panel_dpi_probe(struct platform_device *pdev)
        dssdev->type = OMAP_DISPLAY_TYPE_DPI;
        dssdev->owner = THIS_MODULE;
 
+       omapdss_display_init(dssdev);
        r = omapdss_register_display(dssdev);
        if (r) {
                dev_err(&pdev->dev, "Failed to register panel\n");
index 365ece2927a434475b76c4576c6a1f6a413cc9b9..479ce69fd8d8a4d0f643f9b878941523ceddc6f3 100644 (file)
@@ -1328,6 +1328,7 @@ static int dsicm_probe(struct platform_device *pdev)
        dssdev->caps = OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE |
                OMAP_DSS_DISPLAY_CAP_TEAR_ELIM;
 
+       omapdss_display_init(dssdev);
        r = omapdss_register_display(dssdev);
        if (r) {
                dev_err(dev, "Failed to register panel\n");
index 2e54ac115dbc2070e0d953babff360cdc7c31600..fb0afd5adf48c0ceedd60c66cf966da6f677358e 100644 (file)
@@ -270,6 +270,7 @@ static int lb035q02_panel_spi_probe(struct spi_device *spi)
        dssdev->type = OMAP_DISPLAY_TYPE_DPI;
        dssdev->owner = THIS_MODULE;
 
+       omapdss_display_init(dssdev);
        r = omapdss_register_display(dssdev);
        if (r) {
                dev_err(&spi->dev, "Failed to register panel\n");
index 6f2261ccd442b9e09ad3b877cd90736c0be599bc..6ae1138710320e4df47834efb1f8dbf9564bdc6e 100644 (file)
@@ -293,6 +293,7 @@ static int nec_8048_probe(struct spi_device *spi)
        dssdev->type = OMAP_DISPLAY_TYPE_DPI;
        dssdev->owner = THIS_MODULE;
 
+       omapdss_display_init(dssdev);
        r = omapdss_register_display(dssdev);
        if (r) {
                dev_err(&spi->dev, "Failed to register panel\n");
index 369501251fa92cc1431299ddd221c4ff1813ce48..fb986b58674985818c96bfb60bec7ed707c02b3f 100644 (file)
@@ -269,6 +269,7 @@ static int sharp_ls_probe(struct platform_device *pdev)
        dssdev->type = OMAP_DISPLAY_TYPE_DPI;
        dssdev->owner = THIS_MODULE;
 
+       omapdss_display_init(dssdev);
        r = omapdss_register_display(dssdev);
        if (r) {
                dev_err(&pdev->dev, "Failed to register panel\n");
index 5bfd24c5ad5c3f88e696ce07de92813589e979d8..e110187ff911435b7c0c88f2e0d91ed82fd24d6e 100644 (file)
@@ -800,6 +800,7 @@ static int acx565akm_probe(struct spi_device *spi)
        dssdev->type = OMAP_DISPLAY_TYPE_SDI;
        dssdev->owner = THIS_MODULE;
 
+       omapdss_display_init(dssdev);
        r = omapdss_register_display(dssdev);
        if (r) {
                dev_err(&spi->dev, "Failed to register panel\n");
index 9117c1ba037bcfa62b657da6ab67d086a58f8fbb..c44e1b430a0e777c7a1f9cc15a13c204bdc416d1 100644 (file)
@@ -394,6 +394,7 @@ static int td028ttec1_panel_probe(struct spi_device *spi)
        dssdev->type = OMAP_DISPLAY_TYPE_DPI;
        dssdev->owner = THIS_MODULE;
 
+       omapdss_display_init(dssdev);
        r = omapdss_register_display(dssdev);
        if (r) {
                dev_err(&spi->dev, "Failed to register panel\n");
index 53742a61aa8629ff00266e1a4a043fc4393c0ff5..0cb70abb6e5d87b2996d2fcaba1f1c09d0aba04a 100644 (file)
@@ -537,6 +537,7 @@ static int tpo_td043_probe(struct spi_device *spi)
        dssdev->type = OMAP_DISPLAY_TYPE_DPI;
        dssdev->owner = THIS_MODULE;
 
+       omapdss_display_init(dssdev);
        r = omapdss_register_display(dssdev);
        if (r) {
                dev_err(&spi->dev, "Failed to register panel\n");
index 5df73cd761532dee2aaf61737279b8c689950e13..c641993c7d17acd48830a6881f208a18f16ccb8c 100644 (file)
@@ -32,7 +32,7 @@ static LIST_HEAD(panel_list);
 static DEFINE_MUTEX(panel_list_mutex);
 static int disp_num_counter;
 
-int omapdss_register_display(struct omap_dss_device *dssdev)
+void omapdss_display_init(struct omap_dss_device *dssdev)
 {
        int id;
 
@@ -52,7 +52,11 @@ int omapdss_register_display(struct omap_dss_device *dssdev)
        if (dssdev->name == NULL)
                dssdev->name = devm_kasprintf(dssdev->dev, GFP_KERNEL,
                                              "display%u", id);
+}
+EXPORT_SYMBOL_GPL(omapdss_display_init);
 
+int omapdss_register_display(struct omap_dss_device *dssdev)
+{
        mutex_lock(&panel_list_mutex);
        list_add_tail(&dssdev->panel_list, &panel_list);
        mutex_unlock(&panel_list_mutex);
index 94a3f98bdd3d54ddd0a0b75ab8244290c2693c78..e42821583b914c1d38b76cb1e1ac36ad8d46ae2e 100644 (file)
@@ -487,6 +487,7 @@ static inline bool omapdss_is_initialized(void)
        return !!omapdss_get_dss();
 }
 
+void omapdss_display_init(struct omap_dss_device *dssdev);
 int omapdss_register_display(struct omap_dss_device *dssdev);
 void omapdss_unregister_display(struct omap_dss_device *dssdev);
 #define for_each_dss_display(d) \