From patchwork Fri Feb 28 16:18:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver Barta X-Patchwork-Id: 11412927 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9F7D314B4 for ; Fri, 28 Feb 2020 17:04:44 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7E0812467B for ; Fri, 28 Feb 2020 17:04:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LweKRLZa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7E0812467B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9E1086F483; Fri, 28 Feb 2020 17:04:43 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by gabe.freedesktop.org (Postfix) with ESMTPS id C03946F473 for ; Fri, 28 Feb 2020 16:19:18 +0000 (UTC) Received: by mail-wr1-x441.google.com with SMTP id e8so3605424wrm.5 for ; Fri, 28 Feb 2020 08:19:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=ozlLLMLX46imgC3MpZNEVXdDMjR8/goPp5y60J/cWgs=; b=LweKRLZaGDimOsuZe2XxlJaBKTsOZewiGSF8WeO6UiMxT9ED/7ooRapd3YR/rL41Dp x+9j2toIxz4lpbmPRkciJjs9vufSZKg50yPGUVVb6CnMoyMwKLQZeaYCg2bFlzCBFm4s 2U5I2XhCZ6HsXf1QXs2YHw5nrNKMbKFrEXafAvwecAun06CTL3iDQRsCsDAmcTDEzizt AEfkQJef3djcV3S4xuokfJACEkVlwVbM8v15mK20h069i+NtY4wJQgLf7I/FAyx0vOrg Hl1YFu6C6eB8KAhCKRlcRyPd2SgScEjjmh8HE4j+prYIeZgUD3ixeV5x3O7ThdVasfCW LEQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=ozlLLMLX46imgC3MpZNEVXdDMjR8/goPp5y60J/cWgs=; b=ot7CO2DSO6KamKbPvJX4z6tVppF2VQ/2QemUf2P7oG/M0ahyXJNkqqpq02aGbJPePY jRjEqSuWNahTp3miClUrz4314lr+njv8v6sdQKCLE9EuY/TyWbJZFla42J3GIzOKw9MI 6kDqmr44jU7AA9dokly/l9TVhAVEGY5o2ijvhx0W9GV60e78sgZdaA7W+kHqOdWW6LY1 CbdpxX1/qD0eLALipkPDVyPuL0MjjJuHRvueOKUVseXFIDpKfSEQgLMn31Sa3i1mtPZi QqYDHT+fOTIj1AxV9UJWnArFbVQI0fGTYbeH+OiOEuGDhCWCM6/saifZIQoybKvDzvpN 0m7g== X-Gm-Message-State: APjAAAUgqvISHzJQ+Jsj2RGLFjVe3KwK0oqOO2ETDBgDG6zUppob7VA8 jqdQpatznzqQaqHPr9MNUmhjDhnad+Q= X-Google-Smtp-Source: APXvYqxpPn1pqbkljtkznWOP3A7GVArgWXIEkmQErv3eDXbmx5vnig6wzXRyVgEhvx+Bu6v5m+6VLw== X-Received: by 2002:adf:f3c4:: with SMTP id g4mr5813635wrp.394.1582906757222; Fri, 28 Feb 2020 08:19:17 -0800 (PST) Received: from xyz-CELSIUS-H720.fritz.box (x4d080c20.dyn.telefonica.de. [77.8.12.32]) by smtp.gmail.com with ESMTPSA id i7sm3162028wma.32.2020.02.28.08.19.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Feb 2020 08:19:16 -0800 (PST) From: Oliver Barta X-Google-Original-From: Oliver Barta To: intel-gfx@lists.freedesktop.org, Jani Nikula , Joonas Lahtinen Date: Fri, 28 Feb 2020 17:18:19 +0100 Message-Id: <20200228161821.6667-1-oliver.barta@aptiv.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200226080645.7421-1-oliver.barta@aptiv.com> References: <20200226080645.7421-1-oliver.barta@aptiv.com> MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 28 Feb 2020 17:04:38 +0000 Subject: [Intel-gfx] [PATCH v2 1/3] drm/i915: HDCP: fix Ri prime check done during link check X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Oliver Barta Cc: Daniel Vetter , Ravisankar Madasamy , Sean Paul , Oliver Barta Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Oliver Barta The check was always succeeding even in case of a mismatch due to the HDCP_STATUS_ENC bit being set. Make sure both bits are actually set. Signed-off-by: Oliver Barta Fixes: 2320175feb74 ("drm/i915: Implement HDCP for HDMI") --- [v2] Rebased patch series from master to drm-intel-next-queued branch. drivers/gpu/drm/i915/display/intel_hdmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c index 0ac9bdfbc094..ac4276157182 100644 --- a/drivers/gpu/drm/i915/display/intel_hdmi.c +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c @@ -1536,7 +1536,8 @@ bool intel_hdmi_hdcp_check_link(struct intel_digital_port *intel_dig_port) intel_de_write(i915, HDCP_RPRIME(i915, cpu_transcoder, port), ri.reg); /* Wait for Ri prime match */ - if (wait_for(intel_de_read(i915, HDCP_STATUS(i915, cpu_transcoder, port)) & + if (wait_for((intel_de_read(i915, HDCP_STATUS(i915, cpu_transcoder, + port)) & (HDCP_STATUS_RI_MATCH | HDCP_STATUS_ENC)) == (HDCP_STATUS_RI_MATCH | HDCP_STATUS_ENC), 1)) { DRM_ERROR("Ri' mismatch detected, link check failed (%x)\n", intel_de_read(i915, HDCP_STATUS(i915, cpu_transcoder, port))); From patchwork Fri Feb 28 16:18:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver Barta X-Patchwork-Id: 11412925 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 825ED14B4 for ; Fri, 28 Feb 2020 17:04:41 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 603E92467B for ; Fri, 28 Feb 2020 17:04:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mr2ssORR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 603E92467B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 17AB96F481; Fri, 28 Feb 2020 17:04:39 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9D7C46F473 for ; Fri, 28 Feb 2020 16:19:19 +0000 (UTC) Received: by mail-wr1-x443.google.com with SMTP id j7so3523127wrp.13 for ; Fri, 28 Feb 2020 08:19:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=eqseIcmu+MfcAC50KLqR6ic7UqFu7vyegYUj6axUB7o=; b=mr2ssORRdyNxbaLtMMuku9DopwriklOQxjxvvo92Vt921HmX8bkH3FZXzX+m7jH4un 62v7P0VULDbSA1rj1M2ejwPdFuihXJtZHbUprX+bQnu3+GE2le8WBPAVjqtNHBCTqlTX SQKWf/UAKJ49DwWqkdwfd7ZpLarcZxxjzmx5o6jVjnioIwusBgMURlAKJrDETWZlCdFh deZd5YBgOUnnopMCWfK3/Qm1fjO6FcRJdZKbeVyiafymM4rUsIhS6uQQpQd3CSvzRwMT UR960RcMK6vkys2iWCRHd7juJk1LMu65EfWOVuDpOkgliIgK1RODOZjIwkNQXqDnp4uD 2M3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=eqseIcmu+MfcAC50KLqR6ic7UqFu7vyegYUj6axUB7o=; b=G3PIHhE4aR3JG3opolQv/cpzXjXtZNKE7riY+NaR6gR8cvdIb6HUvY7/a+74pudOa+ TxTPLdb20JSd6QDEb1jc6ohCfCceYPKtj+H92TXWoNC3OKsNaL7zXMQpwpuA+9J1Uxe1 eWFj2OzYWkfTpnR7GwuH2GayADWBxiLZtiMBeasx3FqxbE0mVciWc7iiQhGxhEr0zkpg hCo2DvvPrn0dXizf8p5UleVGXuVq99DbLgt0GF2FHyGQImPT777WtMVUTJnWCZqgCxHs wCfvwDS7sr0sb0edPYJ6xrkNMO8EQsnxtJ7Pvhs9NfWN/95JfHaWCpeAJYPeVBXqavHO Dd2w== X-Gm-Message-State: APjAAAW8NHp5O2bH7pB3n7KaW9PDoXBzEkWIp14X+36eEHZThBpjhSkp MZhkh6u/vyiGb82y3QUIYdKPbKz4SFs= X-Google-Smtp-Source: APXvYqzrsh+9/eG77UL8FjWhfTXn8bgOeo7iz9L8IGMHS2xWIjP69afYljsLWmO7jZGHm7beWzjVBQ== X-Received: by 2002:a05:6000:118e:: with SMTP id g14mr5875827wrx.39.1582906758200; Fri, 28 Feb 2020 08:19:18 -0800 (PST) Received: from xyz-CELSIUS-H720.fritz.box (x4d080c20.dyn.telefonica.de. [77.8.12.32]) by smtp.gmail.com with ESMTPSA id i7sm3162028wma.32.2020.02.28.08.19.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Feb 2020 08:19:17 -0800 (PST) From: Oliver Barta X-Google-Original-From: Oliver Barta To: intel-gfx@lists.freedesktop.org, Jani Nikula , Joonas Lahtinen Date: Fri, 28 Feb 2020 17:18:20 +0100 Message-Id: <20200228161821.6667-2-oliver.barta@aptiv.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200228161821.6667-1-oliver.barta@aptiv.com> References: <20200226080645.7421-1-oliver.barta@aptiv.com> <20200228161821.6667-1-oliver.barta@aptiv.com> MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 28 Feb 2020 17:04:38 +0000 Subject: [Intel-gfx] [PATCH v2 2/3] drm/i915: HDCP: fix Ri prime and R0 checks during auth X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Oliver Barta Cc: Daniel Vetter , Ravisankar Madasamy , Sean Paul , Oliver Barta Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Oliver Barta Including HDCP_STATUS_ENC bit in the checks is pointless. It is simply not set at this point. Signed-off-by: Oliver Barta Fixes: ee5e5e7a5e0f ("drm/i915: Add HDCP framework + base implementation") --- [v2] Rebased patch series from master to drm-intel-next-queued branch. drivers/gpu/drm/i915/display/intel_hdcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c index 229b4e329864..89d035da95e7 100644 --- a/drivers/gpu/drm/i915/display/intel_hdcp.c +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c @@ -705,7 +705,7 @@ static int intel_hdcp_auth(struct intel_connector *connector) /* Wait for R0 ready */ if (wait_for(intel_de_read(dev_priv, HDCP_STATUS(dev_priv, cpu_transcoder, port)) & - (HDCP_STATUS_R0_READY | HDCP_STATUS_ENC), 1)) { + HDCP_STATUS_R0_READY, 1)) { DRM_ERROR("Timed out waiting for R0 ready\n"); return -ETIMEDOUT; } @@ -738,7 +738,7 @@ static int intel_hdcp_auth(struct intel_connector *connector) /* Wait for Ri prime match */ if (!wait_for(intel_de_read(dev_priv, HDCP_STATUS(dev_priv, cpu_transcoder, port)) & - (HDCP_STATUS_RI_MATCH | HDCP_STATUS_ENC), 1)) + HDCP_STATUS_RI_MATCH, 1)) break; } From patchwork Fri Feb 28 16:18:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver Barta X-Patchwork-Id: 11412929 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2B5C3924 for ; Fri, 28 Feb 2020 17:04:46 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0972A2467B for ; Fri, 28 Feb 2020 17:04:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="THDxqMV5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0972A2467B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C900E6F484; Fri, 28 Feb 2020 17:04:43 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by gabe.freedesktop.org (Postfix) with ESMTPS id A35B36F473 for ; Fri, 28 Feb 2020 16:19:20 +0000 (UTC) Received: by mail-wr1-x443.google.com with SMTP id e8so3605523wrm.5 for ; Fri, 28 Feb 2020 08:19:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=5Snul1mQYsXQKqD98wu2BS2piWBOWoNGOiiZ66SipW4=; b=THDxqMV5azA5bLtqLzs+XqW+icQA+ma7dvSIDCZKuU8aw/iIEGhYvUGCP6EqsYHy1p w9Aj/4kjWW0JxlvBL5+fE61X+NX+z8r7NXd5oxe1dCyNuC34i3O8BMXqlZ1C2u0CK3Qe kg4TZU35gVTWsDU6qkhFRcys0r/y93dPlxseYDNbXypwfl/dR7J5kxAlXFAejKPfY/HG cSfzZXonwvGxWrQp7wowm9tTMirdBP+9iZqdSiJvMYmCQ590C+oFC+HpzNyH7F6tqBbf Fsp5LxTAHyu7WzH2+SQXGxFVY8Bt1CV/AYMScf5dguxWiHZ0cUYLQp0yJxG0v4rs3oIt xWRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=5Snul1mQYsXQKqD98wu2BS2piWBOWoNGOiiZ66SipW4=; b=XLovFnpf6fdww1+tZbR590aqvRrcEXLMZm7b4S7o4+i5jUUj5WlwJFz13uHKOD69Gd rduDQR1yLi3ABFdrhTeM/hg+67yGu1i0ycZ6//CUUIYPZK43POBGe7d/mxxVQlSR7h8G CiYF1FxdDjD8L63Kg9sZcLA3w8EIm4J6U85l2kDlWChiw4Dfnpc02jsV2z4PIO7gIHZ0 bMjANHtYg0oMuFHAmVpBmkvr1sednVv2B/rOZtCCGzP4gEENULpW0AElg0zTbbSq11pU EUwvcIgN+zU7uo8QEK3jD9CrWw/dbjNGqOHfCuTjf+NB7VASNpbDxAZL2hce9PKiI6dF k1kg== X-Gm-Message-State: APjAAAWhAhyc3jFDp91NyM50bYss9VazhygBUa6CU03rHBRfTzbCkIqJ zVaDZCC9P/S+bydimZuupbK0Fvy7OcM= X-Google-Smtp-Source: APXvYqyqGvKhp8K4er1Pl7ikhTpdu6VcjHBv1p9JNltinVPjgd0dOjkVhsU4PeJSwgBhbHfDXzavnQ== X-Received: by 2002:adf:dfc2:: with SMTP id q2mr5354091wrn.209.1582906759135; Fri, 28 Feb 2020 08:19:19 -0800 (PST) Received: from xyz-CELSIUS-H720.fritz.box (x4d080c20.dyn.telefonica.de. [77.8.12.32]) by smtp.gmail.com with ESMTPSA id i7sm3162028wma.32.2020.02.28.08.19.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Feb 2020 08:19:18 -0800 (PST) From: Oliver Barta X-Google-Original-From: Oliver Barta To: intel-gfx@lists.freedesktop.org, Jani Nikula , Joonas Lahtinen Date: Fri, 28 Feb 2020 17:18:21 +0100 Message-Id: <20200228161821.6667-3-oliver.barta@aptiv.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200228161821.6667-1-oliver.barta@aptiv.com> References: <20200226080645.7421-1-oliver.barta@aptiv.com> <20200228161821.6667-1-oliver.barta@aptiv.com> MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 28 Feb 2020 17:04:38 +0000 Subject: [Intel-gfx] [PATCH v2 3/3] drm/i915: HDCP: retry link integrity check on failure X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Oliver Barta Cc: Daniel Vetter , Ravisankar Madasamy , Sean Paul , Oliver Barta Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Oliver Barta A single Ri mismatch doesn't automatically mean that the link integrity is broken. Update and check of Ri and Ri' are done asynchronously. In case an update happens just between the read of Ri' and the check against Ri there will be a mismatch even if the link integrity is fine otherwise. A failure can also be caused by transmission errors on DDC. Signed-off-by: Oliver Barta --- [v2] Rebased patch series from master to drm-intel-next-queued branch. drivers/gpu/drm/i915/display/intel_hdmi.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c index ac4276157182..296b4e1bb3c6 100644 --- a/drivers/gpu/drm/i915/display/intel_hdmi.c +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c @@ -1516,7 +1516,7 @@ int intel_hdmi_hdcp_toggle_signalling(struct intel_digital_port *intel_dig_port, } static -bool intel_hdmi_hdcp_check_link(struct intel_digital_port *intel_dig_port) +bool intel_hdmi_hdcp_check_link_once(struct intel_digital_port *intel_dig_port) { struct drm_i915_private *i915 = to_i915(intel_dig_port->base.base.dev); struct intel_connector *connector = @@ -1539,13 +1539,26 @@ bool intel_hdmi_hdcp_check_link(struct intel_digital_port *intel_dig_port) if (wait_for((intel_de_read(i915, HDCP_STATUS(i915, cpu_transcoder, port)) & (HDCP_STATUS_RI_MATCH | HDCP_STATUS_ENC)) == (HDCP_STATUS_RI_MATCH | HDCP_STATUS_ENC), 1)) { - DRM_ERROR("Ri' mismatch detected, link check failed (%x)\n", + DRM_DEBUG("Ri' mismatch detected (%x)\n", intel_de_read(i915, HDCP_STATUS(i915, cpu_transcoder, port))); return false; } return true; } +static +bool intel_hdmi_hdcp_check_link(struct intel_digital_port *intel_dig_port) +{ + int retry; + + for (retry = 0; retry < 3; retry++) + if (intel_hdmi_hdcp_check_link_once(intel_dig_port)) + return true; + + DRM_ERROR("Link check failed\n"); + return false; +} + struct hdcp2_hdmi_msg_timeout { u8 msg_id; u16 timeout;