[PATCH] drm/i915: duct-tape locking when eDP init fails

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

 



On Tue, Mar 26, 2013 at 09:45:47AM +0200, Jani Nikula wrote:
> On Mon, 25 Mar 2013, Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
> > Thanks to apple gpu mux fail we detect an eDP output, but can't read
> > anything over dp aux. In the resulting failure path we then hit a
> > paranoid WARN about potential locking.
> >
> > Since the WARN is pretty useful for normal operation just paper over
> > it in the failure case by grabbing the demanded (but for init/teardown
> > not really required) lock.
> >
> > I've checked our driver unload code and we already don't hold the kms
> > lock when calling drm_mode_config_cleanup. So this won't lead to a new
> > deadlock when reloading i915.ko.
> 
> Also, drm_encoder_cleanup() grabs mode_config mutex internally, so we
> would have deadlocks already if intel_dp_encoder_destroy() were called
> while holding the lock.
> 
> Reviewed-by: Jani Nikula <jani.nikula at intel.com>

Thanks for the review, smashed on top of -fixes.

> An observation outside of this patch, I find it a bit ugly that it
> depends on the ironlake_edp_panel_vdd_off() sync parameter whether the
> caller needs to hold the mode_config mutex or not. Perhaps separate
> functions for sync/async would be neater, but don't hold your breath
> waiting for patches from me to that effect. ;)

Yeah, it's no the greatest interface, ever ;-)
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


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