From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E27E335BA; Thu, 13 Feb 2025 15:22:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739460130; cv=none; b=guViAxnyUvv5cPb39/IDFkoyNzH7vTHu4BESamshja/yhLfhbkp+RiJ9X/BsNNHLsCtAPkvXhfZAs/VQWjB09+PXxjgjCuglL5oGEscODe/P5AbwXEHRQLAxE+IDNfBxEKoxxmRv0neBkqymvW0Yzofu1bIYScsd25ks4USxntA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739460130; c=relaxed/simple; bh=DPpEwgxFSLlt5Waufj268Voh/K8GaUoqzuHhYAD5vHg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cdOiwMvcoV8t3t/2NCzo+wdGS7btRmiip6Jn6AToFLCdpbpwSZEjYGf5bm6ulipM1zotYzB69lhxMkbtuffED7DpWfGT1r1yAmO487mkX9F9QQVpPXLwoDaNv8BW/L2in+d/z6ZdPNU//1NBF1Gq1OJJVVz/QWDO9nD/g8EHDWk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=UkIJwv7R; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="UkIJwv7R" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B69AEC4CED1; Thu, 13 Feb 2025 15:22:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1739460130; bh=DPpEwgxFSLlt5Waufj268Voh/K8GaUoqzuHhYAD5vHg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UkIJwv7RA8MtKnn+hLvx51lTZrHls52jA6ZihZwVoZMSxacVKffl/FHtMAE5RVeBy yilQbM+OVdSbWb5htIyPizU8uHznerLZWh+Dsa0yA9zqWM63axQA9QagG18VCJNtem kYjeWr8a29gGJkyddI0r13AweiCs6ZOXGc3JK5Nc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Dmitry Baryshkov , Hermes Wu , AngeloGioacchino Del Regno , Sasha Levin Subject: [PATCH 6.6 023/273] drm/bridge: it6505: fix HDCP Bstatus check Date: Thu, 13 Feb 2025 15:26:35 +0100 Message-ID: <20250213142408.277427256@linuxfoundation.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250213142407.354217048@linuxfoundation.org> References: <20250213142407.354217048@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Hermes Wu [ Upstream commit 0fd2ff47d8c207fa3173661de04bb9e8201c0ad2 ] When HDCP is activated, a DisplayPort source receiving CP_IRQ from the sink shall check Bstatus from DPCD and process the corresponding value Reviewed-by: Dmitry Baryshkov Signed-off-by: Hermes Wu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20241230-v7-upstream-v7-5-e0fdd4844703@ite.corp-partner.google.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/bridge/ite-it6505.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/bridge/ite-it6505.c b/drivers/gpu/drm/bridge/ite-it6505.c index bd4c8f5d55a64..f037288e841ac 100644 --- a/drivers/gpu/drm/bridge/ite-it6505.c +++ b/drivers/gpu/drm/bridge/ite-it6505.c @@ -2309,14 +2309,20 @@ static int it6505_process_hpd_irq(struct it6505 *it6505) DRM_DEV_DEBUG_DRIVER(dev, "dp_irq_vector = 0x%02x", dp_irq_vector); if (dp_irq_vector & DP_CP_IRQ) { - it6505_set_bits(it6505, REG_HDCP_TRIGGER, HDCP_TRIGGER_CPIRQ, - HDCP_TRIGGER_CPIRQ); - bstatus = it6505_dpcd_read(it6505, DP_AUX_HDCP_BSTATUS); if (bstatus < 0) return bstatus; DRM_DEV_DEBUG_DRIVER(dev, "Bstatus = 0x%02x", bstatus); + + /*Check BSTATUS when recive CP_IRQ */ + if (bstatus & DP_BSTATUS_R0_PRIME_READY && + it6505->hdcp_status == HDCP_AUTH_GOING) + it6505_set_bits(it6505, REG_HDCP_TRIGGER, HDCP_TRIGGER_CPIRQ, + HDCP_TRIGGER_CPIRQ); + else if (bstatus & (DP_BSTATUS_REAUTH_REQ | DP_BSTATUS_LINK_FAILURE) && + it6505->hdcp_status == HDCP_AUTH_DONE) + it6505_start_hdcp(it6505); } ret = drm_dp_dpcd_read_link_status(&it6505->aux, link_status); -- 2.39.5