LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
To: Sebastian Reichel <sre@kernel.org>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	Tony Lindgren <tony@atomide.com>, Pavel Machek <pavel@ucw.cz>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel@collabora.com,
	Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Subject: [PATCHv3 4/8] drm/omap: make omap_framebuffer_get_next_connector static
Date: Fri, 30 Mar 2018 19:18:18 +0200	[thread overview]
Message-ID: <20180330171822.25896-5-sebastian.reichel@collabora.co.uk> (raw)
In-Reply-To: <20180330171822.25896-1-sebastian.reichel@collabora.co.uk>

omap_framebuffer_get_next_connector() is only required within omap_fb,
so let's make it static. The function had to be moved before the first
(and only) user.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
---
 drivers/gpu/drm/omapdrm/omap_fb.c | 54 +++++++++++++++++++--------------------
 drivers/gpu/drm/omapdrm/omap_fb.h |  2 --
 2 files changed, 27 insertions(+), 29 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/omap_fb.c b/drivers/gpu/drm/omapdrm/omap_fb.c
index b65212c9a423..3f0b1f976691 100644
--- a/drivers/gpu/drm/omapdrm/omap_fb.c
+++ b/drivers/gpu/drm/omapdrm/omap_fb.c
@@ -95,6 +95,33 @@ static void omap_framebuffer_destroy(struct drm_framebuffer *fb)
 	kfree(omap_fb);
 }
 
+/* iterate thru all the connectors, returning ones that are attached
+ * to the same fb..
+ */
+static struct drm_connector *omap_framebuffer_get_next_connector(
+		struct drm_framebuffer *fb, struct drm_connector *from)
+{
+	struct drm_device *dev = fb->dev;
+	struct list_head *connector_list = &dev->mode_config.connector_list;
+	struct drm_connector *connector = from;
+
+	if (!from)
+		return list_first_entry_or_null(connector_list, typeof(*from),
+						head);
+
+	list_for_each_entry_from(connector, connector_list, head) {
+		if (connector != from) {
+			struct drm_encoder *encoder = connector->encoder;
+			struct drm_crtc *crtc = encoder ? encoder->crtc : NULL;
+			if (crtc && crtc->primary->fb == fb)
+				return connector;
+
+		}
+	}
+
+	return NULL;
+}
+
 static int omap_framebuffer_dirty(struct drm_framebuffer *fb,
 				  struct drm_file *file_priv,
 				  unsigned flags, unsigned color,
@@ -329,33 +356,6 @@ void omap_framebuffer_unpin(struct drm_framebuffer *fb)
 	mutex_unlock(&omap_fb->lock);
 }
 
-/* iterate thru all the connectors, returning ones that are attached
- * to the same fb..
- */
-struct drm_connector *omap_framebuffer_get_next_connector(
-		struct drm_framebuffer *fb, struct drm_connector *from)
-{
-	struct drm_device *dev = fb->dev;
-	struct list_head *connector_list = &dev->mode_config.connector_list;
-	struct drm_connector *connector = from;
-
-	if (!from)
-		return list_first_entry_or_null(connector_list, typeof(*from),
-						head);
-
-	list_for_each_entry_from(connector, connector_list, head) {
-		if (connector != from) {
-			struct drm_encoder *encoder = connector->encoder;
-			struct drm_crtc *crtc = encoder ? encoder->crtc : NULL;
-			if (crtc && crtc->primary->fb == fb)
-				return connector;
-
-		}
-	}
-
-	return NULL;
-}
-
 #ifdef CONFIG_DEBUG_FS
 void omap_framebuffer_describe(struct drm_framebuffer *fb, struct seq_file *m)
 {
diff --git a/drivers/gpu/drm/omapdrm/omap_fb.h b/drivers/gpu/drm/omapdrm/omap_fb.h
index 94ad5f9e4404..c20cb4bc714d 100644
--- a/drivers/gpu/drm/omapdrm/omap_fb.h
+++ b/drivers/gpu/drm/omapdrm/omap_fb.h
@@ -38,8 +38,6 @@ int omap_framebuffer_pin(struct drm_framebuffer *fb);
 void omap_framebuffer_unpin(struct drm_framebuffer *fb);
 void omap_framebuffer_update_scanout(struct drm_framebuffer *fb,
 		struct drm_plane_state *state, struct omap_overlay_info *info);
-struct drm_connector *omap_framebuffer_get_next_connector(
-		struct drm_framebuffer *fb, struct drm_connector *from);
 bool omap_framebuffer_supports_rotation(struct drm_framebuffer *fb);
 void omap_framebuffer_describe(struct drm_framebuffer *fb, struct seq_file *m);
 
-- 
2.16.2

  parent reply	other threads:[~2018-03-30 17:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-30 17:18 [PATCHv3 0/8] omapdrm: DSI command mode panel support Sebastian Reichel
2018-03-30 17:18 ` [PATCHv3 1/8] drm/omap: add framedone interrupt support Sebastian Reichel
2018-03-30 17:18 ` [PATCHv3 2/8] drm/omap: add manual update detection helper Sebastian Reichel
2018-03-30 17:18 ` [PATCHv3 3/8] drm/omap: add support for manually updated displays Sebastian Reichel
2018-04-20  7:09   ` Tomi Valkeinen
2018-04-20  8:11     ` Daniel Vetter
2018-04-20 10:19     ` Daniel Stone
2018-04-20 14:25       ` Tony Lindgren
2018-04-20 14:39         ` Daniel Stone
2018-04-20 14:44           ` Tony Lindgren
2018-03-30 17:18 ` Sebastian Reichel [this message]
2018-03-30 17:18 ` [PATCHv3 5/8] dt-bindings: panel: common: document orientation property Sebastian Reichel
2018-04-03 10:49   ` Pavel Machek
2018-04-09 20:29   ` Rob Herring
2018-03-30 17:18 ` [PATCHv3 6/8] drm/omap: add support for rotation hints from display drivers Sebastian Reichel
2018-03-30 17:18 ` [PATCHv3 7/8] drm/omap: panel-dsi-cm: add rotation support Sebastian Reichel
2018-04-03 10:49   ` Pavel Machek
2018-03-30 17:18 ` [PATCHv3 8/8] ARM: dts: omap4-droid4: Add LCD panel rotation property Sebastian Reichel
2018-04-03 10:49   ` Pavel Machek

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=20180330171822.25896-5-sebastian.reichel@collabora.co.uk \
    --to=sebastian.reichel@collabora.co.uk \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel@collabora.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pavel@ucw.cz \
    --cc=robh+dt@kernel.org \
    --cc=sre@kernel.org \
    --cc=tomi.valkeinen@ti.com \
    --cc=tony@atomide.com \
    --subject='Re: [PATCHv3 4/8] drm/omap: make omap_framebuffer_get_next_connector static' \
    /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

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).