From nobody Tue Nov 26 22:34:28 2024 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 000601D1724 for ; Wed, 16 Oct 2024 07:54:12 +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=1729065253; cv=none; b=dKA1Gqjo0GfQxGO+cIi0GKdFpqi0YWIOn+Hzm7tKpRrMiE5lO+c4/lCdqe93QMianFposK1z2v+24/Pn8Gcir/2ja/Kk6ecrAe0FzMqIEBwzK7F8kXEniJqAFjiPre375eyXXn33cdbdMplDmsrNtucyHRjWRZSUPdBqSPHkDeg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729065253; c=relaxed/simple; bh=Vb+2n+MAUfgAIp8TePUzygedx1r8RBKo1kmKaDIUJB8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=D3rv155Ultf+9BDthN7sZpSFQsSbh70JLf/DX0vBMppmBQz94azrdSk6L+0G+JG7vmkQPOWgEwOaNG2F1e1FBhKNLpsrpgEyGxGs5FAl4UtMtZTbo+PbvfLvaYtteLw4UVQ38uAbTtMVmW0mIFruliZF7WCtOcP75RxlkZLNG50= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SWge3eLO; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="SWge3eLO" Received: by smtp.kernel.org (Postfix) with ESMTPS id C6DCEC4CED9; Wed, 16 Oct 2024 07:54:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729065252; bh=Vb+2n+MAUfgAIp8TePUzygedx1r8RBKo1kmKaDIUJB8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=SWge3eLOBKqWEdzGtCGv23f56qRiQYCyMicx53kG1ueWm8hD2b1KZmEX64i5+r3MS DkFIT7hgI5S34e1wym/NJ+40kuXJnFpzjg5hwQn8E4xaD89/zmB/HZ1Ul1t1sVdcWu AH8mrYDLRk8+VE7LxjW+UN/MF9lID7LLx0m5EqogRZHo9Z/s25WVScXxqYeJQjg3FA UjE95QYEqdmE5ODSLqU72QIonFRGCjZzxDaxKhd4JAO3jVqZXsBXvtCptElvgjcPnb 21UaFpHpa7pYT6rIkYXyrnFTibSnomzh6Ns4iWqp4hIp1lnoE8ecL/nzEstO8iYbak vTCYbjnch2zkw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB9D7D20684; Wed, 16 Oct 2024 07:54:12 +0000 (UTC) From: Hermes Wu via B4 Relay Date: Wed, 16 Oct 2024 15:54:18 +0800 Subject: [PATCH v6 06/10] drm/bridge: it6505: fix HDCP encryption when R0 ready Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241016-upstream-v6-v6-6-4d93a0c46de1@ite.com.tw> References: <20241016-upstream-v6-v6-0-4d93a0c46de1@ite.com.tw> In-Reply-To: <20241016-upstream-v6-v6-0-4d93a0c46de1@ite.com.tw> To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , AngeloGioacchino Del Regno , Pin-yen Lin Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Kenneth Hung , Pet Weng , Hermes Wu X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1729065263; l=1834; i=Hermes.wu@ite.com.tw; s=20241016; h=from:subject:message-id; bh=qR/Gpw52l5zLkqw/wfFTDrG6OM+qapW0KVFY2MBecyA=; b=Hu13NgyYtDaKX6ChWU8xiKMrGhUKfKUtC61YZjDWNkCcgZEZQv1ifNETnsEi2C98ig6wUv0P6 rCO2Xb7PtuSBqqA+fypGrs4anb/we3lrHybjNgXndbB6OQw0Jsjpysp X-Developer-Key: i=Hermes.wu@ite.com.tw; a=ed25519; pk=kV18uQEXox+1WccdQceCbMlJKN+BBNUk3N8VsoULcQ0= X-Endpoint-Received: by B4 Relay for Hermes.wu@ite.com.tw/20241016 with auth_id=250 X-Original-From: Hermes Wu Reply-To: Hermes.wu@ite.com.tw From: Hermes Wu When starting HDCP authentication, HDCP encryption should be enabled when R0'is checked. Change encryption enables time at R0' ready. The hardware HDCP engine trigger is changed and the repeater KSV fails will restart HDCP. Signed-off-by: Hermes Wu --- drivers/gpu/drm/bridge/ite-it6505.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/bridge/ite-it6505.c b/drivers/gpu/drm/bridge/i= te-it6505.c index 65c17e53e05f3bc2a647474cba7d9d7e737f11b8..85626b49a048a1178676ed61613= 0a522ca314152 100644 --- a/drivers/gpu/drm/bridge/ite-it6505.c +++ b/drivers/gpu/drm/bridge/ite-it6505.c @@ -2091,15 +2091,12 @@ static void it6505_hdcp_wait_ksv_list(struct work_s= truct *work) ksv_list_check =3D it6505_hdcp_part2_ksvlist_check(it6505); DRM_DEV_DEBUG_DRIVER(dev, "ksv list ready, ksv list check %s", ksv_list_check ? "pass" : "fail"); - if (ksv_list_check) { - it6505_set_bits(it6505, REG_HDCP_TRIGGER, - HDCP_TRIGGER_KSV_DONE, HDCP_TRIGGER_KSV_DONE); + + if (ksv_list_check) return; - } + timeout: - it6505_set_bits(it6505, REG_HDCP_TRIGGER, - HDCP_TRIGGER_KSV_DONE | HDCP_TRIGGER_KSV_FAIL, - HDCP_TRIGGER_KSV_DONE | HDCP_TRIGGER_KSV_FAIL); + it6505_start_hdcp(it6505); } =20 static void it6505_hdcp_work(struct work_struct *work) @@ -2472,7 +2469,11 @@ static void it6505_irq_hdcp_ksv_check(struct it6505 = *it6505) { struct device *dev =3D it6505->dev; =20 - DRM_DEV_DEBUG_DRIVER(dev, "HDCP event Interrupt"); + DRM_DEV_DEBUG_DRIVER(dev, "HDCP repeater R0 event Interrupt"); + /* 1B01 HDCP encription should start when R0 is ready*/ + it6505_set_bits(it6505, REG_HDCP_TRIGGER, + HDCP_TRIGGER_KSV_DONE, HDCP_TRIGGER_KSV_DONE); + schedule_work(&it6505->hdcp_wait_ksv_list); } =20 --=20 2.34.1