All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: dri-devel@lists.freedesktop.org
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Subject: [PATCH v2 49/49] drm/omap: Remove panel-dpi driver
Date: Fri, 11 Jan 2019 05:51:20 +0200	[thread overview]
Message-ID: <20190111035120.20668-50-laurent.pinchart@ideasonboard.com> (raw)
In-Reply-To: <20190111035120.20668-1-laurent.pinchart@ideasonboard.com>

Panels are now supported through the drm_panel infrastructure, remove
the omapdrm-specific driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 drivers/gpu/drm/omapdrm/displays/Kconfig      |   6 -
 drivers/gpu/drm/omapdrm/displays/Makefile     |   1 -
 drivers/gpu/drm/omapdrm/displays/panel-dpi.c  | 199 ------------------
 .../gpu/drm/omapdrm/dss/omapdss-boot-init.c   |   1 -
 4 files changed, 207 deletions(-)
 delete mode 100644 drivers/gpu/drm/omapdrm/displays/panel-dpi.c

diff --git a/drivers/gpu/drm/omapdrm/displays/Kconfig b/drivers/gpu/drm/omapdrm/displays/Kconfig
index 38d066ac966e..7b0bcb494b5c 100644
--- a/drivers/gpu/drm/omapdrm/displays/Kconfig
+++ b/drivers/gpu/drm/omapdrm/displays/Kconfig
@@ -22,12 +22,6 @@ config DRM_OMAP_CONNECTOR_ANALOG_TV
 	help
 	  Driver for a generic analog TV connector.
 
-config DRM_OMAP_PANEL_DPI
-	tristate "Generic DPI panel"
-	depends on BACKLIGHT_CLASS_DEVICE
-	help
-	  Driver for generic DPI panels.
-
 config DRM_OMAP_PANEL_DSI_CM
 	tristate "Generic DSI Command Mode Panel"
 	depends on BACKLIGHT_CLASS_DEVICE
diff --git a/drivers/gpu/drm/omapdrm/displays/Makefile b/drivers/gpu/drm/omapdrm/displays/Makefile
index da1d5321ef50..1db34d4fed64 100644
--- a/drivers/gpu/drm/omapdrm/displays/Makefile
+++ b/drivers/gpu/drm/omapdrm/displays/Makefile
@@ -3,7 +3,6 @@ obj-$(CONFIG_DRM_OMAP_ENCODER_OPA362) += encoder-opa362.o
 obj-$(CONFIG_DRM_OMAP_ENCODER_TPD12S015) += encoder-tpd12s015.o
 obj-$(CONFIG_DRM_OMAP_CONNECTOR_HDMI) += connector-hdmi.o
 obj-$(CONFIG_DRM_OMAP_CONNECTOR_ANALOG_TV) += connector-analog-tv.o
