[Intel-gfx] [PATCH 1/2] drm/i915: do runtime_get/put during display well power gate/ungate
Imre Deak
imre.deak at intel.com
Tue Jun 10 14:24:34 CEST 2014
Hi Sagar,
On Tue, 2014-06-10 at 00:27 +0530, sagar.a.kamble at intel.com wrote:
> From: Sagar Kamble <sagar.a.kamble at intel.com>
>
> Display power island is on during boot, we have one count for it
> once this power gates, we do a put making sure runtime_suspend is
> called
>
> Cc: Daniel Vetter <daniel.vetter at ffwll.ch> (supporter:INTEL DRM DRIVERS...)
> Cc: Jani Nikula <jani.nikula at linux.intel.com> (supporter:INTEL DRM DRIVERS...)
> Signed-off-by: Sagar Kamble <sagar.a.kamble at intel.com>
> ---
> drivers/gpu/drm/i915/intel_pm.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index f83d1ff..b333aae 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -6017,6 +6017,12 @@ void __vlv_set_power_well(struct drm_i915_private *dev_priv,
> state,
> vlv_punit_read(dev_priv, PUNIT_REG_PWRGT_CTRL));
>
> + if (PUNIT_POWER_WELL_DISP2D == power_well_id) {
> + if (enable)
> + intel_runtime_pm_get(dev_priv);
> + else
> + intel_runtime_pm_put(dev_priv);
> + }
The RPM refcount should already be get/put properly in
intel_display_power_get/put(), so the above doesn't seem correct to me.
With current -nightly after blanking the screen the RPM refcount does
drop to 0 for me, so I'm not sure what you're missing. One possibility
is:
# echo auto > /sys/bus/pci/devices/0000:00:02.0/power/control
--Imre
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20140610/eaa80e47/attachment.sig>
More information about the Intel-gfx
mailing list