Received: by 10.223.185.116 with SMTP id b49csp3835107wrg; Mon, 19 Feb 2018 06:49:09 -0800 (PST) X-Google-Smtp-Source: AH8x2260nNn9j1vzgUHDMoO/sF5+5jULJJta/0OFH84kDqi2lKkXNb6mDFC6+d5xfVeYoP/4lSYh X-Received: by 10.98.62.196 with SMTP id y65mr4724367pfj.24.1519051749753; Mon, 19 Feb 2018 06:49:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519051749; cv=none; d=google.com; s=arc-20160816; b=HmjPdryzefEcfrVqWa4VT+80N+Axb6XuhqwsEp7ZPh2eCE9oB8wpV/qby9JOi9hZT7 2LUWw/Z7vk9Xgdgr8wPlx95ONhS+TElhkD8EaMRZSyYfd3027lSTki7Q3gJxl21ol2j3 rnwl95h0AtyPkavHG0cEVVnDMz+30VM2zbByVAkYVSZ3k5Kn/F0nzu7Tl9wo4gxybznC d9S4QupagAke64vzma4mBWciABda2nxtzRKNo1FxvS5ifXWTaPtWO44tL7BM3H38GXzS 5U5OJaGy3s3dilOV39xCIudqMnfXcKwsFDhRwlDTQVcV5KjMdghzeKPDXMtqeScwjJti ee2A== 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:message-id:subject:to :from:date:arc-authentication-results; bh=2rldIKD/gUMbgZLv4+MHocKdyohLWzZGJ7yz7QzmRTE=; b=TUb7a0kQQeH4IRFHFaHMRROn6Ip3KhrzoHAKF1ckv5ofZq8wSwzTOJeDquqG/Pih8k /AGgPmPB9YGA3ZlTlG2LU140wM47/zJ3t01BVaRdPxahpOPF0KhpECk4i9r+k1H1LMEt vpIJVtQe87U2YkYg9K78RMi+FsYxQTNhccMQkkUtNE6rbLMisYDRm011rYu5WslM2HPg E1bz1GEksozn9pHHrb/jzQphiT4r5rE4PT+Lluu2G0eXeadnkNV+kLDf4SA+L704TsOk LsIEQ9G8JRlQ9KfYOYDZKPEAcdwjl0ttQjWC9EtY4W64jXZ+FBg1jJK++qWTpT8A/5tV j7uA== ARC-Authentication-Results: i=1; mx.google.com; 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 i9si9320770pfi.150.2018.02.19.06.48.55; Mon, 19 Feb 2018 06:49:09 -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; 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 S1752883AbeBSOrs (ORCPT + 99 others); Mon, 19 Feb 2018 09:47:48 -0500 Received: from mailout3.hostsharing.net ([176.9.242.54]:52499 "EHLO mailout3.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752469AbeBSOrp (ORCPT ); Mon, 19 Feb 2018 09:47:45 -0500 Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by mailout3.hostsharing.net (Postfix) with ESMTPS id D9E90102C25F7; Mon, 19 Feb 2018 15:47:43 +0100 (CET) Received: from localhost (p4FC5F26C.dip0.t-ipconnect.de [79.197.242.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by h08.hostsharing.net (Postfix) with ESMTPSA id 5B5FE603E059; Mon, 19 Feb 2018 15:47:43 +0100 (CET) Date: Mon, 19 Feb 2018 15:47:42 +0100 From: Lukas Wunner To: 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: <20180219144742.yffm3ptzyrslccjj@wunner.de> References: <20180219113443.GU22199@phenom.ffwll.local> <20180219115817.4e5ml4jdh22kbvs4@wunner.de> <20180219140553.GA22199@phenom.ffwll.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180219140553.GA22199@phenom.ffwll.local> User-Agent: NeoMutt/20170113 (1.7.2) 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: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. Thanks, Lukas