Re: [PATCH] drm/i915: get power domain in case the BIOS enabled eDP VDD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 10, 2014 at 09:21:50AM +0200, Daniel Vetter wrote:
> On Wed, Apr 09, 2014 at 06:47:33PM -0300, Paulo Zanoni wrote:
> > From: Paulo Zanoni <paulo.r.zanoni@xxxxxxxxx>
> > 
> > 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.
> > 
> > Signed-off-by: Paulo Zanoni <paulo.r.zanoni@xxxxxxxxx>
> 
> Is this the bug reported by Chris on irc yesterday? Chris?

Looks likely...

Tested-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>

Bikeshed requests:

That chunk is repeated a few times, please refactor it into a small
function.

The caller of intel_edp_init_connector() has a redundant if(is_edp) in
its error handling path.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux