From patchwork Fri Nov 26 18:45:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keith Packard X-Patchwork-Id: 359512 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oAQImGPt009684 for ; Fri, 26 Nov 2010 18:48:36 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 06DED9F303 for ; Fri, 26 Nov 2010 10:48:16 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from keithp.com (home.keithp.com [63.227.221.253]) by gabe.freedesktop.org (Postfix) with ESMTP id 9C5DD9F0D5; Fri, 26 Nov 2010 10:46:11 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 55A4D7600C7; Fri, 26 Nov 2010 10:46:11 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id O847j9+mI1Ns; Fri, 26 Nov 2010 10:46:08 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id D825C7600F4; Fri, 26 Nov 2010 10:46:08 -0800 (PST) Received: from koto.keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id C20FD7600C7; Fri, 26 Nov 2010 10:46:08 -0800 (PST) Received: by koto.keithp.com (Postfix, from userid 1488) id 9F6851280B0; Fri, 26 Nov 2010 10:46:05 -0800 (PST) From: Keith Packard To: Chris Wilson Date: Fri, 26 Nov 2010 10:45:59 -0800 Message-Id: <1290797159-3977-2-git-send-email-keithp@keithp.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1290797159-3977-1-git-send-email-keithp@keithp.com> References: <1290797159-3977-1-git-send-email-keithp@keithp.com> Cc: Dave Airlie , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [Intel-gfx] [PATCH 2/2] drm: record monitor status in output_poll_execute X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 26 Nov 2010 18:48:36 +0000 (UTC) diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index 232ee93..7ca5935 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c @@ -848,7 +848,7 @@ static void output_poll_execute(struct work_struct *work) struct delayed_work *delayed_work = to_delayed_work(work); struct drm_device *dev = container_of(delayed_work, struct drm_device, mode_config.output_poll_work); struct drm_connector *connector; - enum drm_connector_status old_status, status; + enum drm_connector_status old_status; bool repoll = false, changed = false; if (!drm_kms_helper_poll) @@ -873,8 +873,9 @@ static void output_poll_execute(struct work_struct *work) !(connector->polled & DRM_CONNECTOR_POLL_HPD)) continue; - status = connector->funcs->detect(connector, false); - if (old_status != status) + connector->status = connector->funcs->detect(connector, false); + DRM_DEBUG_KMS("connector status updated to %d\n", connector->status); + if (old_status != connector->status) changed = true; }