From patchwork Mon Oct 28 09:43:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: 1064094935 <1064094935@qq.com> X-Patchwork-Id: 13853236 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 7360ED13588 for ; Mon, 28 Oct 2024 10:02:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B653110E446; Mon, 28 Oct 2024 10:02:22 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=qq.com header.i=@qq.com header.b="uUGoTT8n"; dkim-atps=neutral X-Greylist: delayed 734 seconds by postgrey-1.36 at gabe; Mon, 28 Oct 2024 10:02:21 UTC Received: from out203-205-221-164.mail.qq.com (out203-205-221-164.mail.qq.com [203.205.221.164]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2159510E446; Mon, 28 Oct 2024 10:02:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1730109738; bh=xeyQ4CVlwUPQjV1gtHpbGii9ZeSWJyc+nho/aGfUvpc=; h=From:To:Cc:Subject:Date; b=uUGoTT8nOEkYUu1QLaP3qK050tw4qC+XPpiO+UijjRvkiNgWuSMI9xZi5uobnZHJp pVBVDzjxsm3Qc5qS72qsKSL6x6V0dXaRSM1CKqPzpaM1tO0skvtWkgSedtVLPKK4sj 93Hz7gDnOm1T7/PWDxQ9HvjJc6wS+AzUkgoXFWms= Received: from localhost.localdomain ([111.48.58.10]) by newxmesmtplogicsvrsza15-1.qq.com (NewEsmtp) with SM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SX1iLFg= From: 1064094935@qq.com To: Jani Nikula Cc: Rodrigo Vivi , Lucas De Marchi , Thomas , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, pengfuyuan Subject: [PATCH] drm/xe/hdcp: Fix logic errors Date: Mon, 28 Oct 2024 17:43:14 +0800 X-OQ-MSGID: <20241028094314.524356-1-1064094935@qq.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: pengfuyuan Here the gsc struct null pointer check should use '||' instead of '&&'. Fix the following patches: drm/xe/hdcp: Check GSC structure validity Signed-off-by: pengfuyuan --- drivers/gpu/drm/xe/display/xe_hdcp_gsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c b/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c index 6619a40aed15..f4332f06b6c8 100644 --- a/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c +++ b/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c @@ -42,7 +42,7 @@ bool intel_hdcp_gsc_check_status(struct xe_device *xe) struct xe_gsc *gsc = >->uc.gsc; bool ret = true; - if (!gsc && !xe_uc_fw_is_enabled(&gsc->fw)) { + if (!gsc || !xe_uc_fw_is_enabled(&gsc->fw)) { drm_dbg_kms(&xe->drm, "GSC Components not ready for HDCP2.x\n"); return false;