dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: dri-devel@lists.freedesktop.org
Cc: Marek Vasut <marex@denx.de>,
	robert.chiras@nxp.com, leonard.crestez@nxp.com,
	linux-imx@nxp.com, kernel@pengutronix.de
Subject: [PATCH v3 18/22] drm: mxsfb: Drop non-OF support
Date: Wed, 17 Jun 2020 19:40:11 +0300	[thread overview]
Message-ID: <20200617164015.30448-19-laurent.pinchart@ideasonboard.com> (raw)
In-Reply-To: <20200617164015.30448-1-laurent.pinchart@ideasonboard.com>

The mxsfb driver is only used by OF platforms. Drop non-OF support.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Stefan Agner <stefan@agner.ch>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 drivers/gpu/drm/mxsfb/mxsfb_drv.c | 25 +++++++------------------
 1 file changed, 7 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
index 5dd82e36154d..bb80e12d9120 100644
--- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
+++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
@@ -131,7 +131,8 @@ static int mxsfb_attach_bridge(struct mxsfb_drm_private *mxsfb)
 	return 0;
 }
 
-static int mxsfb_load(struct drm_device *drm, unsigned long flags)
+static int mxsfb_load(struct drm_device *drm,
+		      const struct mxsfb_devdata *devdata)
 {
 	struct platform_device *pdev = to_platform_device(drm->dev);
 	struct mxsfb_drm_private *mxsfb;
@@ -144,7 +145,7 @@ static int mxsfb_load(struct drm_device *drm, unsigned long flags)
 
 	mxsfb->drm = drm;
 	drm->dev_private = mxsfb;
-	mxsfb->devdata = &mxsfb_devdata[pdev->id_entry->driver_data];
+	mxsfb->devdata = devdata;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	mxsfb->base = devm_ioremap_resource(drm->dev, res);
@@ -280,18 +281,10 @@ static struct drm_driver mxsfb_driver = {
 	.minor	= 0,
 };
 
-static const struct platform_device_id mxsfb_devtype[] = {
-	{ .name = "imx23-fb", .driver_data = MXSFB_V3, },
-	{ .name = "imx28-fb", .driver_data = MXSFB_V4, },
-	{ .name = "imx6sx-fb", .driver_data = MXSFB_V6, },
-	{ /* sentinel */ }
-};
-MODULE_DEVICE_TABLE(platform, mxsfb_devtype);
-
 static const struct of_device_id mxsfb_dt_ids[] = {
-	{ .compatible = "fsl,imx23-lcdif", .data = &mxsfb_devtype[0], },
-	{ .compatible = "fsl,imx28-lcdif", .data = &mxsfb_devtype[1], },
-	{ .compatible = "fsl,imx6sx-lcdif", .data = &mxsfb_devtype[2], },
+	{ .compatible = "fsl,imx23-lcdif", .data = &mxsfb_devdata[MXSFB_V3], },
+	{ .compatible = "fsl,imx28-lcdif", .data = &mxsfb_devdata[MXSFB_V4], },
+	{ .compatible = "fsl,imx6sx-lcdif", .data = &mxsfb_devdata[MXSFB_V6], },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, mxsfb_dt_ids);
@@ -306,14 +299,11 @@ static int mxsfb_probe(struct platform_device *pdev)
 	if (!pdev->dev.of_node)
 		return -ENODEV;
 
-	if (of_id)
-		pdev->id_entry = of_id->data;
-
 	drm = drm_dev_alloc(&mxsfb_driver, &pdev->dev);
 	if (IS_ERR(drm))
 		return PTR_ERR(drm);
 
-	ret = mxsfb_load(drm, 0);
+	ret = mxsfb_load(drm, of_id->data);
 	if (ret)
 		goto err_free;
 
@@ -367,7 +357,6 @@ static const struct dev_pm_ops mxsfb_pm_ops = {
 static struct platform_driver mxsfb_platform_driver = {
 	.probe		= mxsfb_probe,
 	.remove		= mxsfb_remove,
-	.id_table	= mxsfb_devtype,
 	.driver	= {
 		.name		= "mxsfb",
 		.of_match_table	= mxsfb_dt_ids,
-- 
Regards,

Laurent Pinchart

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

  parent reply	other threads:[~2020-06-17 16:41 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-17 16:39 [PATCH v3 00/22] drm: mxsfb: Add i.MX7 support Laurent Pinchart
2020-06-17 16:39 ` [PATCH v3 01/22] drm: mxsfb: Remove fbdev leftovers Laurent Pinchart
2020-06-17 16:39 ` [PATCH v3 02/22] drm: mxsfb: Use drm_panel_bridge Laurent Pinchart
2020-06-17 16:39 ` [PATCH v3 03/22] drm: mxsfb: Use BIT() macro to define register bitfields Laurent Pinchart
2020-06-17 16:39 ` [PATCH v3 04/22] drm: mxsfb: Remove unused macros from mxsfb_regs.h Laurent Pinchart
2020-06-17 16:39 ` [PATCH v3 05/22] drm: mxsfb: Clarify format and bus width configuration Laurent Pinchart
2020-06-17 16:39 ` [PATCH v3 06/22] drm: mxsfb: Pass mxsfb_drm_private pointer to mxsfb_reset_block() Laurent Pinchart
2020-06-17 16:40 ` [PATCH v3 07/22] drm: mxsfb: Use LCDC_CTRL register name explicitly Laurent Pinchart
2020-06-17 16:40 ` [PATCH v3 08/22] drm: mxsfb: Remove register definitions from mxsfb_crtc.c Laurent Pinchart
2020-06-17 16:40 ` [PATCH v3 09/22] drm: mxsfb: Remove unneeded includes Laurent Pinchart
2020-06-17 16:40 ` [PATCH v3 10/22] drm: mxsfb: Rename mxsfb_crtc.c to mxsfb_kms.c Laurent Pinchart
2020-06-17 16:40 ` [PATCH v3 11/22] drm: mxsfb: Stop using DRM simple display pipeline helper Laurent Pinchart
2020-06-17 16:40 ` [PATCH v3 12/22] drm: mxsfb: Move vblank event arm to CRTC .atomic_flush() Laurent Pinchart
2020-06-17 16:40 ` [PATCH v3 13/22] drm: mxsfb: Don't touch AXI clock in IRQ context Laurent Pinchart
2020-06-17 16:40 ` [PATCH v3 14/22] drm: mxsfb: Enable vblank handling Laurent Pinchart
2020-06-17 16:40 ` [PATCH v3 15/22] drm: mxsfb: Remove mxsfb_devdata unused fields Laurent Pinchart
2020-06-17 16:40 ` [PATCH v3 16/22] drm: mxsfb: Add i.MX7 and i.MX8M to the list of supported SoCs in Kconfig Laurent Pinchart
2020-06-17 16:40 ` [PATCH v3 17/22] drm: mxsfb: Update internal IP version number for i.MX6SX Laurent Pinchart
2020-06-17 16:40 ` Laurent Pinchart [this message]
2020-06-17 16:40 ` [PATCH v3 19/22] drm: mxsfb: Turn mxsfb_set_pixel_fmt() into a void function Laurent Pinchart
2020-06-17 16:40 ` [PATCH v3 20/22] drm: mxsfb: Merge mxsfb_set_pixel_fmt() and mxsfb_set_bus_fmt() Laurent Pinchart
2020-06-17 16:40 ` [PATCH v3 21/22] drm: mxsfb: Remove unnecessary spaces after tab Laurent Pinchart
2020-06-17 16:40 ` [PATCH v3 22/22] drm: mxsfb: Support the alpha plane Laurent Pinchart

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=20200617164015.30448-19-laurent.pinchart@ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel@pengutronix.de \
    --cc=leonard.crestez@nxp.com \
    --cc=linux-imx@nxp.com \
    --cc=marex@denx.de \
    --cc=robert.chiras@nxp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).