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-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list Intelfirstname.lastname@example.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx