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 0AAA1281379; Thu, 13 Feb 2025 14:33:07 +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=1739457188; cv=none; b=mHJcEYUFct6OZkV22UyzP3rTY59CLjKXKIUUdPuITNcdl9sKCzclJLO/rzuyhIiNNIPBmlsEkq8xsc7HNRgA5/gjBYXGhp6WEZIN3T1W/uFa11/LW4tlNySHt7pofNYixAOsZeUCpF0xcQ0fv69vfF7IdTJcWzhrImgnHMOeTp4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739457188; c=relaxed/simple; bh=2yYyIiP2uuirjA3SfJfuc3r1m2I1hvBudVc8rGJaleM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tMSrhtPsBNDsDQq29/zRee5UuVrisOozey/lOBSB4R2N9kATKAM92WHmpu+M/TGhhE+EOwnersIC84NXipHExd3mANaZcx2DPFBRjZ6UOj6lxYQATBytjM1kL7rtZAD/HpDDg3mVwqYpkyAxH3gaZ/PaB+Iu4Wah4EBNVcepJVo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=qpS+kZA6; 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="qpS+kZA6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 098D0C4CEE4; Thu, 13 Feb 2025 14:33:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1739457187; bh=2yYyIiP2uuirjA3SfJfuc3r1m2I1hvBudVc8rGJaleM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qpS+kZA6DrUShzDfSEQdInY0LC3yZ58IaDxKE0/dXpjkBgNCKHHssxP88bgMjZovd av62VD31guhPO33IgkOqmOWjCQB7I1IfMVr8rCVcxIHXpbJ9pvErK432lVTdSRK3IQ L1oNeEfMTmhPeiNFR0mWC8ZKNr8crw6dDHvo4MQo= 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.12 040/422] drm/bridge: it6505: fix HDCP Bstatus check Date: Thu, 13 Feb 2025 15:23:09 +0100 Message-ID: <20250213142438.112267240@linuxfoundation.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250213142436.408121546@linuxfoundation.org> References: <20250213142436.408121546@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.12-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 d55d7dad9545f..0f7d50da56835 100644 --- a/drivers/gpu/drm/bridge/ite-it6505.c +++ b/drivers/gpu/drm/bridge/ite-it6505.c @@ -2312,14 +2312,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