OSDN Git Service

drm/i915: duct-tape locking when eDP init fails
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 25 Mar 2013 10:24:10 +0000 (11:24 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 26 Mar 2013 07:54:50 +0000 (08:54 +0100)
commitbd17381372c0740c43a9addf0d80271f647f2b38
tree8d381f0c2f772a6e6bc83b23002127269fa24f12
parentb1289371fcd580b4c412e6d05c4cb8ac8d277239
drm/i915: duct-tape locking when eDP init fails

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.

v2: Make it compile.

Reported-by: Dave Airlie <airlied@gmail.com>
Cc: Dave Airlie <airlied@gmail.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_dp.c