-obj-$(CONFIG_DRM_OMAP_PANEL_DPI) += panel-dpi.o
 obj-$(CONFIG_DRM_OMAP_PANEL_DSI_CM) += panel-dsi-cm.o
 obj-$(CONFIG_DRM_OMAP_PANEL_SONY_ACX565AKM) += panel-sony-acx565akm.o
 obj-$(CONFIG_DRM_OMAP_PANEL_LGPHILIPS_LB035Q02) += panel-lgphilips-lb035q02.o
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c
deleted file mode 100644
index 389ae2821222..000000000000
--- a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * Generic MIPI DPI Panel Driver
- *
- * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
- * Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published by
- * the Free Software Foundation.
- */
-
-#include <linux/gpio/consumer.h>
-#include <linux/module.h>
-#include <linux/platform_device.h>
-#include <linux/slab.h>
-#include <linux/of.h>
-#include <linux/regulator/consumer.h>
-#include <linux/backlight.h>
-
-#include <video/of_display_timing.h>
-
-#include "../dss/omapdss.h"
-
-struct panel_drv_data {
-	struct omap_dss_device dssdev;
-
-	struct videomode vm;
-
-	struct backlight_device *backlight;
-
-	struct gpio_desc *enable_gpio;
-	struct regulator *vcc_supply;
-};
-
-#define to_panel_data(p) container_of(p, struct panel_drv_data, dssdev)
-
-static int panel_dpi_connect(struct omap_dss_device *src,
-			     struct omap_dss_device *dst)
-{
-	return 0;
-}
-
-static void panel_dpi_disconnect(struct omap_dss_device *src,
-				 struct omap_dss_device *dst)
-{
-}
-
-static void panel_dpi_enable(struct omap_dss_device *dssdev)
-{
-	struct panel_drv_data *ddata = to_panel_data(dssdev);
-	int r;
-
-	r = regulator_enable(ddata->vcc_supply);
-	if (r)
-		return;
-
-	gpiod_set_value_cansleep(ddata->enable_gpio, 1);
-	backlight_enable(ddata->backlight);
-}
-
-static void panel_dpi_disable(struct omap_dss_device *dssdev)
-{
-	struct panel_drv_data *ddata = to_panel_data(dssdev);
-
-	backlight_disable(ddata->backlight);
-
-	gpiod_set_value_cansleep(ddata->enable_gpio, 0);
-	regulator_disable(ddata->vcc_supply);
-}
-
-static int panel_dpi_get_modes(struct omap_dss_device *dssdev,
-			       struct drm_connector *connector)
-{
-	struct panel_drv_data *ddata = to_panel_data(dssdev);
-
-	return omapdss_display_get_modes(connector, &ddata->vm);
-}
-
-static const struct omap_dss_device_ops panel_dpi_ops = {
-	.connect	= panel_dpi_connect,
-	.disconnect	= panel_dpi_disconnect,
-
-	.enable		= panel_dpi_enable,
-	.disable	= panel_dpi_disable,
-
-	.get_modes	= panel_dpi_get_modes,
-};
-
-static int panel_dpi_probe_of(struct platform_device *pdev)
-{
-	struct panel_drv_data *ddata = platform_get_drvdata(pdev);
-	struct device_node *node = pdev->dev.of_node;
-	int r;
-	struct display_timing timing;
-	struct gpio_desc *gpio;
-
-	gpio = devm_gpiod_get_optional(&pdev->dev, "enable", GPIOD_OUT_LOW);
-	if (IS_ERR(gpio))
-		return PTR_ERR(gpio);
-
-	ddata->enable_gpio = gpio;
-
-	/*
-	 * Many different panels are supported by this driver and there are
-	 * probably very different needs for their reset pins in regards to
-	 * timing and order relative to the enable gpio. So for now it's just
-	 * ensured that the reset line isn't active.
-	 */
-	gpio = devm_gpiod_get_optional(&pdev->dev, "reset", GPIOD_OUT_LOW);
-	if (IS_ERR(gpio))
-		return PTR_ERR(gpio);
-
-	ddata->vcc_supply = devm_regulator_get(&pdev->dev, "vcc");
-	if (IS_ERR(ddata->vcc_supply))
-		return PTR_ERR(ddata->vcc_supply);
-
-	ddata->backlight = devm_of_find_backlight(&pdev->dev);
-
-	if (IS_ERR(ddata->backlight))
-		return PTR_ERR(ddata->backlight);
-
-	r = of_get_display_timing(node, "panel-timing", &timing);
-	if (r) {
-		dev_err(&pdev->dev, "failed to get video timing\n");
-		return r;
-	}
-
-	videomode_from_timing(&timing, &ddata->vm);
-
-	return 0;
-}
-
-static int panel_dpi_probe(struct platform_device *pdev)
-{
-	struct panel_drv_data *ddata;
-	struct omap_dss_device *dssdev;
-	int r;
-
-	ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL);
-	if (ddata == NULL)
-		return -ENOMEM;
-
-	platform_set_drvdata(pdev, ddata);
-
-	r = panel_dpi_probe_of(pdev);
-	if (r)
-		return r;
-
-	dssdev = &ddata->dssdev;
-	dssdev->dev = &pdev->dev;
-	dssdev->ops = &panel_dpi_ops;
-	dssdev->type = OMAP_DISPLAY_TYPE_DPI;
-	dssdev->display = true;
-	dssdev->owner = THIS_MODULE;
-	dssdev->of_ports = BIT(0);
-	dssdev->ops_flags = OMAP_DSS_DEVICE_OP_MODES;
-	drm_bus_flags_from_videomode(&ddata->vm, &dssdev->bus_flags);
-
-	omapdss_display_init(dssdev);
-	omapdss_device_register(dssdev);
-
-	return 0;
-}
-
-static int __exit panel_dpi_remove(struct platform_device *pdev)
-{
-	struct panel_drv_data *ddata = platform_get_drvdata(pdev);
-	struct omap_dss_device *dssdev = &ddata->dssdev;
-
-	omapdss_device_unregister(dssdev);
-
-	if (omapdss_device_is_enabled(dssdev))
-		panel_dpi_disable(dssdev);
-
-	return 0;
-}
-
-static const struct of_device_id panel_dpi_of_match[] = {
-	{ .compatible = "omapdss,panel-dpi", },
-	{},
-};
-
-MODULE_DEVICE_TABLE(of, panel_dpi_of_match);
-
-static struct platform_driver panel_dpi_driver = {
-	.probe = panel_dpi_probe,
-	.remove = __exit_p(panel_dpi_remove),
-	.driver = {
-		.name = "panel-dpi",
-		.of_match_table = panel_dpi_of_match,
-		.suppress_bind_attrs = true,
-	},
-};
-
-module_platform_driver(panel_dpi_driver);
-
-MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@ti.com>");
-MODULE_DESCRIPTION("Generic MIPI DPI Panel Driver");
-MODULE_LICENSE("GPL");
diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c b/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c
index dfeaea639920..2b41c75ce988 100644
--- a/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c
+++ b/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c
@@ -189,7 +189,6 @@ static const struct of_device_id omapdss_of_fixups_whitelist[] __initconst = {
 	{ .compatible = "hdmi-connector" },
 	{ .compatible = "lgphilips,lb035q02" },
 	{ .compatible = "nec,nl8048hl11" },
-	{ .compatible = "panel-dpi" },
 	{ .compatible = "panel-dsi-cm" },
 	{ .compatible = "sharp,ls037v7dw01" },
 	{ .compatible = "sony,acx565akm" },
-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2019-01-11  3:52 UTC|newest]

