All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: DRI Development <dri-devel@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH 6/7] drm: don't unnecessarily enable the polling work
Date: Tue, 23 Oct 2012 20:23:37 +0200	[thread overview]
Message-ID: <1351016618-2752-7-git-send-email-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <1351016618-2752-1-git-send-email-daniel.vetter@ffwll.ch>

... by properly checking connector->polled. This doesn't matter too
much because the polling work itself gets this slightly more right and
doesn't set repoll if there's nothing to do. But we can do better.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/drm_crtc_helper.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index bb94b6d..bd0574a 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -952,9 +952,6 @@ static void output_poll_execute(struct work_struct *work)
 		if (!connector->polled || connector->polled == DRM_CONNECTOR_POLL_HPD)
 			continue;
 
-		else if (connector->polled & (DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT))
-			repoll = true;
-
 		old_status = connector->status;
 		/* if we are connected and don't want to poll for disconnect
 		   skip it */
@@ -997,7 +994,8 @@ void drm_kms_helper_poll_enable(struct drm_device *dev)
 		return;
 
 	list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
-		if (connector->polled)
+		if (connector->polled & (DRM_CONNECTOR_POLL_CONNECT |
+					 DRM_CONNECTOR_POLL_DISCONNECT))
 			poll = true;
 	}
 
-- 
1.7.11.7

  parent reply	other threads:[~2012-10-23 19:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-23 18:23 [PATCH 0/7] hpd rework, relaunched Daniel Vetter
2012-10-23 18:23 ` [PATCH 1/7] drm: extract drm_kms_helper_hotplug_event Daniel Vetter
2012-10-23 18:23 ` [PATCH 2/7] drm: handle HPD and polled connectors separately Daniel Vetter
2012-10-23 18:23 ` [PATCH 3/7] drm: run the hpd irq event code directly Daniel Vetter
2012-10-23 18:23 ` [PATCH 4/7] drm: properly init/reset connector status Daniel Vetter
2012-10-23 18:23 ` [PATCH 5/7] drm: don't start the poll engine in probe_single_connector Daniel Vetter
2012-10-23 18:23 ` Daniel Vetter [this message]
2012-10-24 13:35   ` [PATCH] drm: don't unnecessarily enable the polling work Daniel Vetter
2012-10-23 18:23 ` [PATCH 7/7] drm: don't poll forced connectors Daniel Vetter
2012-10-23 20:41 ` [PATCH 0/7] hpd rework, relaunched Alex Deucher

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=1351016618-2752-7-git-send-email-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    /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.