All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: tomi.valkeinen@ti.com, airlied@linux.ie,
	laurent.pinchart@ideasonboard.com
Cc: dri-devel@lists.freedesktop.org
Subject: [RFC 6/7] drm/omap: dss: Remove display ordering from dss/display.c
Date: Tue, 29 Aug 2017 10:32:17 +0300	[thread overview]
Message-ID: <20170829073218.11097-7-peter.ujfalusi@ti.com> (raw)
In-Reply-To: <20170829073218.11097-1-peter.ujfalusi@ti.com>

The previous patch implements the ordering of the dss_devices based on DT
aliases in omap_drm.c, so there is no need to do the ordering in
dss/display.c anymore.

At the same time remove the alias member of the omap_dss_device struct
since it is no longer needed. The only place it was used is in the
omapdss_register_display() function.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 drivers/gpu/drm/omapdrm/dss/display.c | 15 +++------------
 drivers/gpu/drm/omapdrm/dss/omapdss.h |  3 ---
 2 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/dss/display.c b/drivers/gpu/drm/omapdrm/dss/display.c
index 42279933790e..0ce18edf6191 100644
--- a/drivers/gpu/drm/omapdrm/dss/display.c
+++ b/drivers/gpu/drm/omapdrm/dss/display.c
@@ -44,7 +44,6 @@ static int disp_num_counter;
 int omapdss_register_display(struct omap_dss_device *dssdev)
 {
 	struct omap_dss_driver *drv = dssdev->driver;
-	struct list_head *cur;
 	int id;
 
 	/*
@@ -55,26 +54,18 @@ int omapdss_register_display(struct omap_dss_device *dssdev)
 	if (id < 0)
 		id = disp_num_counter++;
 
-	snprintf(dssdev->alias, sizeof(dssdev->alias), "display%d", id);
-
 	/* Use 'label' property for name, if it exists */
 	of_property_read_string(dssdev->dev->of_node, "label", &dssdev->name);
 
 	if (dssdev->name == NULL)
-		dssdev->name = dssdev->alias;
+		dssdev->name = devm_kasprintf(dssdev->dev, GFP_KERNEL,
+					      "display%d", id);
 
 	if (drv && drv->get_timings == NULL)
 		drv->get_timings = omapdss_default_get_timings;
 
 	mutex_lock(&panel_list_mutex);
-	list_for_each(cur, &panel_list) {
-		struct omap_dss_device *ldev = list_entry(cur,
-							 struct omap_dss_device,
-							 panel_list);
-		if (strcmp(ldev->alias, dssdev->alias) > 0)
-			break;
-	}
-	list_add_tail(&dssdev->panel_list, cur);
+	list_add_tail(&dssdev->panel_list, &panel_list);
 	mutex_unlock(&panel_list_mutex);
 	return 0;
 }
diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h
index 47a331670963..b206aa092235 100644
--- a/drivers/gpu/drm/omapdrm/dss/omapdss.h
+++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h
@@ -475,9 +475,6 @@ struct omap_dss_device {
 
 	struct list_head panel_list;
 
-	/* alias in the form of "display%d" */
-	char alias[16];
-
 	enum omap_display_type type;
 	enum omap_display_type output_type;
 
-- 
2.14.1


Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki


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

  parent reply	other threads:[~2017-08-29  7:52 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-29  7:32 [RFC 0/7] drm/omap: Module parameter for display order configuration Peter Ujfalusi
2017-08-29  7:32 ` [RFC 1/7] drm/omap: Use devm_kzalloc() to allocate omap_drm_private Peter Ujfalusi
2017-09-01 11:10   ` Laurent Pinchart
2017-09-04  9:13     ` Peter Ujfalusi
2017-09-04  9:41       ` Laurent Pinchart
2017-09-04 11:16         ` Peter Ujfalusi
2017-09-04 14:19           ` Laurent Pinchart
2017-09-05  6:35             ` Peter Ujfalusi
2017-08-29  7:32 ` [RFC 2/7] drm/omap: Allocate drm_device earlier and unref it as last step Peter Ujfalusi
2017-09-01 11:12   ` Laurent Pinchart
2017-08-29  7:32 ` [RFC 3/7] drm/omap: Manage the usable omap_dss_device list within omap_drm_private Peter Ujfalusi
2017-09-01 11:27   ` Laurent Pinchart
2017-09-04  9:19     ` Peter Ujfalusi
2017-09-04  9:45       ` Laurent Pinchart
2017-08-29  7:32 ` [RFC 4/7] drm/omap: Separate the dssdevs array setup from the connect function Peter Ujfalusi
2017-08-29  7:32 ` [RFC 5/7] drm/omap: Do dss_device (display) ordering in omap_drv.c Peter Ujfalusi
2017-09-01 11:32   ` Laurent Pinchart
2017-09-04  9:26     ` Peter Ujfalusi
2017-09-04  9:46       ` Laurent Pinchart
2017-08-29  7:32 ` Peter Ujfalusi [this message]
2017-08-29  7:32 ` [RFC 7/7] drm/omap: Add kernel parameter to specify the desired display order Peter Ujfalusi
2017-09-01 11:36 ` [RFC 0/7] drm/omap: Module parameter for display order configuration Laurent Pinchart
2017-09-04 10:03   ` Peter Ujfalusi
2018-05-25 20:09     ` Laurent Pinchart
2017-10-05  9:56 ` Pekka Paalanen
2017-10-05 10:01   ` Tomi Valkeinen
2017-10-05 10:43     ` Pekka Paalanen
2017-10-05 11:24       ` Tomi Valkeinen
2017-10-05 11:54         ` Pekka Paalanen

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=20170829073218.11097-7-peter.ujfalusi@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --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.