]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: get power domain in case the BIOS enabled eDP VDD
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Tue, 22 Apr 2014 22:55:42 +0000 (19:55 -0300)
committerJani Nikula <jani.nikula@intel.com>
Wed, 23 Apr 2014 08:13:25 +0000 (11:13 +0300)
commit8b00bcc11c5f1c6a7d99b1c1d544109dcd443cfc
treeb1b41a0c7c2a170198b61ac49704feb2937e6feb
parent592cd3bdc4de1fed6e2538566b091b4b0806955f
drm/i915: get power domain in case the BIOS enabled eDP VDD

If I unplug the eDP monitor, the BIOS of my machine will enable the
VDD bit, then when the driver loads it will think VDD is enabled. It
will detect that the eDP is not enabled and return false from
intel_edp_init_connector. This will trigger a call to
edp_panel_vdd_off_sync(), which trigger a WARN saying that the
refcount of the power domain is less than zero.

The problem happens because the driver gets a refcount whenever it
enables the VDD bit, and puts the refcount whenever it disables the
VDD bit. But on this case, the BIOS enabled VDD, so all we do is to
call put() without calling get() first, so the code added is there to
make sure we always have the get() in case the BIOS enabled the bit.

This regression was introduced in
commit 867f390ff56b00b2310b335682b72db73dbdbafb
Author: Paulo Zanoni <paulo.r.zanoni@intel.com>
Date:   Thu Nov 21 13:47:23 2013 -0200

    drm/i915: get a runtime PM reference when the panel VDD is on

v2: - Rebase

Tested-by: Chris Wilson <chris@chris-wilson.co.uk> (v1)
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: stable@vger.kernel.org (v3.13+)
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/intel_dp.c