Thread overview: 85+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-11  3:50 [PATCH v2 00/49] omapdrm: drm_bridge and drm_panel support Laurent Pinchart
2019-01-11  3:50 ` [PATCH v2 01/49] drm/atomic: Constify mode argument to mode_valid_path() Laurent Pinchart
2019-01-14 11:10   ` Tomi Valkeinen
2019-02-09  2:01   ` Sebastian Reichel
2019-01-11  3:50 ` [PATCH v2 02/49] drm/omap: dsi: Fix crash in DSI debug dumps Laurent Pinchart
2019-01-11  3:50 ` [PATCH v2 03/49] drm/omap: dsi: Fix OF platform depopulate Laurent Pinchart
2019-01-14 11:40   ` Tomi Valkeinen
2019-01-14 14:32     ` Laurent Pinchart
2019-02-09  2:03   ` Sebastian Reichel
2019-01-11  3:50 ` [PATCH v2 04/49] drm/omap: dsi: Hack-fix DSI bus flags Laurent Pinchart
2019-02-09  2:04   ` Sebastian Reichel
2019-01-11  3:50 ` [PATCH v2 05/49] drm/omap: Remove declaration of nonexisting function Laurent Pinchart
2019-01-14 11:48   ` Tomi Valkeinen
2019-01-11  3:50 ` [PATCH v2 06/49] drm/omap: Remove unused kobj field from struct omap_dss_device Laurent Pinchart
2019-01-14 11:49   ` Tomi Valkeinen
2019-01-11  3:50 ` [PATCH v2 07/49] drm/omap: venc: Remove wss_data field from venc_device structure Laurent Pinchart
2019-01-14 11:50   ` Tomi Valkeinen
2019-01-11  3:50 ` [PATCH v2 08/49] drm/omap: Use atomic suspend/resume helpers Laurent Pinchart
2019-01-14 12:13   ` Tomi Valkeinen
2019-01-11  3:50 ` [PATCH v2 09/49] drm/omap: Move common display enable/disable code to encoder Laurent Pinchart
2019-01-11  3:50 ` [PATCH v2 10/49] drm/omap: Remove connection checks from internal encoders .enable() Laurent Pinchart
2019-01-11  3:50 ` [PATCH v2 11/49] drm/omap: Remove connection checks from display .enable() and .remove() Laurent Pinchart
2019-01-11  3:50 ` [PATCH v2 12/49] drm/omap: Remove enable " Laurent Pinchart
2019-01-11  3:50 ` [PATCH v2 13/49] drm/omap: Reverse direction of the DSS device enable/disable operations Laurent Pinchart
2019-01-11  3:50 ` [PATCH v2 14/49] drm/omap: Remove omap_dss_device dst field Laurent Pinchart
2019-01-11  3:50 ` [PATCH v2 15/49] drm/omap: Factor out common init/cleanup code for output devices Laurent Pinchart
2019-01-11  3:50 ` [PATCH v2 16/49] drm/omap: Expose DRM modes instead of timings in display devices Laurent Pinchart
2019-01-11  3:50 ` [PATCH v2 17/49] drm/omap: Merge display .get_modes() and .get_size() operations Laurent Pinchart
2019-01-11  3:50 ` [PATCH v2 18/49] drm/omap: Add a dss device operation flag for .get_modes() Laurent Pinchart
2019-01-11  3:50 ` [PATCH v2 19/49] drm/omap: venc: List both PAL and NTSC modes Laurent Pinchart
2019-01-11  3:50 ` [PATCH v2 20/49] drm/omap: Don't pass display pointer to encoder init function Laurent Pinchart
2019-01-11  3:50 ` [PATCH v2 21/49] drm/omap: Move display alias ID to omap_drm_pipeline Laurent Pinchart
2019-01-11  3:50 ` [PATCH v2 22/49] drm/omap: Don't store display pointer in omap_connector structure Laurent Pinchart
2019-01-11  3:50 ` [PATCH v2 23/49] drm/omap: panel-dsi-cm: Store source pointer internally Laurent Pinchart
2019-01-11  3:50 ` [PATCH v2 24/49] drm/omap: Notify all devices in the pipeline of output disconnection Laurent Pinchart
2019-01-11  3:50 ` [PATCH v2 25/49] drm/omap: Remove src field from omap_dss_device structure Laurent Pinchart
2019-01-11  3:50 ` [PATCH v2 26/49] drm/omap: Move DISPC timing checks to CRTC .mode_valid() operation Laurent Pinchart
2019-01-11  3:50 ` [PATCH v2 27/49] drm/omap: venc: Simplify mode setting by caching configuration Laurent Pinchart
2019-01-11  3:50 ` [PATCH v2 28/49] drm/omap: Factor out common mode validation code Laurent Pinchart
2019-01-11  3:51 ` [PATCH v2 29/49] drm/omap: Pass drm_display_mode to .check_timings() and .set_timings() Laurent Pinchart
2019-02-09  2:33   ` Sebastian Reichel
2019-01-11  3:51 ` [PATCH v2 30/49] drm/omap: venc: Use drm_display_mode natively Laurent Pinchart
2019-01-11  3:51 ` [PATCH v2 31/49] drm/omap: Store pixel clock instead of full mode in DPI and SDI encoders Laurent Pinchart
2019-01-11  3:51 ` [PATCH v2 32/49] drm/omap: Simplify OF lookup of DSS devices Laurent Pinchart
2019-01-11  3:51 ` [PATCH v2 33/49] drm/omap: Refactor initialization sequence Laurent Pinchart
2019-01-11  3:51 ` [PATCH v2 34/49] drm/omap: Merge omap_dss_device type and output_type fields Laurent Pinchart
2019-01-11  3:51 ` [PATCH v2 35/49] drm: Clarify definition of the DRM_BUS_FLAG_(PIXDATA|SYNC)_* macros Laurent Pinchart
2019-01-11  8:47   ` Stefan Agner
2019-01-11  9:23   ` Daniel Vetter
2019-01-12  1:13     ` Laurent Pinchart
2019-01-11  3:51 ` [PATCH v2 36/49] drm: Use new DRM_BUS_FLAG_*_(DRIVE|SAMPLE)_(POS|NEG)EDGE flags Laurent Pinchart
2019-01-11  8:53   ` Stefan Agner
2019-01-11  3:51 ` [PATCH v2 37/49] drm/bridge: use bus flags in bridge timings Laurent Pinchart
2019-01-11  3:51 ` [PATCH v2 38/49] dt-bindings: display: tfp410: Add bus parameters properties Laurent Pinchart
2019-01-15 21:37   ` Rob Herring
2019-01-11  3:51 ` [PATCH v2 39/49] drm/bridge: ti-tfp410: Set connector type based on DT connector node Laurent Pinchart
2019-01-11  3:51 ` [PATCH v2 40/49] drm/bridge: ti-tfp410: Add support for the powerdown GPIO Laurent Pinchart
2019-01-11  3:51 ` [PATCH v2 41/49] drm/bridge: ti-tfp410: Report input bus config through bridge timings Laurent Pinchart
2019-01-11  3:51 ` [PATCH v2 42/49] dt-bindings: Add vendor prefix for OSD Displays Laurent Pinchart
2019-01-14 12:15   ` Tomi Valkeinen
2019-01-15 21:38   ` Rob Herring
2019-01-11  3:51 ` [PATCH v2 43/49] dt-bindings: display: Add OSD Displays OSD070T1718-19TS panel binding Laurent Pinchart
2019-01-14 12:15   ` Tomi Valkeinen
2019-01-15 21:39   ` Rob Herring
2019-02-08 11:19     ` [PATCH v2.1 " Laurent Pinchart
2019-02-25 23:27       ` Rob Herring
2019-01-11  3:51 ` [PATCH v2 44/49] drm/panel: simple: Add OSD070T1718-19TS panel support Laurent Pinchart
2019-01-14 12:15   ` Tomi Valkeinen
2019-01-11  3:51 ` [PATCH v2 45/49] drm/omap: Add support for drm_bridge Laurent Pinchart
2019-01-18 10:33   ` Tomi Valkeinen
2019-02-08 15:20     ` Laurent Pinchart
2019-02-11  9:32       ` Tomi Valkeinen
2019-02-09  2:00   ` Sebastian Reichel
2019-02-09  3:26   ` Sebastian Reichel
2019-02-11  7:50   ` [PATCH v2.1 " Laurent Pinchart
2019-01-11  3:51 ` [PATCH v2 46/49] drm/omap: Add support for drm_panel Laurent Pinchart
2019-02-09  3:26   ` Sebastian Reichel
2019-01-11  3:51 ` [PATCH v2 47/49] drm/omap: Whitelist DT nodes to fixup with omapdss, prefix Laurent Pinchart
2019-02-09  3:26   ` Sebastian Reichel
2019-01-11  3:51 ` [PATCH v2 48/49] drm/omap: Remove TFP410 and DVI connector drivers Laurent Pinchart
2019-02-09  3:26   ` Sebastian Reichel
2019-01-11  3:51 ` Laurent Pinchart [this message]
2019-02-09  3:27   ` [PATCH v2 49/49] drm/omap: Remove panel-dpi driver Sebastian Reichel
2019-02-06 11:41 ` [PATCH v2 00/49] omapdrm: drm_bridge and drm_panel support Tomi Valkeinen
2019-02-09  3:32 ` Sebastian Reichel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190111035120.20668-50-laurent.pinchart@ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=tomi.valkeinen@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.