Received: by 10.223.185.116 with SMTP id b49csp3841576wrg; Mon, 19 Feb 2018 06:55:48 -0800 (PST) X-Google-Smtp-Source: AH8x224mOzFKgGaFfyzEPhZHLSSopa5WOzrwGqkaQUv8mbukWigK8CM73pXzfn841awUQ7FrGJq8 X-Received: by 2002:a17:902:7006:: with SMTP id y6-v6mr14438960plk.37.1519052148629; Mon, 19 Feb 2018 06:55:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519052148; cv=none; d=google.com; s=arc-20160816; b=CBrptpJ4mQcEKtbbTe5P5FlNnjQp2DFHqxrVI+bMqsb6mbaq4vCioueFhsbAVRXJ7T uO8C0Qyx18659wZdmvhY0EFxZ/fPcjiOeFZMNIHTtL2z1zRroVzodj2iCKZpoz35UZt2 Ss3B2glGG7Tf6p9hEn87PqHvyBqBCvRbGrkAqvUykTk7pqEzq9Ndii/RvmqBxGuegF/a aq8LYuzIo2pPev+sgroQd6Ebt2sOzTH1pi7yhTg7Y3xET3WZ9iOa4bqKGrwdTnnbCaln ja/iMZvb38zl4HeufOJxv0ee5LgTt+K3/U+K0Y7amT0QfcmdKgTZ7sc8UN0d3giHRHG/ 7ilQ== 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=6UOfYygzFTGn4lK2SZ9KfHFGS3E6KAt7i45BlZSo4Cs=; b=fyR0bPU9yr1yqDRx8i8rljUtrL/OSfVdVPCjaiwVk7AOEuJlF5/WdAsexHi5AFJnWl /K58vb/qiSHzsxjhur1zu7bnUZh7Mcvp7+dl5BzQaXhssKNQrfyoskp8v+QTaDWmWUXr /1sk1n03ccns4vPBP7CxSjpZF5VVY29Wp+xkU9iDN+6JsszAeDOoHEVhgwYUw1xJTbrT BNOIhS/Su0cnrNp4P/+MPd8v4FtP85sINE8LNd2PHd9H7yalA57JaRrNSylYVUnXCLFj BCcwgFnvGDj/uclJalYKHH6HsGNuAryOjUE6d+ohi7HgEsSv57++yOdiaEjEupB8HkqG +1tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=HVKMmufI; 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 o88si6379456pfk.380.2018.02.19.06.55.34; Mon, 19 Feb 2018 06:55:48 -0800 (PST) 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=HVKMmufI; 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 S1752895AbeBSOyj (ORCPT + 99 others); Mon, 19 Feb 2018 09:54:39 -0500 Received: from mail-wm0-f54.google.com ([74.125.82.54]:36430 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751515AbeBSOyh (ORCPT ); Mon, 19 Feb 2018 09:54:37 -0500 Received: by mail-wm0-f54.google.com with SMTP id f3so15604213wmc.1 for ; Mon, 19 Feb 2018 06:54:37 -0800 (PST) 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=6UOfYygzFTGn4lK2SZ9KfHFGS3E6KAt7i45BlZSo4Cs=; b=HVKMmufIiwUUnasUumwrhe9q+0OBAPiXD8FbBx4gOCPz1tGiGl/JPvO32yYnDiArGc u9nTvZHDr4rtT+cQaVt5FFC2Id5jXhC+pD98AB9YrKIGE+1DpVjokZ8mIbF/NavdFcC0 ftA+CHl5ZqfZDd4ziYl7v+oQCH+LQzertzjQk= 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=6UOfYygzFTGn4lK2SZ9KfHFGS3E6KAt7i45BlZSo4Cs=; b=QoJzgZ2zZQlo5Ra7k6tBh6spi9qPs2Xaa2oDxsKsS8Hr6mn5L5uqnimEEbtew/eqUq nb58phkLMwBP2ZsJ40yXEt4EIVthEZHo5zlr7JYRc2scpL9nkdCtniRB2PGTGGvdkDka qZitd0hlpWWuDvGWYV27nSQBNTycBX++v0G4dnUF9vn3iTt5opFUXDR9YZy6N2uk2zpc 79lvQjWIXuqAiByfgBlhQqlOF6f5l5znIQyA2ZA8pGu3Zt9G9nQr/PYd/MvGRyz74VLC Q/HjMnQRkFiKKe3VKson0yN8Tsjayao1XW2S1AqBBEJenFb6eVLcLk9sutz64zKNKB7p kpjQ== X-Gm-Message-State: APf1xPA4nsffkNrn4nB8JdPTBvrLaXEpG1nWl40vO/yiZHyN97Ky0h3e 0ZsIWN7gE7UJyjKdaR9BV0ZDEA== X-Received: by 10.80.184.23 with SMTP id j23mr12402281ede.5.1519052076683; Mon, 19 Feb 2018 06:54:36 -0800 (PST) Received: from phenom.ffwll.local (212-51-149-109.fiber7.init7.net. [212.51.149.109]) by smtp.gmail.com with ESMTPSA id x44sm15191468ede.7.2018.02.19.06.54.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Feb 2018 06:54:35 -0800 (PST) Date: Mon, 19 Feb 2018 15:54:33 +0100 From: Daniel Vetter To: Lukas Wunner Cc: Tejun Heo , Lai Jiangshan , Alex Deucher , Dave Airlie , Ben Skeggs , Archit Taneja , Ismo Toijala , nouveau@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, Liviu Dudau , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Hans de Goede Subject: Re: [Intel-gfx] [Nouveau] [PATCH 0/5] Fix deadlock on runtime suspend in DRM drivers Message-ID: <20180219145433.GG22199@phenom.ffwll.local> Mail-Followup-To: Lukas Wunner , Tejun Heo , Lai Jiangshan , Alex Deucher , Dave Airlie , Ben Skeggs , Archit Taneja , Ismo Toijala , nouveau@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, Liviu Dudau , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Hans de Goede References: <20180219113443.GU22199@phenom.ffwll.local> <20180219115817.4e5ml4jdh22kbvs4@wunner.de> <20180219140553.GA22199@phenom.ffwll.local> <20180219144742.yffm3ptzyrslccjj@wunner.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180219144742.yffm3ptzyrslccjj@wunner.de> X-Operating-System: Linux phenom 4.14.0-3-amd64 User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 19, 2018 at 03:47:42PM +0100, Lukas Wunner wrote: > On Mon, Feb 19, 2018 at 03:05:53PM +0100, Daniel Vetter wrote: > > On Mon, Feb 19, 2018 at 12:58:17PM +0100, Lukas Wunner wrote: > > > On Mon, Feb 19, 2018 at 12:34:43PM +0100, Daniel Vetter wrote: > > > > Well, userspace expects hotplug events, even when we runtime suspend > > > > stuff. Hence waking shit up with polling. Imo ignoring hotplug events is a > > > > pretty serious policy decision which is ok in the context of > > > > vga_switcheroo, but not really as an automatic thing. E.g. usb also wakes > > > > up if you plug something in, even with all the runtime pm stuff enabled. > > > > Same for sata and everything else. > > > > > > On the MacBook Pro, the HPD pin of external DP and HDMI ports goes into > > > the gmux controller, which sends an interrupt on hotplug even if the GPU > > > is powered down. > > > > > > Apparently Optimus has a similar functionality, cf. 3a6536c51d5d. > > > > Yeah, for vga_switcheroo and gmux setups shutting down polling explicitly > > makes sense. I think ideally we'd stop polling in the gmux handler somehow > > (maybe by dropping the relevant DRM_CONNECTOR_POLL flags, or outright > > stopping it all). But not when runtime suspending the entire gpu (e.g. > > idle system that shuts down the screen and everything, before it decides > > a few minutes later to do a full system suspend). > > nouveau, radeon and amdgpu currently use runtime PM *only* on hybrid > graphics laptops. > > Should the drivers later be extended to also use runtime PM in other > scenarios (desktop machines, eGPUs), they can easily detect whether > to disable polling on runtime suspend by calling apple_gmux_present() > on Macs or the equivalent for Optimus/ATPX. Ah, then I think the current solution is ok (if not entirely clean imo, but that can be fixed up whenever it hurts). Implementing runtime pm for other cases is up to the driver authors really (probably more pressing when the gpu is on the same SoC). -Daniel > > Thanks, > > Lukas > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch