Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755531AbcCNKCh (ORCPT ); Mon, 14 Mar 2016 06:02:37 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33387 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755400AbcCNKCN (ORCPT ); Mon, 14 Mar 2016 06:02:13 -0400 Date: Mon, 14 Mar 2016 11:02:59 +0100 From: Daniel Vetter To: Dave Airlie Cc: Mika Westerberg , "linux-pm@vger.kernel.org" , Linux PCI , "Rafael J. Wysocki" , "Rafael J. Wysocki" , Linux Kernel Mailing List , dri-devel , ACPI Devel Maling List Subject: Re: [PATCH 1/2] vga_switcheroo: add power support for windows 10 machines. Message-ID: <20160314100259.GP14170@phenom.ffwll.local> Mail-Followup-To: Dave Airlie , Mika Westerberg , "linux-pm@vger.kernel.org" , Linux PCI , "Rafael J. Wysocki" , "Rafael J. Wysocki" , Linux Kernel Mailing List , dri-devel , ACPI Devel Maling List References: <1457504045-12738-1-git-send-email-airlied@gmail.com> <2736217.utxPzJExd5@vostro.rjw.lan> <20160311105815.GS1796@lahna.fi.intel.com> <2759763.dR5D0KopkA@vostro.rjw.lan> <20160314094335.GE1796@lahna.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Linux phenom 4.3.0-1-amd64 User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1839 Lines: 42 On Mon, Mar 14, 2016 at 07:47:39PM +1000, Dave Airlie wrote: > > > >> - if (pcie_port_runtime_suspend_allowed(dev)) > >> + if (pcie_port_runtime_suspend_allowed(dev)) { > >> + pm_runtime_allow(&dev->dev); > > > > PCI drivers typically have left this decision up to the userspace. I'm > > wondering whether it is good idea to deviate from that here? Of course > > this allows immediate power savings but could potentially cause problems > > as well. > > > > No distro has ever shipped userspace to do this, I really think this > is a bad design. > We have wasted countless watts of power on this stupid idea that people will > run powertop, only a few people in the world run powertop, lots of > people use Linux. > > The kernel should power stuff down not wait for the user to run powertop, > At least for the GPU it's in the area of 8W of power, and I've got the > GPU drivers doing this themselves, > > I could have the GPU driver call runtime allow for it's host bridge I suppose, > if we insist on the userspace cares, but I'd prefer not doing so. Yes, fully agreed. Runtime PM that's not enabled by default is useless, since no one runs powertop, which also means it's buggy because no one tests it. Not enabling power saving features by default is imo just a lame excuse. Shit better just work, and tuneables should only exposed if there's a real reason why autotuning is infeasible. E.g. we auto-ramp the gpu clock down/up in i915 in software to compensate for some of the silliness in how the hw does it alone. And the sysfs tunables are mostly just to make benchmarking (where slower, but without any thermal throttling) is sometimes preferred. And yes i915 hasn't enabled rpm yet by default because there's bugs left :( -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch