From patchwork Tue Oct 23 18:23:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 1632251 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 2E0983FD4E for ; Tue, 23 Oct 2012 19:37:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DF5E69F75D for ; Tue, 23 Oct 2012 12:37:06 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 34C659F70B for ; Tue, 23 Oct 2012 12:32:02 -0700 (PDT) Received: by mail-wi0-f177.google.com with SMTP id hj13so3054580wib.12 for ; Tue, 23 Oct 2012 12:32:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=XzbX8qZMNAeUrFpIfefreC9vNr9wdQvB672Mu9pur80=; b=EHE98AVK1qvZtBikkTtuYYBWZy9Gr9BzO1cZR4O5skDBIo03FP3ZA7bhUDTnQ4dHjM s0Xbuf3hvimyzTki/f7+5fYwKukwNEGyiht18uOxM8ppzZH0X8CWE2jsX7S2x+c7TJsK eIRIOC1eOyDE5pw8MSAWdtYVnqd3Xkxv2BJXo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=XzbX8qZMNAeUrFpIfefreC9vNr9wdQvB672Mu9pur80=; b=ofh87dsjr/KjmqsuD+EBJFwa5m66fXvrJVCEAjxo62+uoqMz5MpYgQg7PRATDO13s3 4wJCEodtyrJA80BKGv4reBIXjAoGksjtp8XAD3W3bXDoyRJACyjqngJOJgFqbdTEXHb2 ydLen246tOsL73d6NBVH73Wyf+IfQ/AL7Xnjgz2WYKAx8HDvXbOMH3YDw5ekJ6Qd1+XF AssBjg8LF6DEZmw2oeaQUvszOE02c9+aVhhLfSghJRvcHNq+kRDx89neFm8X3nl3BToc F1/gBxDLl256gkldgodEW2tyhJTVJPsOPNvgSUYry8LMlLLhvw/C03aPViU0FScOW2SX /Pxw== Received: by 10.180.87.34 with SMTP id u2mr324780wiz.4.1351020722039; Tue, 23 Oct 2012 12:32:02 -0700 (PDT) Received: from wespe.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPS id di7sm312800wib.11.2012.10.23.12.32.01 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 23 Oct 2012 12:32:01 -0700 (PDT) From: Daniel Vetter To: DRI Development Subject: [PATCH 6/7] drm: don't unnecessarily enable the polling work Date: Tue, 23 Oct 2012 20:23:37 +0200 Message-Id: <1351016618-2752-7-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1351016618-2752-1-git-send-email-daniel.vetter@ffwll.ch> References: <1351016618-2752-1-git-send-email-daniel.vetter@ffwll.ch> X-Gm-Message-State: ALoCoQmGWkU+y6sv1VObZrIV1y3szjH30tsW/tJbHYzToyjYo9hO0SULRrhccnkYGo9yqYPwCKVX Cc: Daniel Vetter X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org ... 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 --- 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; }