From patchwork Wed Dec 10 23:53:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Todd Previte X-Patchwork-Id: 5473381 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9B097BEEA8 for ; Wed, 10 Dec 2014 23:54:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C5B022016C for ; Wed, 10 Dec 2014 23:54:21 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 04CD52018E for ; Wed, 10 Dec 2014 23:54:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6F6956E704; Wed, 10 Dec 2014 15:54:20 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by gabe.freedesktop.org (Postfix) with ESMTP id 6A3F26E704 for ; Wed, 10 Dec 2014 15:54:19 -0800 (PST) Received: by mail-pa0-f43.google.com with SMTP id kx10so3819996pab.30 for ; Wed, 10 Dec 2014 15:54:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Li+j0K5/PwgmFgs5jG9BmqnkIDe7K8HkKFFh+auo8eY=; b=nKrLbio4ldxsAyXu9qBl2KkqncFEOMwxRaClbCg/xGpFIh+IVqOr60pd9mweyBVIuI FjmDT7jO5U/Jf/KzGccFW9X4vnvJjfXkN2BHBy5lsITcPS6wMKqjXd8STi0qi1flYEIu L6ILnCBiRBadRbq9vo0UCiUYBs2/fI2XNxSmZl4UUTSUwCY3UzGgcx5ZTUKOP5990qwD BHh6xyBd1UGi56Mq9fPAlnWGhflaVapdwhcihbsiyJdPKy4S/Q+j2G/gbr7f/jaRAsBM PYJzEW/fiCir1cNL5WjvQ5G6B7vlRb1oPHjum/swwwu6xwg6eFaailsv86Wog9SDKE2N +08g== X-Received: by 10.68.213.8 with SMTP id no8mr11950979pbc.92.1418255659297; Wed, 10 Dec 2014 15:54:19 -0800 (PST) Received: from localhost.localdomain (ip68-3-234-27.ph.ph.cox.net. [68.3.234.27]) by mx.google.com with ESMTPSA id gy10sm5164958pbd.67.2014.12.10.15.54.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 10 Dec 2014 15:54:18 -0800 (PST) From: Todd Previte To: intel-gfx@lists.freedesktop.org Date: Wed, 10 Dec 2014 16:53:13 -0700 Message-Id: <1418255597-4716-14-git-send-email-tprevite@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1418255597-4716-1-git-send-email-tprevite@gmail.com> References: <1418255597-4716-1-git-send-email-tprevite@gmail.com> Subject: [Intel-gfx] [PATCH 13/17] drm/i915: Update intel_dp_hpd_pulse() to check link status for non-MST operation X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Moves the non-MST case out of the if-statement and places it at the beginning of the function to handle HPD events for SST mode. The reasoning behind this is to accommodate link status checks for compliance testing. Some test devices use long pulses to perform test requests so link status must be checked regardless of the pulse width for the SST operational mode. This patch replaces [PATCH 10/10] drm/i915: Fix intel_dp_hot_plug() in the previous compliance testing patch sequence. Review feedback on that patch indicated that updating intel_dp_hot_plug() was not the correct place for the test handler. Signed-off-by: Todd Previte --- drivers/gpu/drm/i915/intel_dp.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 4a55ca6..73014d8 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -4613,6 +4613,18 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd) power_domain = intel_display_port_power_domain(intel_encoder); intel_display_power_get(dev_priv, power_domain); + if (!intel_dp->is_mst) { + /* + * Pulse width doesn't matter for SST mode + * Handle the HPD event now + */ + drm_modeset_lock(&dev->mode_config.connection_mutex, NULL); + intel_dp_check_link_status(intel_dp); + drm_modeset_unlock(&dev->mode_config.connection_mutex); + ret = false; + goto put_power; + } + if (long_hpd) { if (HAS_PCH_SPLIT(dev)) { @@ -4637,16 +4649,6 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd) if (intel_dp_check_mst_status(intel_dp) == -EINVAL) goto mst_fail; } - - if (!intel_dp->is_mst) { - /* - * we'll check the link status via the normal hot plug path later - - * but for short hpds we should check it now - */ - drm_modeset_lock(&dev->mode_config.connection_mutex, NULL); - intel_dp_check_link_status(intel_dp); - drm_modeset_unlock(&dev->mode_config.connection_mutex); - } } ret = false; goto put_power;