All of lore.kernel.org
 help / color / mirror / Atom feed
From: Inki Dae <inki.dae@samsung.com>
To: airlied@linux.ie, dri-devel@lists.freedesktop.org
Cc: kyungmin.park@samsung.com
Subject: [PATCH 07/13] drm/exynos: control display power at connector module.
Date: Fri, 17 Aug 2012 18:50:53 +0900	[thread overview]
Message-ID: <1345197059-25583-8-git-send-email-inki.dae@samsung.com> (raw)
In-Reply-To: <1345197059-25583-1-git-send-email-inki.dae@samsung.com>

it doesn't need that display power is controlled by encoder's dpms so
moves it into connector module so that the display power can be controlled
by connector's dpms propely.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 drivers/gpu/drm/exynos/exynos_drm_connector.c |   11 ++++++++++-
 drivers/gpu/drm/exynos/exynos_drm_encoder.c   |   21 ---------------------
 2 files changed, 10 insertions(+), 22 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_connector.c b/drivers/gpu/drm/exynos/exynos_drm_connector.c
index 65acf0d..d2ac6ed 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_connector.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_connector.c
@@ -226,11 +226,20 @@ static struct drm_connector_helper_funcs exynos_connector_helper_funcs = {
 	.best_encoder	= exynos_drm_best_encoder,
 };
 
+static void exynos_drm_display_power(struct drm_encoder *encoder, int mode)
+{
+	struct exynos_drm_manager *manager = exynos_drm_get_manager(encoder);
+	struct exynos_drm_display_ops *display_ops = manager->display_ops;
+
+	if (display_ops && display_ops->power_on)
+		display_ops->power_on(manager->dev, mode);
+}
+
 static void exynos_drm_connector_dpms(struct drm_connector *connector, int mode)
 {
 	DRM_DEBUG_KMS("%s\n", __FILE__);
 
-	/* drm framework doesn't check NULL. */
+	exynos_drm_display_power(connector->encoder, mode);
 }
 
 static int exynos_drm_connector_fill_modes(struct drm_connector *connector,
diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.c b/drivers/gpu/drm/exynos/exynos_drm_encoder.c
index 3dae250..7da5714 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_encoder.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.c
@@ -49,25 +49,6 @@ struct exynos_drm_encoder {
 	int dpms;
 };
 
-static void exynos_drm_display_power(struct drm_encoder *encoder, int mode)
-{
-	struct drm_device *dev = encoder->dev;
-	struct drm_connector *connector;
-	struct exynos_drm_manager *manager = exynos_drm_get_manager(encoder);
-
-	list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
-		if (connector->encoder == encoder) {
-			struct exynos_drm_display_ops *display_ops =
-							manager->display_ops;
-
-			DRM_DEBUG_KMS("connector[%d] dpms[%d]\n",
-					connector->base.id, mode);
-			if (display_ops && display_ops->power_on)
-				display_ops->power_on(manager->dev, mode);
-		}
-	}
-}
-
 static void exynos_drm_encoder_dpms(struct drm_encoder *encoder, int mode)
 {
 	struct drm_device *dev = encoder->dev;
@@ -88,13 +69,11 @@ static void exynos_drm_encoder_dpms(struct drm_encoder *encoder, int mode)
 	case DRM_MODE_DPMS_ON:
 		if (manager_ops && manager_ops->apply)
 			manager_ops->apply(manager->dev);
-		exynos_drm_display_power(encoder, mode);
 		exynos_encoder->dpms = mode;
 		break;
 	case DRM_MODE_DPMS_STANDBY:
 	case DRM_MODE_DPMS_SUSPEND:
 	case DRM_MODE_DPMS_OFF:
-		exynos_drm_display_power(encoder, mode);
 		exynos_encoder->dpms = mode;
 		break;
 	default:
-- 
1.7.4.1

  parent reply	other threads:[~2012-08-17  9:51 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-17  9:50 [PATCH 00/13] updated exynos-drm-fixes Inki Dae
2012-08-17  9:50 ` [PATCH 01/13] drm/exynos: added device object to subdrv's remove callback as argument Inki Dae
2012-08-17  9:50 ` [PATCH 02/13] drm/exynos: separated subdrv->probe call and encoder/connector creation Inki Dae
2012-08-20  1:11   ` Joonyoung Shim
2012-08-20  1:52     ` InKi Dae
2012-08-20  1:59       ` Joonyoung Shim
2012-08-20  4:31         ` InKi Dae
2012-08-20  4:42           ` Joonyoung Shim
2012-08-20  5:43             ` InKi Dae
2012-08-17  9:50 ` [PATCH 03/13] drm/exynos: fixed page align bug Inki Dae
2012-08-17  9:50 ` [PATCH 04/13] drm/exynos: use empty function instead of drm_helper_connector_dpms Inki Dae
2012-08-20  1:12   ` Joonyoung Shim
2012-08-20  2:50     ` InKi Dae
2012-08-17  9:50 ` [PATCH 05/13] drm/exynos: removed exynos_drm_encoder_dpms call Inki Dae
2012-08-20  1:14   ` Joonyoung Shim
2012-08-20  2:00     ` InKi Dae
2012-08-17  9:50 ` [PATCH 06/13] drm/exynos: separeated fimd_power_on into some parts Inki Dae
2012-08-17  9:50 ` Inki Dae [this message]
2012-08-17  9:50 ` [PATCH 08/13] drm/exynos: make sure that hardware overlay for fimd is disabled Inki Dae
2012-08-20  2:09   ` Joonyoung Shim
2012-08-17  9:50 ` [PATCH 09/13] drm/exynos: check NV12M format specific to Exynos properly Inki Dae
2012-08-20  1:17   ` Joonyoung Shim
2012-08-20  2:23     ` InKi Dae
2012-08-20  4:52       ` Joonyoung Shim
2012-08-20  5:11         ` InKi Dae
2012-08-20  5:15           ` InKi Dae
2012-08-20  5:22             ` Joonyoung Shim
2012-08-20  5:45               ` InKi Dae
2012-08-17  9:50 ` [PATCH 10/13] drm/exynos: update crtc to plane safely Inki Dae
2012-08-20  1:25   ` Joonyoung Shim
2012-08-17  9:50 ` [PATCH 11/13] drm/exynos: changed context name of hdmi and mixer Inki Dae
2012-08-20  1:27   ` Joonyoung Shim
2012-08-20  2:29     ` InKi Dae
2012-08-20  4:55       ` Joonyoung Shim
2012-08-20  6:17         ` InKi Dae
2012-08-20  6:36           ` Joonyoung Shim
2012-08-20  6:51             ` InKi Dae
2012-08-20  7:30               ` InKi Dae
2012-08-17  9:50 ` [PATCH 12/13] drm/exynos: fixed build warning Inki Dae
2012-08-17  9:50 ` [PATCH 13/13] drm/exynos: make sure that hardware overlay for hdmi is disabled Inki Dae

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=1345197059-25583-8-git-send-email-inki.dae@samsung.com \
    --to=inki.dae@samsung.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kyungmin.park@samsung.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.