drm/i915: Add i830 "pipes power well"
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 1 Jun 2017 14:36:16 +0000 (17:36 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 15 Jun 2017 12:35:38 +0000 (15:35 +0300)
commit2ee0da163196baf9baa05b7464594342788213f2
tree18541a15b485714a9be6d31f0bb3b5eb5b249b41
parentbb408dd2b2b040f7e483c21ed69353e80d890329
drm/i915: Add i830 "pipes power well"

830 more or less requires both pipes and DPLLs to remain on as long
as either pipe is needed. However, when neither pipe is actually needed,
we can save a bit of power by turning everything off. To do that we add
a new "power well" that turns both pipes and DPLLs on and off in the
right order. Seems to save ~50mW on my Fujitsu-Siemens Lifebook S6010.

This also avoids having to abuse the load detection to force pipe A on
at init time. That was never very robust, and it only worked for one
pipe, whereas 830 really needs both pipes enabled. As a bonus the 830
pipe quirk is now a bit more isolated from the rest of the mode setting
infrastructure, which should mean that it's much less likely someone
will accidentally break it in the future. The extra cost is of course
slight code duplication, but that seems like a worthwile tradeoff here.

v2; s/BIT/BIT_ULL/

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170601143619.27840-5-ville.syrjala@linux.intel.com
Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_runtime_pm.c