]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drm/i915: fix the "ghost eDP" encoder unwind path
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Wed, 12 Jun 2013 20:27:27 +0000 (17:27 -0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 19 Jun 2013 06:18:56 +0000 (08:18 +0200)
commitd90c7db79ead2cdb83f80a9cd5e57aed85e965fd
treec9a81b454f2b80ff1078371913f26995e73f7c13
parentfe6c3cf68ad9ec8ee69cb29ed627ba385dcbb215
drm/i915: fix the "ghost eDP" encoder unwind path

Because calling intel_dp_encoder_destroy inside
intel_edp_init_connector is just wrong. This is the initialization
path, so we should properly unwind all the initialization through the
whole caller stack.

On the intel_dp_encoder_destroy function we do the following:
1 - Call i2c_del_adapter
2 - Call drm_encoder_cleanup
3 - If edp:
3.1 - Cancel panel_vdd_work
3.2 - Call ironlake_panel_vdd_of_sync
4 - Free the encoder

And here is how we unwind each specific step:
1 - We have intel_dp_init_connector -> intel_dp_i2c_init ->
    i2c_dp_aux_add_bus -> i2c_add_adapter, so we call
    i2c_del_dapter at intel_dp_init_connector
2 - Call it in the same function that called drm_encoder_init
3 - Call it in the same function that called INIT_DELAYED_WORK
4 - Free it in the same function that allocated it

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Zoltan Nyul <zoltan.nyul@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_ddi.c
drivers/gpu/drm/i915/intel_dp.c