<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<p style="font-family:Arial;font-size:10pt;color:#0078D7;margin:15pt;" align="Left">
[AMD Official Use Only - Internal Distribution Only]<br>
</p>
<br>
<div>
<div>
<div>
<div style="direction: ltr;">Reviewed-by: Zhan Liu <zhan.liu@amd.com></div>
</div>
<div><br>
</div>
<div class="ms-outlook-ios-signature"></div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com><br>
<b>Sent:</b> Monday, November 25, 2019 10:40:24 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com><br>
<b>Subject:</b> [PATCH] drm/amd/display: Null check aconnector in event_property_validate</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">[Why]<br>
previously event_property_validate was only called after we enabled the display.<br>
But after "Refactor HDCP to handle multiple displays per link" this function<br>
can be called at any time. In certain cases we don't have a aconnector<br>
<br>
[How]<br>
Null check aconnector and exit early. This is ok because we only need to check the<br>
ENABLED->DESIRED transition if a connector exists.<br>
<br>
Fixes :cc5dae9f6286 drm/amd/display: Refactor HDCP to handle multiple displays per link<br>
Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com><br>
---<br>
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 3 +++<br>
 1 file changed, 3 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c<br>
index f6864a51891a..ae329335dfcc 100644<br>
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c<br>
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c<br>
@@ -225,6 +225,9 @@ static void event_property_validate(struct work_struct *work)<br>
         struct mod_hdcp_display_query query;<br>
         struct amdgpu_dm_connector *aconnector = hdcp_work->aconnector;<br>
 <br>
+       if (!aconnector)<br>
+               return;<br>
+<br>
         mutex_lock(&hdcp_work->mutex);<br>
 <br>
         query.encryption_status = MOD_HDCP_ENCRYPTION_STATUS_HDCP_OFF;<br>
-- <br>
2.17.1<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Czhan.liu%40amd.com%7C22996511e2124290c9fc08d771bdd059%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C1%7C637102932411167739&amp;sdata=Q0Wlb9vuIRKJgLfiFmpLIJWWsQzmj9hFm3dOKBVxutw%3D&amp;reserved=0">https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Czhan.liu%40amd.com%7C22996511e2124290c9fc08d771bdd059%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C1%7C637102932411167739&amp;sdata=Q0Wlb9vuIRKJgLfiFmpLIJWWsQzmj9hFm3dOKBVxutw%3D&amp;reserved=0</a></div>
</span></font></div>
</div>
</body>
</html>