From patchwork Wed Jun 17 11:11:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 6623991 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 77A979F399 for ; Wed, 17 Jun 2015 11:08:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 96A2720892 for ; Wed, 17 Jun 2015 11:08:33 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 5C7062083C for ; Wed, 17 Jun 2015 11:08:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 50BFB6EC42; Wed, 17 Jun 2015 04:08:31 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com [74.125.82.41]) by gabe.freedesktop.org (Postfix) with ESMTP id 0A1C46EC42 for ; Wed, 17 Jun 2015 04:08:30 -0700 (PDT) Received: by wgv5 with SMTP id 5so33924767wgv.1 for ; Wed, 17 Jun 2015 04:08:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=s/+VDKWShcT52mEsvYxRUw2IdPEyX+NfXIB0AIr+yNo=; b=DUGc8DPyrj3gSRBOg1HN7q1flkI1vUsidVvGPml5INchMDpb5u3rFdOI5QqpHJfu+K WPum/6L93hqmwLxb4WAD/IJ2WPR326U+OveDCDxR95K3US6a1RIm23wcdWoEpxVFmgvX d4IM9RgWSsdAybS5mw7PICKtEaaqwVl618QqU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=s/+VDKWShcT52mEsvYxRUw2IdPEyX+NfXIB0AIr+yNo=; b=LFqiwDD38U1B+rlOq73P6KH/Ypriz1PVr25wDf39sPmCwBF9Q47pindH9cKVIBbwzU QeKrnV6UO+nACHztlBkfkx6ilyhdzrkXFxaNu7LltDPq9MNNMH4OGBAcdB2hzr2A25lH I4bH39wjPi8vF15vi+/pfOHc+ie+cEJ6N/vlKG9l4nXdqRE7PTibNs3XbNrgW2MpFu8f pPo3pK9nZMbnM5J59uQlDTMirS0k7vKlJWoBEgh9/v5wobwGqoVS1LScW+1JTrm4oiZ8 zrYcIJnLlwSO7Ak5JnonOKmPXJY+RoaJo7PFv6ICGlmVIAQzR6cR5iwTzBhaUPtJ052v Bl8Q== X-Gm-Message-State: ALoCoQk8QuAvxepct2UE/cEOyMsfXlDXBFhLOSi1O/12OBmNSQo5e2QbYUBvLZaz34ZpQACCjZ6z X-Received: by 10.194.103.2 with SMTP id fs2mr4911887wjb.151.1434539309183; Wed, 17 Jun 2015 04:08:29 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:56b5:0:22cf:30ff:fe4c:37d6]) by mx.google.com with ESMTPSA id ka7sm6231399wjc.36.2015.06.17.04.08.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Jun 2015 04:08:28 -0700 (PDT) Date: Wed, 17 Jun 2015 13:11:14 +0200 From: Daniel Vetter To: David Herrmann Message-ID: <20150617111114.GE23637@phenom.ffwll.local> References: <20150615234500.GA27201@gardel-login> <20150616074756.GN23637@phenom.ffwll.local> <87eglc3wd5.fsf@intel.com> <20150616091446.GI28462@nuc-i3427.alporthouse.com> <20150616102507.GQ23637@phenom.ffwll.local> <20150616112200.GC27803@gardel-login> <20150616114726.GR23637@phenom.ffwll.local> <20150616212545.GB28290@gardel-login> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Operating-System: Linux phenom 4.0.0-rc3+ User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Lennart Poettering , David Airlie , Intel Graphics Development Subject: Re: [Intel-gfx] drm i915 weirdness with /sys/class/drm/card0*/status X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Wed, Jun 17, 2015 at 10:29:48AM +0200, David Herrmann wrote: > Hi > > On Tue, Jun 16, 2015 at 11:25 PM, Lennart Poettering > wrote: > > On Tue, 16.06.15 13:47, Daniel Vetter (daniel@ffwll.ch) wrote: > > > >> > But what does that actually mean? should logind ever echo "detect" > >> > itself into the file? Should it follow uevents for the files? How > >> > should treat this file? > >> > >> Ok here's how this is supposed to work: > >> - If anything changes the kernel will send out an uevent and compositors/X > >> or anyone else interested can listen for them. We've had a few bugs in > >> the past where such events where lost in a combination of bad luck and > >> bad hw, but that should all be fixed now. > >> > >> - Userspace should never poll these things on its own since probing is > >> ridiculously expensive. Unfortunately years of closing bugs as wontfix > >> hasn't lead to userspace stop polling (despite that the kernel does that > >> too if it's needed) which resulted in the above patch to take away the > >> those from at least system deamons. > > > > I find the kernel patch you applied a bit drastic, it broke userspace, > > returning rubbish unless somebody echoes the "detect" into the file -- > > which apparently nothing does, at least not after we came back from a > > suspend... > > I don't think it was supposed to work this way. If I read Daniel's > reply correctly, then the kernel is supposed to re-read connector > state after resume (without explicit trigger from user-space). It > might return 'unknown' for some time, but once it was refreshed, it > should send out a uevent and the correct state should now be read. And > logind works fine with this behavior. > > Anyway, I'm not sure why your machine doesn't work that way. I cannot > see the problems here on my machine. Yes there seems to be something amiss with the reprobing. Does the below kernel patch help? -Daniel diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c index 04203c0d2ecb..aa0fae2f24d1 100644 --- a/drivers/gpu/drm/drm_probe_helper.c +++ b/drivers/gpu/drm/drm_probe_helper.c @@ -497,10 +497,6 @@ bool drm_helper_hpd_irq_event(struct drm_device *dev) mutex_lock(&dev->mode_config.mutex); list_for_each_entry(connector, &dev->mode_config.connector_list, head) { - /* Only handle HPD capable connectors. */ - if (!(connector->polled & DRM_CONNECTOR_POLL_HPD)) - continue; - old_status = connector->status; connector->status = connector->funcs->detect(connector, false);