From patchwork Wed Jun 20 08:48:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 10476519 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 000EA604D3 for ; Wed, 20 Jun 2018 08:49:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E63AB28D2C for ; Wed, 20 Jun 2018 08:49:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DAB8628D60; Wed, 20 Jun 2018 08:49:01 +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 94FC828D55 for ; Wed, 20 Jun 2018 08:49:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0422D89807; Wed, 20 Jun 2018 08:49:01 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id 41A7989807 for ; Wed, 20 Jun 2018 08:48:59 +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 fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Jun 2018 01:48:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,246,1526367600"; d="scan'208";a="65700029" Received: from jnikula-mobl2.fi.intel.com (HELO localhost) ([10.237.72.62]) by fmsmga001.fm.intel.com with ESMTP; 20 Jun 2018 01:48:56 -0700 From: Jani Nikula To: intel-gfx@lists.freedesktop.org Date: Wed, 20 Jun 2018 11:48:47 +0300 Message-Id: <20180620084847.16558-1-jani.nikula@intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180620081105.31868-1-jani.nikula@intel.com> References: <20180620081105.31868-1-jani.nikula@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Subject: [Intel-gfx] [RFC PATCH v2] 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. v2: fix unused variable warnings 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 | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 6ac6c8787dcf..93db47ecda06 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -4955,21 +4955,17 @@ static void intel_dp_force(struct drm_connector *connector) { struct intel_dp *intel_dp = intel_attached_dp(connector); - struct intel_encoder *intel_encoder = &dp_to_dig_port(intel_dp)->base; - struct drm_i915_private *dev_priv = to_i915(intel_encoder->base.dev); DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", 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)