Message ID | 1478230214-4016-1-git-send-email-dhinakaran.pandiyan@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Dhinakaran, [auto build test ERROR on drm-intel/for-linux-next] [also build test ERROR on v4.9-rc3 next-20161028] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Dhinakaran-Pandiyan/drm-i915-dp-Update-connector-status-for-DP-MST-hotplugs/20161104-113409 base: git://anongit.freedesktop.org/drm-intel for-linux-next config: x86_64-randconfig-x010-201644 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All error/warnings (new ones prefixed by >>): drivers/gpu/drm/i915/intel_dp_mst.c: In function 'intel_dp_mst_hotplug': >> drivers/gpu/drm/i915/intel_dp_mst.c:509:4: error: 'changed' undeclared (first use in this function) changed = true; ^~~~~~~ drivers/gpu/drm/i915/intel_dp_mst.c:509:4: note: each undeclared identifier is reported only once for each function it appears in >> drivers/gpu/drm/i915/intel_dp_mst.c:496:7: warning: unused variable 'change' [-Wunused-variable] bool change = false; ^~~~~~ vim +/changed +509 drivers/gpu/drm/i915/intel_dp_mst.c 490 static void intel_dp_mst_hotplug(struct drm_dp_mst_topology_mgr *mgr) 491 { 492 struct intel_dp *intel_dp = container_of(mgr, struct intel_dp, mst_mgr); 493 struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp); 494 struct drm_device *dev = intel_dig_port->base.base.dev; 495 struct intel_connector *intel_connector; > 496 bool change = false; 497 enum drm_connector_status old_status; 498 499 for_each_intel_connector(dev, intel_connector) { 500 struct drm_connector *connector = &(intel_connector->base); 501 502 if (intel_connector->mst_port != intel_dp) 503 continue; 504 505 old_status = connector->status; 506 connector->status = connector->funcs->detect(connector, false); 507 508 if (old_status != connector->status) > 509 changed = true; 510 } 511 512 if (changed) --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
> == Series Details == > > Series: drm/i915/dp: Update connector status for DP MST hotplugs (rev2) > URL : https://patchwork.freedesktop.org/series/14821/ > State : warning > > == Summary == > > Series 14821v2 drm/i915/dp: Update connector status for DP MST hotplugs > https://patchwork.freedesktop.org/api/1.0/series/14821/revisions/2/mbox/ > > Test kms_force_connector_basic: > Subgroup force-edid: > pass -> DMESG-WARN (fi-snb-2520m) https://bugs.freedesktop.org/show_bug.cgi?id=74102 ? > Subgroup force-load-detect: > dmesg-warn -> PASS (fi-snb-2520m) > > fi-bdw-5557u total:241 pass:226 dwarn:0 dfail:0 fail:0 skip:15 > fi-bsw-n3050 total:241 pass:201 dwarn:0 dfail:0 fail:0 skip:40 > fi-bxt-t5700 total:241 pass:213 dwarn:0 dfail:0 fail:0 skip:28 > fi-byt-j1900 total:241 pass:213 dwarn:0 dfail:0 fail:0 skip:28 > fi-hsw-4770 total:241 pass:221 dwarn:0 dfail:0 fail:0 skip:20 > fi-hsw-4770r total:241 pass:221 dwarn:0 dfail:0 fail:0 skip:20 > fi-ilk-650 total:241 pass:188 dwarn:0 dfail:0 fail:0 skip:53 > fi-ivb-3520m total:241 pass:219 dwarn:0 dfail:0 fail:0 skip:22 > fi-ivb-3770 total:241 pass:219 dwarn:0 dfail:0 fail:0 skip:22 > fi-kbl-7200u total:241 pass:219 dwarn:0 dfail:0 fail:0 skip:22 > fi-skl-6260u total:241 pass:227 dwarn:0 dfail:0 fail:0 skip:14 > fi-skl-6700hq total:241 pass:220 dwarn:0 dfail:0 fail:0 skip:21 > fi-skl-6700k total:241 pass:219 dwarn:1 dfail:0 fail:0 skip:21 > fi-skl-6770hq total:241 pass:227 dwarn:0 dfail:0 fail:0 skip:14 > fi-snb-2520m total:241 pass:208 dwarn:1 dfail:0 fail:0 skip:32 > fi-snb-2600 total:241 pass:208 dwarn:0 dfail:0 fail:0 skip:33 > fi-byt-n2820 failed to collect. IGT log at Patchwork_2901/fi-byt-n2820/igt.log > > 21f242e536b5077c046df785a8c4c28374941c15 drm-intel-nightly: 2016y-11m- > 03d-21h-01m-03s UTC integration manifest > bc09ce1 drm/i915/dp: Update connector status for DP MST hotplugs > > == Logs == > > For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_2901/ Jani Saarinen Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo
diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c index 3ffbd69..a28b12b 100644 --- a/drivers/gpu/drm/i915/intel_dp_mst.c +++ b/drivers/gpu/drm/i915/intel_dp_mst.c @@ -492,8 +492,25 @@ static void intel_dp_mst_hotplug(struct drm_dp_mst_topology_mgr *mgr) struct intel_dp *intel_dp = container_of(mgr, struct intel_dp, mst_mgr); struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp); struct drm_device *dev = intel_dig_port->base.base.dev; + struct intel_connector *intel_connector; + bool change = false; + enum drm_connector_status old_status; + + for_each_intel_connector(dev, intel_connector) { + struct drm_connector *connector = &(intel_connector->base); + + if (intel_connector->mst_port != intel_dp) + continue; + + old_status = connector->status; + connector->status = connector->funcs->detect(connector, false); + + if (old_status != connector->status) + changed = true; + } - drm_kms_helper_hotplug_event(dev); + if (changed) + drm_kms_helper_hotplug_event(dev); } static const struct drm_dp_mst_topology_cbs mst_cbs = {
Hotplugging a monitor in DP MST configuration triggers short pulses. Although the short pulse handling path ends up in the MST hotplug function, we do not perform a detect before sending the hotplug uvent. This leads to the connector status not being updated when the userspace calls DRM_IOCTL_MODE_GETCONNECTOR. So, let's call the connector function ->detect() to update the connector status before sending the uevent. Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> --- drivers/gpu/drm/i915/intel_dp_mst.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)