]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: fix handling of the disable_power_well module option
authorImre Deak <imre.deak@intel.com>
Tue, 17 Nov 2015 15:44:23 +0000 (17:44 +0200)
committerImre Deak <imre.deak@intel.com>
Tue, 17 Nov 2015 18:55:17 +0000 (20:55 +0200)
commit6ed55ab38946f3c0835750accf73583f7da0c52e
treeed7309514fe76fcbfb75691d8f611d38034efc48
parent54205eeb2b6bb182953462293fed9f4707575305
drm/i915: fix handling of the disable_power_well module option

When this option is 0 (so the power well support is disabled) we are
supposed to enable all power wells once and don't disable them unless we
system suspend the device. Currently if the option is 0, we can call the
power well enable handlers multiple times, whenever their refcount
changes from 0->1. This may not be a problem for the HW, but it's not
logical and may trigger some warnings in the power well code which
doesn't expect this. So simply keep around a reference while we are
not system suspended to solve this. For simplicity mark the module
option read only, so we don't need to deal with re-enabling the feature
during runtime. If someone really needs that it could be added later in
a more proper way.

v2:
- fix typo in comment in intel_power_domains_suspend() (Patrik)

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Patrik Jakobsson <patrik.jakobsson@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1447775063-24438-1-git-send-email-imre.deak@intel.com
drivers/gpu/drm/i915/i915_params.c
drivers/gpu/drm/i915/intel_runtime_pm.c