From patchwork Wed Jun 20 08:11:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 10476179 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 38AB9604D3 for ; Wed, 20 Jun 2018 08:12:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1BC9928D38 for ; Wed, 20 Jun 2018 08:12:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 094E828F41; Wed, 20 Jun 2018 08:12:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1253928E81 for ; Wed, 20 Jun 2018 08:11:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BD0856E6BF; Wed, 20 Jun 2018 08:11:19 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 907986E6BF for ; Wed, 20 Jun 2018 08:11:18 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Jun 2018 01:11:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,246,1526367600"; d="scan'208";a="65692114" Received: from jnikula-mobl2.fi.intel.com (HELO localhost) ([10.237.72.62]) by fmsmga001.fm.intel.com with ESMTP; 20 Jun 2018 01:11:16 -0700 From: Jani Nikula To: intel-gfx@lists.freedesktop.org Date: Wed, 20 Jun 2018 11:11:05 +0300 Message-Id: <20180620081105.31868-1-jani.nikula@intel.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Subject: [Intel-gfx] [RFC PATCH] drm/i915/dp: try normal detection on connector force enable X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jani.nikula@intel.com Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Connector force enable on DP bypasses the detect hooks, skipping all the DPCD parameter reading and negotiation. This does not really have a chance to work, at all, and any modesets are bound to fail. Try to do the normal detection in the force hook on force enable. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103347 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106291 Cc: Ville Syrjälä Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/intel_dp.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 6ac6c8787dcf..ec9c96b1d013 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -4962,14 +4962,12 @@ intel_dp_force(struct drm_connector *connector) connector->base.id, connector->name); intel_dp_unset_edid(intel_dp); - if (connector->status != connector_status_connected) - return; - - intel_display_power_get(dev_priv, intel_dp->aux_power_domain); - - intel_dp_set_edid(intel_dp); - - intel_display_power_put(dev_priv, intel_dp->aux_power_domain); + /* + * Force enable doesn't really work with DP. Try the normal detect path + * anyway to read the DPCD etc. + */ + if (connector->status == connector_status_connected) + drm_helper_probe_detect(connector, NULL, false); } static int intel_dp_get_modes(struct drm_connector *connector)