Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3983275imm; Mon, 6 Aug 2018 14:21:45 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdgFGiH0uSCX21X7EzmL4PGr9DZq7vlbJ6bI4daAWV1KkMHBjDzIVjg53bfcwwEQGmM2ABu X-Received: by 2002:a63:db4f:: with SMTP id x15-v6mr15815762pgi.214.1533590505554; Mon, 06 Aug 2018 14:21:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533590505; cv=none; d=google.com; s=arc-20160816; b=HterFYvnLyix/2tvxF4P9xgKVvPXOXNl7NeAvTM/fEphIPq4a4IYVb5Ss1l5RvYEmh jF97qjgrxl1BnEzay3frnp7Bwle+cziOgqqa3/8IoPxFVheqqAv/F8HUIV3gBxniiSC/ FqGKKfMdJG6Lla/rDY8ZQLUBA6NoFAu6YiKKXEkX3ytK3yGrxj8xk0xJZLwGOIl5Up9c vWrmDmIvDoe3ZElmHOLB7j7uNGwcPSFj2NfLE9V0/RidkWC+LxhmIW6A5ZaTmt6iBiaX ryoB+X6qycqKh3bg/y3otGV6VWprz3QBydbfxknv6Nml+ZpBpC6KlK6zzCBTlOczcjzP ihmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=AAH2DZZlRxXs+lGxhonaJAm3wnkPvGBVewhynb6ZLW4=; b=aC31j9BHCCV1IpwCyYDkJow7FdgT6xnYZral2Zac53sxwSClQAanRz4UGtFhF3W/4m TseX/A9uXnCzKwi80bSL2s40Q7ug8ZnMKWPN5i5D6c16658LaHvxXQyOvPwfJHncpjtr UBNX25Yzw9ENLLZ2ecUHlmQtcTdvq0hqeZ1tx6gKsXf2h6w8ClCiAa3fETro5uMgZ9ev gnnosN0btByukuIfQ4K81lBJw5FPaZV/qPIAlYTqpUWmHGQ5dQpz/3JY9yo+sj7s3SLB iHWIxZ5v4EKoIxs6Ppvhd1K7IPLEnCwgqn1FaTQ//nrFcpJqj1P8vHWTjU4Ozhqajft2 aI3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=bbMPQGA6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o33-v6si10589113plb.192.2018.08.06.14.21.30; Mon, 06 Aug 2018 14:21:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=bbMPQGA6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732562AbeHFVxn (ORCPT + 99 others); Mon, 6 Aug 2018 17:53:43 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:43716 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731143AbeHFVxn (ORCPT ); Mon, 6 Aug 2018 17:53:43 -0400 Received: by mail-ed1-f67.google.com with SMTP id j21-v6so3332750edp.10 for ; Mon, 06 Aug 2018 12:43:06 -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:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=AAH2DZZlRxXs+lGxhonaJAm3wnkPvGBVewhynb6ZLW4=; b=bbMPQGA6bbOQPWkFt+taTZxAHZYngZ81KxE13dxwrorxZlAQ10dWZGcM1x8NwrDxJy fFbGK7CGY/y/a6W9oOJ9i5a6p9Ov2q4OZmk+pop2au/nIuh3fu7x2n9b8xyxs4zAsjD/ WiPKy1Nw/KcvOeswKKmXl4vIyEO50NksH5v5U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=AAH2DZZlRxXs+lGxhonaJAm3wnkPvGBVewhynb6ZLW4=; b=fwI8kbfVUzMYCJwMWZ6GZvUIwE2j5DPm5SsViDY9+tsr5UYAGa3/EDDt5bbInbsUNA N3cKZHWXc744Rg8HIt6Hm+RlirkbBg4ngj5C2DwwbtzSLvmvtS8peSfiIXPCXRnA+Tnl I0Rl6es4nuWxfVQW4Xnl2cY5YKA93c3WtarDSTyM6s5V8ZYGk4dpI2Nd0yT3e0VhEv6/ cP3l31lXr2a1u0FJrgtEYWnXxe1te5b76nNZXvMVvdu8+wBoNldh8XeWVXqg19Gy0Gt9 bKqHVnZ+SasThxpFr4f2klP1XdQ2XNPEwZNmW5hfG192REQ9sYbtdOKC4aytOrbC/TKy COIQ== X-Gm-Message-State: AOUpUlFouu5HENixMIVavR6sTvtTCiUrui1MQ39FJdqLgBdvwEq0voBA cmwAB7pXZ5nsOR61EikUVTT+KbOKCi4= X-Received: by 2002:a50:8818:: with SMTP id b24-v6mr20211788edb.274.1533584586135; Mon, 06 Aug 2018 12:43:06 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:56fc:0:d707:d7d8:b180:96e5]) by smtp.gmail.com with ESMTPSA id p20-v6sm4963619edr.12.2018.08.06.12.43.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 Aug 2018 12:43:05 -0700 (PDT) Date: Mon, 6 Aug 2018 21:43:03 +0200 From: Daniel Vetter To: Lukas Wunner Cc: Lyude Paul , Daniel Vetter , David Airlie , nouveau@lists.freedesktop.org, Karol Herbst , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v3 3/8] drm/fb_helper: Introduce hotplug_suspend/resume() Message-ID: <20180806194303.GT3008@phenom.ffwll.local> Mail-Followup-To: Lukas Wunner , Lyude Paul , David Airlie , nouveau@lists.freedesktop.org, Karol Herbst , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <20180731003954.19962-1-lyude@redhat.com> <20180731003954.19962-4-lyude@redhat.com> <20180806084322.GK3008@phenom.ffwll.local> <4e72a10062166d646ebd3eb28b6c186d4c00a63f.camel@redhat.com> <20180806193457.GA7028@wunner.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180806193457.GA7028@wunner.de> X-Operating-System: Linux phenom 4.14.0-3-amd64 User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 06, 2018 at 09:34:57PM +0200, Lukas Wunner wrote: > On Mon, Aug 06, 2018 at 03:15:31PM -0400, Lyude Paul wrote: > > You did mention in the review of one of my other patches that we should avoid > > disabling polling during runtime suspend, and you're definitely right. I feel > > a bit silly for not remembering that since I was the one who made it so that > > i915 does polling in runtime suspend for chips without RPM HPD detection in > > the first place because it was causing people's displays not to come up on > > vlv... > > Anyway: I think if we just leave output polling enabled during runtime suspend > > that might actually fix all of the fb_helper locking issues since we won't > > need to wait on any of the output poll workers to finish, at least I think it > > should: I'll confirm this when I get into the office > > Quoth Imre Deak: > > "In i915 polling is on during runtime suspend only if there are outputs > without hotplug interrupt support. A special case is when an output has > working HPD interrupts when in D0, but no interrupts when runtime > suspended. For these we start polling (from a scheduled work) in the > runtime suspend hook and stop it in the runtime resume hook (again from > a scheduled work)." > https://lkml.org/lkml/2018/2/12/330 > > nouveau only uses runtime PM on discrete GPUs in dual GPU laptops. > Resuming the GPU from D3cold to D0 every few seconds to poll the > outputs would waste too much power on such machines. > > The question is, why is polling running at all, since all modern > laptops have HPD-capable ports such as DP? Note we don't fully sync with the poll worker here, we just update the polling flags and let the poll worker lazily notice the change (and stop itsefl). That avoids the deadlock. It also means that the poll worker must call pm_runtime_get() in all the right places though. On resume we need to kick it again, but that doesn't have a deadlock potential. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch