Received: by 10.223.185.116 with SMTP id b49csp3901051wrg; Mon, 19 Feb 2018 07:50:53 -0800 (PST) X-Google-Smtp-Source: AH8x227Sm8XejjgsETlUypPK9K2rHbwLWTDfbO6jZdRu+Jf4rJpkOExsUBxw5q3sU4YBtUiuoCHr X-Received: by 10.98.63.75 with SMTP id m72mr4521442pfa.122.1519055453840; Mon, 19 Feb 2018 07:50:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519055453; cv=none; d=google.com; s=arc-20160816; b=1GDcPUuqANuEn5Z7isVOPa662eZkOHtqtPm5mDDU/uDKRhrudzhiY8A/bQxy43Vm71 ZLr2kFBAnx/j/Xey/XsBaxtP8YbS8I5LgJwDZ+HcKgRmD7ZY0jQdi7oolEbFpEiKXsJ4 LqznsQSXzlRpHiuf0gfzjJlNRtmz1ClfPONthR90jSjEs9SI87KkQIj82C8xYUoCn89R +qsRTCfG+M+bNsW6TXT0h1PZt0O6c4KjjQsIxgc4UfJHpGBdIoZXJupB2U0OmOYFq4g0 /D2t9j625sTRRqS3r9QTkJZzZLpUXTKv0Jg+YfZL2pSktqHbWJpA1D/LcPHtVNegqOOt O4aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=ECCOm5ClEBA9la0hSwusqYfIqo0k3GX+94GEZRd9NfI=; b=UZIARPOVu1rXtVjDLhe/iBBwn+VhHra2UTpwZfr30Yfxb1JUqwGWrjWPXpuw7Pbr+r K5MlQ0L21x0v3vQjpiN6LfKP6KkW2jAdJozbF97/xAEW2M5VSubYc6q5b5BdwmMrl4Rj wODxpOb7G43mwNLCVe9fecs4olpaTwm6tWft5zyUgZMQF8+j5Bp5h0BDkFxezAaxKE0G pDgvgR9nvMMH/q9qhM7U9m42puOzcvrsfoCkQ34tsRMUKZ2ryH9jdQTHHptT6mzQC9rv V1kP/yoBVk4Q+kMdWrqEoEJes3xgPGHcnc2fBwCR/1B4xdHw2qdiHrcsT/fvy2guYoLS aMMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ej2caWtA; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f11si3770585pgv.534.2018.02.19.07.50.39; Mon, 19 Feb 2018 07:50:53 -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=pass header.i=@gmail.com header.s=20161025 header.b=Ej2caWtA; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753203AbeBSPuE (ORCPT + 99 others); Mon, 19 Feb 2018 10:50:04 -0500 Received: from mail-yb0-f181.google.com ([209.85.213.181]:40001 "EHLO mail-yb0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752895AbeBSPuC (ORCPT ); Mon, 19 Feb 2018 10:50:02 -0500 Received: by mail-yb0-f181.google.com with SMTP id i15-v6so2964199ybg.7 for ; Mon, 19 Feb 2018 07:50:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=ECCOm5ClEBA9la0hSwusqYfIqo0k3GX+94GEZRd9NfI=; b=Ej2caWtA1oj19IyCHgu9GakT7HkE0IEAgtkTnXi1KKWWnXRT4V8FnpBFbTkQJ+8xBR i1GkUf5HtiK7nLf2b/EPqEu5Y057eNp47RIE4+1FabQh4OWT7SQPA29KDwsdLQsyaeGd G4QbPzadaxL58Fx63zK9tYk/tljUIrgPVfw6odnssinN6dS1ZfSf3DyDsMtv7E4kIs7z CTqfxOcIt1iwxe4Q2wMPhAycpJkqK3RzxozTs7tiJs+TfyItc4hi82xoqINuEHDm/Pz+ Jv48DXYFyx3DXM9Btx4ELlIWvhG4b0qsieLPtWYJVCvPD55oNP48OkMQINv/XXPBz0rI nIyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=ECCOm5ClEBA9la0hSwusqYfIqo0k3GX+94GEZRd9NfI=; b=iKG4uXAAo1SCjyMNBRcb4LvLfBJKb95wdspuPCPDZW+rQmhX445zKo4qST0I+WgDQs yJSfz6vsGdrfKPZbiqV8ikrwrV7UaE786d/ZpTCEkyPzGkfL4qD266Zs2wBAzOW1ua7Y A/QxQM8oEazPFI0h7Svhxki2vHy11obO6Egvch8NOhMXhP35WJJMkStUex7tfKTdnzvg OFrLIJkHxGPbTnWjtcaU5VqeNVqM6NBo/dz9GFBYM9sLZg4NVcibghP2oMrdxSGKexwm YKmCZvfFX6pyaMqROVvmUPPNdc3YgtesBJ5gTqy8MyISvDb6SFewsoLMzD5BvjKhwTsm DnqQ== X-Gm-Message-State: APf1xPC3SlrjBeSuPeL0Eec8duPNu8Dw+j1u1rhyuHaIn33jixoQCZoi GDklhIXH+bVhEqM2qHsG7+b4vZz4A6fwvgkFxco= X-Received: by 10.37.184.20 with SMTP id v20mr10678642ybj.521.1519055402036; Mon, 19 Feb 2018 07:50:02 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a25:6785:0:0:0:0:0 with HTTP; Mon, 19 Feb 2018 07:50:01 -0800 (PST) In-Reply-To: <20180219145433.GG22199@phenom.ffwll.local> References: <20180219113443.GU22199@phenom.ffwll.local> <20180219115817.4e5ml4jdh22kbvs4@wunner.de> <20180219140553.GA22199@phenom.ffwll.local> <20180219144742.yffm3ptzyrslccjj@wunner.de> <20180219145433.GG22199@phenom.ffwll.local> From: Alex Deucher Date: Mon, 19 Feb 2018 10:50:01 -0500 Message-ID: Subject: Re: [Intel-gfx] [Nouveau] [PATCH 0/5] Fix deadlock on runtime suspend in DRM drivers To: Lukas Wunner , Tejun Heo , Lai Jiangshan , Alex Deucher , Dave Airlie , Ben Skeggs , Archit Taneja , Ismo Toijala , nouveau , Intel Graphics Development , Liviu Dudau , LKML , Maling list - DRI developers , Hans de Goede Content-Type: text/plain; charset="UTF-8" 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 9:54 AM, Daniel Vetter wrote: > 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). On our APUs, we support fairly fine grained powergating so this mostly happens auto-magically in hw; no need for runtimepm. We haven't supported native analog encoders in last 3 or 4 generations of display hw, so polling is not much of an issue going forward. On most integrated platforms (e.g., laptops and all-in-ones), digital hotplug is handled by the platform (we get an ACPI ATIF notification) so we can wake the dGPU. Alex > -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 > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel