All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gustavo Padovan <gustavo@padovan.org>
To: linux-samsung-soc@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org, inki.dae@samsung.com,
	jy0922.shim@samsung.com, tjakobi@math.uni-bielefeld.de,
	Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Subject: [PATCH 04/11] drm/exynos: simplify calculation of possible CRTCs
Date: Mon,  3 Aug 2015 16:09:51 -0300	[thread overview]
Message-ID: <1438628998-3435-5-git-send-email-gustavo@padovan.org> (raw)
In-Reply-To: <1438628998-3435-1-git-send-email-gustavo@padovan.org>

From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

All CRTCs can only be LCD, HDMI or VIDI, so basically all CRTCs will be a
possible CRTCs. This patch removes an extra function with switch that was
only checking if the CRTC type was one of those three above.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
 drivers/gpu/drm/exynos/exynos_drm_encoder.c | 29 +++++------------------------
 1 file changed, 5 insertions(+), 24 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.c b/drivers/gpu/drm/exynos/exynos_drm_encoder.c
index 0aa4a58..7ba3a2d 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_encoder.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.c
@@ -105,36 +105,17 @@ static struct drm_encoder_funcs exynos_encoder_funcs = {
 	.destroy = exynos_drm_encoder_destroy,
 };
 
-static unsigned int exynos_drm_encoder_clones(struct drm_encoder *encoder)
+void exynos_drm_encoder_setup(struct drm_device *dev)
 {
-	struct drm_encoder *clone;
-	struct drm_device *dev = encoder->dev;
-	struct exynos_drm_encoder *exynos_encoder = to_exynos_encoder(encoder);
-	struct exynos_drm_display *display = exynos_encoder->display;
+	struct drm_encoder *encoder;
 	unsigned int clone_mask = 0;
 	int cnt = 0;
 
-	list_for_each_entry(clone, &dev->mode_config.encoder_list, head) {
-		switch (display->type) {
-		case EXYNOS_DISPLAY_TYPE_LCD:
-		case EXYNOS_DISPLAY_TYPE_HDMI:
-		case EXYNOS_DISPLAY_TYPE_VIDI:
-			clone_mask |= (1 << (cnt++));
-			break;
-		default:
-			continue;
-		}
-	}
-
-	return clone_mask;
-}
-
-void exynos_drm_encoder_setup(struct drm_device *dev)
-{
-	struct drm_encoder *encoder;
+	list_for_each_entry(encoder, &dev->mode_config.encoder_list, head)
+		clone_mask |= (1 << (cnt++));
 
 	list_for_each_entry(encoder, &dev->mode_config.encoder_list, head)
-		encoder->possible_clones = exynos_drm_encoder_clones(encoder);
+		encoder->possible_clones = clone_mask;
 }
 
 struct drm_encoder *
-- 
2.1.0

  parent reply	other threads:[~2015-08-03 19:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-03 19:09 [PATCH 00/11] drm/exynos: remove exynos_drm_display and exynos_drm_encoder Gustavo Padovan
2015-08-03 19:09 ` [PATCH 01/11] drm/exynos: split display's .dpms() into .enable() and .disable() Gustavo Padovan
2015-08-03 19:09 ` [PATCH 02/11] drm/exynos: remove wrappers for phy_power_{on,off} Gustavo Padovan
2015-08-03 19:09 ` [PATCH 03/11] drm/exynos: remove unused .remove() and .check_mode() ops from display Gustavo Padovan
2015-08-03 19:09 ` Gustavo Padovan [this message]
2015-08-03 19:09 ` [PATCH 05/11] drm/exynos: remove struct exynos_drm_display Gustavo Padovan
2015-08-03 19:09 ` [PATCH 06/11] drm/exynos: remove extra call to hdmi_commit() Gustavo Padovan
2015-08-03 19:09 ` [PATCH 07/11] drm/exynos: remove extra call to exynos_dp_commit() Gustavo Padovan
2015-08-03 19:09 ` [PATCH 08/11] drm/exynos: remove exynos_encoder's .commit() op Gustavo Padovan
2015-08-03 19:09 ` [PATCH 09/11] drm/exynos: remove exynos_drm_create_enc_conn() Gustavo Padovan
2015-08-04  9:41   ` Inki Dae
2015-08-03 19:09 ` [PATCH 10/11] drm/exynos: fold encoder setup into exynos_drm_load() Gustavo Padovan
2015-08-03 19:09 ` [PATCH 11/11] drm/exynos: remove struct exynos_drm_encoder layer Gustavo Padovan
2015-08-04  9:53   ` Inki Dae
2015-08-04 14:47     ` Gustavo Padovan
2015-08-05  1:31       ` Inki Dae
2015-08-05 13:43         ` Gustavo Padovan

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=1438628998-3435-5-git-send-email-gustavo@padovan.org \
    --to=gustavo@padovan.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavo.padovan@collabora.co.uk \
    --cc=inki.dae@samsung.com \
    --cc=jy0922.shim@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=tjakobi@math.uni-bielefeld.de \
    /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.