]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: propagate errors from intel_dp_init_connector
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Wed, 12 Jun 2013 20:27:25 +0000 (17:27 -0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 28 Jun 2013 12:14:17 +0000 (14:14 +0200)
commita29dbc79580a0d956d09547c4e0a5ef052b5113c
treeb99e121cb5311f75282ee44aa34a22ee0441d9ba
parenta352f19f11715566b21730b59130af8f9f7c02d2
drm/i915: propagate errors from intel_dp_init_connector

In case we detect a "ghost eDP", intel_edp_init_connector frees both
the connector and encoder and then returns. On Haswell, intel_ddi_init
then tries to use the freed encoder on the HDMI initialization path
since the following commit:

commit b82a0a340f0b60ee30297a5d60b06f94d8705f3b
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Wed Apr 10 23:28:35 2013 +0200
    drm/i915: don't setup hdmi for port D edp in ddi_init

So now on intel_ddi_init we check for the "ghost eDP" case and return
without trying to initialize HDMI. This way we won't try to read the
freed "intel_encoder" struct in the next "if" statement.

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
drivers/gpu/drm/i915/intel_drv.h