Message ID | 1459341326-13142-1-git-send-email-shubhangi.shrivastava@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, 2016-03-31 at 12:38 +0000, Patchwork wrote: > == Series Details == > > Series: series starting with [1/5] drm/i915: Splitting intel_dp_detect > URL : https://patchwork.freedesktop.org/series/5044/ > State : success I pushed those to dinq. I fixed a couple of "Alignment should match open parenthesis" errors from checkpatch. I should have pointed those out during review, but I missed them. For future reference, in a expression like below, DRM_DEBUG_KMS("debug message %d", number), the second line should be aligned with the opening '('. Ander > > == Summary == > > Series 5044v1 Series without cover letter > http://patchwork.freedesktop.org/api/1.0/series/5044/revisions/1/mbox/ > > Test kms_pipe_crc_basic: > Subgroup suspend-read-crc-pipe-c: > dmesg-warn -> PASS (bsw-nuc-2) > > bdw-nuci7 total:196 pass:184 dwarn:0 dfail:0 fail:0 skip:12 > bdw-ultra total:196 pass:175 dwarn:0 dfail:0 fail:0 skip:21 > bsw-nuc-2 total:196 pass:159 dwarn:0 dfail:0 fail:0 skip:37 > byt-nuc total:196 pass:161 dwarn:0 dfail:0 fail:0 skip:35 > hsw-brixbox total:196 pass:174 dwarn:0 dfail:0 fail:0 skip:22 > hsw-gt2 total:27 pass:24 dwarn:0 dfail:0 fail:0 skip:2 > skl-i7k-2 total:196 pass:173 dwarn:0 dfail:0 fail:0 skip:23 > skl-nuci5 total:196 pass:185 dwarn:0 dfail:0 fail:0 skip:11 > snb-dellxps total:79 pass:68 dwarn:0 dfail:0 fail:0 skip:10 > > Results at /archive/results/CI_IGT_test/Patchwork_1753/ > > 03c0f854e93263563f559d2bc8e47fb51adae697 drm-intel-nightly: 2016y-03m-31d-10h > -50m-15s UTC integration manifest > c448c6c059ae7bcdb7345feafd5324dd6dd164a7 drm/i915: force full detect on sink > count change > c1a69603958ccde4084f379f6c1a02314b8f5245 drm/i915: Read sink_count dpcd always > 5f91fb8d635f35130714bf60601948996ee976e3 drm/i915: Reorganizing > intel_dp_check_link_status > 950d50e19edac435bed7a08f6147af55cd2c8835 drm/i915: Cleaning up > intel_dp_hpd_pulse > 41fd654a2ac9ffc2d59ccf23511113b28f6271b1 drm/i915: Splitting intel_dp_detect > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
On 01/04/16 08:41, Ander Conselvan De Oliveira wrote: > On Thu, 2016-03-31 at 12:38 +0000, Patchwork wrote: >> == Series Details == >> >> Series: series starting with [1/5] drm/i915: Splitting intel_dp_detect >> URL : https://patchwork.freedesktop.org/series/5044/ >> State : success > > I pushed those to dinq. This series seems to break eDP detection on BDW RVP. Old kernel: [ 1.554183] [drm:intel_dp_init_connector] Adding eDP connector on port A [ 1.554245] [drm:intel_dp_init_panel_power_sequencer] cur t1_t3 2000 t8 0 t9 2000 t10 500 t11_t12 6000 [ 1.554254] [drm:intel_dp_init_panel_power_sequencer] vbt t1_t3 2000 t8 10 t9 2000 t10 500 t11_t12 5000 [ 1.554263] [drm:intel_dp_init_panel_power_sequencer] panel power up delay 200, power down delay 50, power cycle delay 600 [ 1.554271] [drm:intel_dp_init_panel_power_sequencer] backlight on delay 1, off delay 200 [ 1.554279] [drm:intel_dp_aux_init] registering DPDDC-A bus for card0-eDP-1 [ 1.554530] [drm:edp_panel_vdd_on] Turning eDP port A VDD on [ 1.554562] [drm:edp_panel_vdd_on] PP_STATUS: 0x80000008 PP_CONTROL: 0xabcd000f [ 1.556670] [drm:intel_dp_get_dpcd] DPCD: 11 0a 02 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.557617] [drm:intel_dp_get_dpcd] Display Port TPS3 support: source yes, sink no [ 1.557627] [drm:intel_dp_print_rates] source rates: 162000, 270000, 540000 [ 1.557633] [drm:intel_dp_print_rates] sink rates: 162000, 270000 [ 1.557638] [drm:intel_dp_print_rates] common rates: 162000, 270000 [ 1.557651] [drm:intel_dp_init_panel_power_sequencer_registers] panel power sequencer register settings: PP_ON 0x7d00001, PP_OFF 0x1f40001, PP_DIV 0x4af06 [ 1.567299] [drm:drm_edid_to_eld] ELD: no CEA Extension found [ 1.567308] [drm:intel_dp_drrs_init] VBT doesn't support DRRS [ 1.567319] [drm:intel_panel_setup_backlight] Connector eDP-1 backlight initialized, enabled, brightness 937/937 Todays nightly: [ 4.306321] [drm:intel_dp_init_connector] Adding eDP connector on port A [ 4.306370] [drm:intel_dp_init_panel_power_sequencer] cur t1_t3 2000 t8 0 t9 2000 t10 500 t11_t12 6000 [ 4.306371] [drm:intel_dp_init_panel_power_sequencer] vbt t1_t3 2000 t8 10 t9 2000 t10 500 t11_t12 5000 [ 4.306373] [drm:intel_dp_init_panel_power_sequencer] panel power up delay 200, power down delay 50, power cycle delay 600 [ 4.306374] [drm:intel_dp_init_panel_power_sequencer] backlight on delay 1, off delay 200 [ 4.306375] [drm:intel_dp_aux_init] registering DPDDC-A bus for card0-eDP-1 [ 4.306402] [drm:edp_panel_vdd_on] Turning eDP port A VDD on [ 4.306413] [drm:edp_panel_vdd_on] PP_STATUS: 0x80000008 PP_CONTROL: 0xabcd000f [ 4.319361] [drm:intel_dp_get_dpcd] DPCD: 11 0a 02 00 00 00 00 00 00 00 00 00 00 00 00 [ 4.331840] [drm] failed to retrieve link info, disabling eDP [ 4.331862] [drm:edp_panel_vdd_off_sync] Turning eDP port A VDD off Series reverted: [ 4.770004] [drm:intel_dp_init_connector] Adding eDP connector on port A [ 4.777651] [drm:intel_dp_init_panel_power_sequencer] cur t1_t3 2000 t8 0 t9 2000 t10 500 t11_t12 6000 [ 4.788222] [drm:intel_dp_init_panel_power_sequencer] vbt t1_t3 2000 t8 10 t9 2000 t10 500 t11_t12 5000 [ 4.798890] [drm:intel_dp_init_panel_power_sequencer] panel power up delay 200, power down delay 50, power cycle delay 600 [ 4.811424] [drm:intel_dp_init_panel_power_sequencer] backlight on delay 1, off delay 200 [ 4.820705] [drm:intel_dp_aux_init] registering DPDDC-A bus for card0-eDP-1 [ 4.828631] [drm:edp_panel_vdd_on] Turning eDP port A VDD on [ 4.835061] [drm:edp_panel_vdd_on] PP_STATUS: 0x80000008 PP_CONTROL: 0xabcd000f [ 4.843757] [drm:intel_dp_get_dpcd] DPCD: 11 0a 02 00 00 00 00 00 00 00 00 00 00 00 00 [ 4.853032] [drm:intel_dp_get_dpcd] Display Port TPS3 support: source yes, sink no [ 4.861624] [drm:intel_dp_print_rates] source rates: 162000, 270000, 540000 [ 4.869551] [drm:intel_dp_print_rates] sink rates: 162000, 270000 [ 4.876558] [drm:intel_dp_print_rates] common rates: 162000, 270000 [ 4.883812] [drm:intel_dp_init_panel_power_sequencer_registers] panel power sequencer register settings: PP_ON 0x7d00001, PP_OFF 0x1f40001, PP_DIV 0x4af06 [ 4.900522] asix 1-2:1.0 eth0: register 'asix' at usb-0000:00:14.0-2, ASIX AX88772 USB 2.0 Ethernet, b6:c3:97:fe:06:71 [ 4.905379] [drm:drm_edid_to_eld] ELD: no CEA Extension found [ 4.905380] [drm:intel_dp_drrs_init] VBT doesn't support DRRS [ 4.905385] [drm:intel_panel_setup_backlight] Connector eDP-1 backlight initialized, enabled, brightness 937/937 Regards, Tvrtko
On Friday 01 April 2016 01:11 PM, Ander Conselvan De Oliveira wrote: > On Thu, 2016-03-31 at 12:38 +0000, Patchwork wrote: >> == Series Details == >> >> Series: series starting with [1/5] drm/i915: Splitting intel_dp_detect >> URL : https://patchwork.freedesktop.org/series/5044/ >> State : success > I pushed those to dinq. > > I fixed a couple of "Alignment should match open parenthesis" errors from > checkpatch. I should have pointed those out during review, but I missed them. Ohh.. Apology for the inconvenience caused.. Thanks for fixing these errors.. Shubhangi > > For future reference, in a expression like below, > > DRM_DEBUG_KMS("debug message %d", > number), > > the second line should be aligned with the opening '('. > > Ander > Sure.. Will ensure that in future patches.. Shubhangi >> == Summary == >> >> Series 5044v1 Series without cover letter >> http://patchwork.freedesktop.org/api/1.0/series/5044/revisions/1/mbox/ >> >> Test kms_pipe_crc_basic: >> Subgroup suspend-read-crc-pipe-c: >> dmesg-warn -> PASS (bsw-nuc-2) >> >> bdw-nuci7 total:196 pass:184 dwarn:0 dfail:0 fail:0 skip:12 >> bdw-ultra total:196 pass:175 dwarn:0 dfail:0 fail:0 skip:21 >> bsw-nuc-2 total:196 pass:159 dwarn:0 dfail:0 fail:0 skip:37 >> byt-nuc total:196 pass:161 dwarn:0 dfail:0 fail:0 skip:35 >> hsw-brixbox total:196 pass:174 dwarn:0 dfail:0 fail:0 skip:22 >> hsw-gt2 total:27 pass:24 dwarn:0 dfail:0 fail:0 skip:2 >> skl-i7k-2 total:196 pass:173 dwarn:0 dfail:0 fail:0 skip:23 >> skl-nuci5 total:196 pass:185 dwarn:0 dfail:0 fail:0 skip:11 >> snb-dellxps total:79 pass:68 dwarn:0 dfail:0 fail:0 skip:10 >> >> Results at /archive/results/CI_IGT_test/Patchwork_1753/ >> >> 03c0f854e93263563f559d2bc8e47fb51adae697 drm-intel-nightly: 2016y-03m-31d-10h >> -50m-15s UTC integration manifest >> c448c6c059ae7bcdb7345feafd5324dd6dd164a7 drm/i915: force full detect on sink >> count change >> c1a69603958ccde4084f379f6c1a02314b8f5245 drm/i915: Read sink_count dpcd always >> 5f91fb8d635f35130714bf60601948996ee976e3 drm/i915: Reorganizing >> intel_dp_check_link_status >> 950d50e19edac435bed7a08f6147af55cd2c8835 drm/i915: Cleaning up >> intel_dp_hpd_pulse >> 41fd654a2ac9ffc2d59ccf23511113b28f6271b1 drm/i915: Splitting intel_dp_detect >> >> _______________________________________________ >> Intel-gfx mailing list >> Intel-gfx@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
On Mon, 04 Apr 2016, Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> wrote: > On 01/04/16 08:41, Ander Conselvan De Oliveira wrote: >> On Thu, 2016-03-31 at 12:38 +0000, Patchwork wrote: >>> == Series Details == >>> >>> Series: series starting with [1/5] drm/i915: Splitting intel_dp_detect >>> URL : https://patchwork.freedesktop.org/series/5044/ >>> State : success >> >> I pushed those to dinq. > > This series seems to break eDP detection on BDW RVP. I presume this is due to the sink count check. Can you add debug logging to print intel_dp->sink_count after it's been read in intel_dp_get_dpcd() please? Then the question is, is this just because you have an RVP with who knows what panel, or do we have to take into account potentially broken panels too? Then I assume the fix would be to to ignore sink count for eDP. BR, Jani. > > Old kernel: > > [ 1.554183] [drm:intel_dp_init_connector] Adding eDP connector on port A > [ 1.554245] [drm:intel_dp_init_panel_power_sequencer] cur t1_t3 2000 t8 0 t9 2000 t10 500 t11_t12 6000 > [ 1.554254] [drm:intel_dp_init_panel_power_sequencer] vbt t1_t3 2000 t8 10 t9 2000 t10 500 t11_t12 5000 > [ 1.554263] [drm:intel_dp_init_panel_power_sequencer] panel power up delay 200, power down delay 50, power cycle delay 600 > [ 1.554271] [drm:intel_dp_init_panel_power_sequencer] backlight on delay 1, off delay 200 > [ 1.554279] [drm:intel_dp_aux_init] registering DPDDC-A bus for card0-eDP-1 > [ 1.554530] [drm:edp_panel_vdd_on] Turning eDP port A VDD on > [ 1.554562] [drm:edp_panel_vdd_on] PP_STATUS: 0x80000008 PP_CONTROL: 0xabcd000f > [ 1.556670] [drm:intel_dp_get_dpcd] DPCD: 11 0a 02 00 00 00 00 00 00 00 00 00 00 00 00 > [ 1.557617] [drm:intel_dp_get_dpcd] Display Port TPS3 support: source yes, sink no > [ 1.557627] [drm:intel_dp_print_rates] source rates: 162000, 270000, 540000 > [ 1.557633] [drm:intel_dp_print_rates] sink rates: 162000, 270000 > [ 1.557638] [drm:intel_dp_print_rates] common rates: 162000, 270000 > [ 1.557651] [drm:intel_dp_init_panel_power_sequencer_registers] panel power sequencer register settings: PP_ON 0x7d00001, PP_OFF 0x1f40001, PP_DIV 0x4af06 > [ 1.567299] [drm:drm_edid_to_eld] ELD: no CEA Extension found > [ 1.567308] [drm:intel_dp_drrs_init] VBT doesn't support DRRS > [ 1.567319] [drm:intel_panel_setup_backlight] Connector eDP-1 backlight initialized, enabled, brightness 937/937 > > > Todays nightly: > > [ 4.306321] [drm:intel_dp_init_connector] Adding eDP connector on port A > [ 4.306370] [drm:intel_dp_init_panel_power_sequencer] cur t1_t3 2000 t8 0 t9 2000 t10 500 t11_t12 6000 > [ 4.306371] [drm:intel_dp_init_panel_power_sequencer] vbt t1_t3 2000 t8 10 t9 2000 t10 500 t11_t12 5000 > [ 4.306373] [drm:intel_dp_init_panel_power_sequencer] panel power up delay 200, power down delay 50, power cycle delay 600 > [ 4.306374] [drm:intel_dp_init_panel_power_sequencer] backlight on delay 1, off delay 200 > [ 4.306375] [drm:intel_dp_aux_init] registering DPDDC-A bus for card0-eDP-1 > [ 4.306402] [drm:edp_panel_vdd_on] Turning eDP port A VDD on > [ 4.306413] [drm:edp_panel_vdd_on] PP_STATUS: 0x80000008 PP_CONTROL: 0xabcd000f > [ 4.319361] [drm:intel_dp_get_dpcd] DPCD: 11 0a 02 00 00 00 00 00 00 00 00 00 00 00 00 > [ 4.331840] [drm] failed to retrieve link info, disabling eDP > [ 4.331862] [drm:edp_panel_vdd_off_sync] Turning eDP port A VDD off > > Series reverted: > > [ 4.770004] [drm:intel_dp_init_connector] Adding eDP connector on port A > [ 4.777651] [drm:intel_dp_init_panel_power_sequencer] cur t1_t3 2000 t8 0 t9 2000 t10 500 t11_t12 6000 > [ 4.788222] [drm:intel_dp_init_panel_power_sequencer] vbt t1_t3 2000 t8 10 t9 2000 t10 500 t11_t12 5000 > [ 4.798890] [drm:intel_dp_init_panel_power_sequencer] panel power up delay 200, power down delay 50, power cycle delay 600 > [ 4.811424] [drm:intel_dp_init_panel_power_sequencer] backlight on delay 1, off delay 200 > [ 4.820705] [drm:intel_dp_aux_init] registering DPDDC-A bus for card0-eDP-1 > [ 4.828631] [drm:edp_panel_vdd_on] Turning eDP port A VDD on > [ 4.835061] [drm:edp_panel_vdd_on] PP_STATUS: 0x80000008 PP_CONTROL: 0xabcd000f > [ 4.843757] [drm:intel_dp_get_dpcd] DPCD: 11 0a 02 00 00 00 00 00 00 00 00 00 00 00 00 > [ 4.853032] [drm:intel_dp_get_dpcd] Display Port TPS3 support: source yes, sink no > [ 4.861624] [drm:intel_dp_print_rates] source rates: 162000, 270000, 540000 > [ 4.869551] [drm:intel_dp_print_rates] sink rates: 162000, 270000 > [ 4.876558] [drm:intel_dp_print_rates] common rates: 162000, 270000 > [ 4.883812] [drm:intel_dp_init_panel_power_sequencer_registers] panel power sequencer register settings: PP_ON 0x7d00001, PP_OFF 0x1f40001, PP_DIV 0x4af06 > [ 4.900522] asix 1-2:1.0 eth0: register 'asix' at usb-0000:00:14.0-2, ASIX AX88772 USB 2.0 Ethernet, b6:c3:97:fe:06:71 > [ 4.905379] [drm:drm_edid_to_eld] ELD: no CEA Extension found > [ 4.905380] [drm:intel_dp_drrs_init] VBT doesn't support DRRS > [ 4.905385] [drm:intel_panel_setup_backlight] Connector eDP-1 backlight initialized, enabled, brightness 937/937 > > Regards, > > Tvrtko > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
On 04/04/16 12:08, Jani Nikula wrote: > On Mon, 04 Apr 2016, Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> wrote: >> On 01/04/16 08:41, Ander Conselvan De Oliveira wrote: >>> On Thu, 2016-03-31 at 12:38 +0000, Patchwork wrote: >>>> == Series Details == >>>> >>>> Series: series starting with [1/5] drm/i915: Splitting intel_dp_detect >>>> URL : https://patchwork.freedesktop.org/series/5044/ >>>> State : success >>> >>> I pushed those to dinq. >> >> This series seems to break eDP detection on BDW RVP. > > I presume this is due to the sink count check. Can you add debug logging > to print intel_dp->sink_count after it's been read in > intel_dp_get_dpcd() please? intel_dp->sink_count is zero here. (raw value, before the DP_GET_SINK_COUNT.) Also, intel_dp_dpcd_read_wake suggests a possibility for reading garbage with not overly confident wording for the workaround there. > Then the question is, is this just because you have an RVP with who > knows what panel, or do we have to take into account potentially broken > panels too? Then I assume the fix would be to to ignore sink count for > eDP. No idea. :) Regards, Tvrtko
On 04/04/16 12:41, Tvrtko Ursulin wrote: > > On 04/04/16 12:08, Jani Nikula wrote: >> On Mon, 04 Apr 2016, Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> >> wrote: >>> On 01/04/16 08:41, Ander Conselvan De Oliveira wrote: >>>> On Thu, 2016-03-31 at 12:38 +0000, Patchwork wrote: >>>>> == Series Details == >>>>> >>>>> Series: series starting with [1/5] drm/i915: Splitting intel_dp_detect >>>>> URL : https://patchwork.freedesktop.org/series/5044/ >>>>> State : success >>>> >>>> I pushed those to dinq. >>> >>> This series seems to break eDP detection on BDW RVP. >> >> I presume this is due to the sink count check. Can you add debug logging >> to print intel_dp->sink_count after it's been read in >> intel_dp_get_dpcd() please? > > intel_dp->sink_count is zero here. (raw value, before the > DP_GET_SINK_COUNT.) > > Also, intel_dp_dpcd_read_wake suggests a possibility for reading garbage > with not overly confident wording for the workaround there. > >> Then the question is, is this just because you have an RVP with who >> knows what panel, or do we have to take into account potentially broken >> panels too? Then I assume the fix would be to to ignore sink count for >> eDP. > > No idea. :) I could really use a solution for this. My only development platform is incapacitated unless I revert this series which, apart from the extra work when preparing and sending out patches this is taking, including lost time waiting on CI which I suspect dislikes patches from top of unknown bases, I think it won't be so easy to continue doing so when the conflicts start arriving. :( Regards, Tvrtko
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 3bdd8ba..b4cff63 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -129,6 +129,7 @@ static void edp_panel_vdd_off(struct intel_dp *intel_dp, bool sync); static void vlv_init_panel_power_sequencer(struct intel_dp *intel_dp); static void vlv_steal_power_sequencer(struct drm_device *dev, enum pipe pipe); +static void intel_dp_unset_edid(struct intel_dp *intel_dp); static unsigned int intel_dp_unused_lane_mask(int lane_count) { @@ -4513,6 +4514,7 @@ intel_dp_set_edid(struct intel_dp *intel_dp) struct intel_connector *intel_connector = intel_dp->attached_connector; struct edid *edid; + intel_dp_unset_edid(intel_dp); edid = intel_dp_get_edid(intel_dp); intel_connector->detect_edid = edid; @@ -4533,9 +4535,10 @@ intel_dp_unset_edid(struct intel_dp *intel_dp) intel_dp->has_audio = false; } -static enum drm_connector_status -intel_dp_detect(struct drm_connector *connector, bool force) +static void +intel_dp_long_pulse(struct intel_connector *intel_connector) { + struct drm_connector *connector = &intel_connector->base; struct intel_dp *intel_dp = intel_attached_dp(connector); struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp); struct intel_encoder *intel_encoder = &intel_dig_port->base; @@ -4545,17 +4548,6 @@ intel_dp_detect(struct drm_connector *connector, bool force) bool ret; u8 sink_irq_vector; - DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", - connector->base.id, connector->name); - intel_dp_unset_edid(intel_dp); - - if (intel_dp->is_mst) { - /* MST devices are disconnected from a monitor POV */ - if (intel_encoder->type != INTEL_OUTPUT_EDP) - intel_encoder->type = INTEL_OUTPUT_DISPLAYPORT; - return connector_status_disconnected; - } - power_domain = intel_display_port_aux_power_domain(intel_encoder); intel_display_power_get(to_i915(dev), power_domain); @@ -4576,14 +4568,18 @@ intel_dp_detect(struct drm_connector *connector, bool force) goto out; } + if (intel_encoder->type != INTEL_OUTPUT_EDP) + intel_encoder->type = INTEL_OUTPUT_DISPLAYPORT; + intel_dp_probe_oui(intel_dp); ret = intel_dp_probe_mst(intel_dp); if (ret) { - /* if we are in MST mode then this connector - won't appear connected or have anything with EDID on it */ - if (intel_encoder->type != INTEL_OUTPUT_EDP) - intel_encoder->type = INTEL_OUTPUT_DISPLAYPORT; + /* + * If we are in MST mode then this connector + * won't appear connected or have anything + * with EDID on it + */ status = connector_status_disconnected; goto out; } @@ -4598,8 +4594,6 @@ intel_dp_detect(struct drm_connector *connector, bool force) intel_dp_set_edid(intel_dp); - if (intel_encoder->type != INTEL_OUTPUT_EDP) - intel_encoder->type = INTEL_OUTPUT_DISPLAYPORT; status = connector_status_connected; /* Try to read the source of the interrupt */ @@ -4617,8 +4611,37 @@ intel_dp_detect(struct drm_connector *connector, bool force) } out: + if (status != connector_status_connected) + intel_dp_unset_edid(intel_dp); intel_display_power_put(to_i915(dev), power_domain); - return status; + return; +} + +static enum drm_connector_status +intel_dp_detect(struct drm_connector *connector, bool force) +{ + struct intel_dp *intel_dp = intel_attached_dp(connector); + struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp); + struct intel_encoder *intel_encoder = &intel_dig_port->base; + struct intel_connector *intel_connector = to_intel_connector(connector); + + DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", + connector->base.id, connector->name); + + if (intel_dp->is_mst) { + /* MST devices are disconnected from a monitor POV */ + intel_dp_unset_edid(intel_dp); + if (intel_encoder->type != INTEL_OUTPUT_EDP) + intel_encoder->type = INTEL_OUTPUT_DISPLAYPORT; + return connector_status_disconnected; + } + + intel_dp_long_pulse(intel_dp->attached_connector); + + if (intel_connector->detect_edid) + return connector_status_connected; + else + return connector_status_disconnected; } static void