From patchwork Tue Dec 17 08:37:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kandpal, Suraj" X-Patchwork-Id: 13911378 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 01BD1E7717F for ; Tue, 17 Dec 2024 08:37:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7411710E201; Tue, 17 Dec 2024 08:37:25 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="n84ltyWL"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2A6BD10E201; Tue, 17 Dec 2024 08:37:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1734424644; x=1765960644; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=mYy0BptuBEsm2X9Op6GxxPgSW9JuvoiEtfnFbgPv3OQ=; b=n84ltyWLTp2KrgnYjiFn/1t1tEM3A7IHloBylRNNEzujjVgmXn+Sf3I2 KDwWqPAg00Cx+5cq9ak8ncYw0LGf11GCufhqL0GkZJ64TyQPm5EzarNup 6tvPl4p4eMjDcboh1dZoAqPlnPp8mOe6OFl8a82ddJ2fMruSfcScCMQND XosW7omcRnn6aXAjHikoL/jddhNQbfm762VUPMxJw99iOz382cx/PfRZq ryE0j3mjHoR+0FWH12bD1SrOLTIUOSLj47gamVsfxMtjLOYQovMN34efR mV9USKA/E1jNzoJkNSS0mieGtsBbFp/XJtPXpPr1FN7rAB916oCdjf4iQ A==; X-CSE-ConnectionGUID: eoIjqVEWQgKvUIAwBa0n6A== X-CSE-MsgGUID: WYtCZiedSoWMRRNZ976PGQ== X-IronPort-AV: E=McAfee;i="6700,10204,11288"; a="34570383" X-IronPort-AV: E=Sophos;i="6.12,241,1728975600"; d="scan'208";a="34570383" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Dec 2024 00:37:23 -0800 X-CSE-ConnectionGUID: TLG0H9YAQMaIN4Qb5nhqlg== X-CSE-MsgGUID: pvZq+cXFT+q6J3B2Vok1Nw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,241,1728975600"; d="scan'208";a="128283223" Received: from kandpal-x299-ud4-pro.iind.intel.com ([10.190.239.10]) by orviesa002.jf.intel.com with ESMTP; 17 Dec 2024 00:37:22 -0800 From: Suraj Kandpal To: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: ankit.k.nautiyal@intel.com, Suraj Kandpal Subject: [PATCH] drm/i915/hdcp: Fix Repeater authentication during topology change Date: Tue, 17 Dec 2024 14:07:23 +0530 Message-Id: <20241217083723.2883317-1-suraj.kandpal@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" When topology changes before beginning a new HDCP authentication by sending AKE_init message we need to first authenticate only the repeater if that fails only then makes sense to enable a new HDCP authentication. Even though it made sense to not enable HDCP directly from check_link and schedule it repeater authentication needs to be done immidieatly Fixes: 47ef55a8b784 ("drm/i915/hdcp: Don't enable HDCP2.2 directly from check_link") Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/i915/display/intel_hdcp.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c index f6e68a0e3b6d..9ff2274ed7e7 100644 --- a/drivers/gpu/drm/i915/display/intel_hdcp.c +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c @@ -2182,6 +2182,19 @@ static int intel_hdcp2_check_link(struct intel_connector *connector) drm_dbg_kms(display->drm, "HDCP2.2 Downstream topology change\n"); + + ret = hdcp2_authenticate_repeater_topology(connector); + if (!ret) { + intel_hdcp_update_value(connector, + DRM_MODE_CONTENT_PROTECTION_ENABLED, + true); + goto out; + } + + drm_dbg_kms(display->drm, + "[CONNECTOR:%d:%s] Repeater topology auth failed.(%d)\n", + connector->base.base.id, connector->base.name, + ret); } else { drm_dbg_kms(display->drm, "[CONNECTOR:%d:%s] HDCP2.2 link failed, retrying auth\n",