Message ID | tencent_46D189AD021D29866D1A9806B47AB013700A@qq.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/xe/hdcp: Fix logic errors | expand |
> -----Original Message----- > From: dri-devel <dri-devel-bounces@lists.freedesktop.org> On Behalf Of > 1064094935@qq.com > Sent: Monday, October 28, 2024 3:13 PM > To: Jani Nikula <jani.nikula@linux.intel.com> > Cc: Vivi, Rodrigo <rodrigo.vivi@intel.com>; De Marchi, Lucas > <lucas.demarchi@intel.com>; Thomas <thomas.hellstrom@linux.intel.com>; > Maarten Lankhorst <maarten.lankhorst@linux.intel.com>; Maxime Ripard > <mripard@kernel.org>; Thomas Zimmermann <tzimmermann@suse.de>; > David Airlie <airlied@gmail.com>; Simona Vetter <simona@ffwll.ch>; intel- > gfx@lists.freedesktop.org; intel-xe@lists.freedesktop.org; dri- > devel@lists.freedesktop.org; linux-kernel@vger.kernel.org; pengfuyuan > <pengfuyuan@kylinos.cn> > Subject: [PATCH] drm/xe/hdcp: Fix logic errors > > From: pengfuyuan <pengfuyuan@kylinos.cn> > > Here the gsc struct null pointer check should use '||' instead of '&&'. > > Fix the following patches: > drm/xe/hdcp: Check GSC structure validity > This fix has already been sent https://patchwork.freedesktop.org/series/140291/ Regards, Suraj Kandpal > Signed-off-by: pengfuyuan <pengfuyuan@kylinos.cn> > --- > 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; > -- > 2.25.1
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;