<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Andrey Grodzovsky <andrey.grodzovsky@amd.com><br>
<b>Sent:</b> Monday, March 19, 2018 4:55 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Grodzovsky, Andrey; Zhu, Rex<br>
<b>Subject:</b> [PATCH] drm/amd/powerplay: Fix NULL pointer deref on driver unbind.</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com><br>
---<br>
drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 8 +++++++-<br>
1 file changed, 7 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c<br>
index 3da3dcc..dbb0e69 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c<br>
@@ -286,6 +286,12 @@ static int pp_resume(void *handle)<br>
return hwmgr_hw_resume(hwmgr);<br>
}<br>
<br>
+static int pp_set_clockgating_state(void *handle,<br>
+ enum amd_clockgating_state state)<br>
+{<br>
+ return 0;<br>
+}<br>
+<br>
static const struct amd_ip_funcs pp_ip_funcs = {<br>
.name = "powerplay",<br>
.early_init = pp_early_init,<br>
@@ -300,7 +306,7 @@ static const struct amd_ip_funcs pp_ip_funcs = {<br>
.is_idle = pp_is_idle,<br>
.wait_for_idle = pp_wait_for_idle,<br>
.soft_reset = pp_sw_reset,<br>
- .set_clockgating_state = NULL,<br>
+ .set_clockgating_state = pp_set_clockgating_state,<br>
.set_powergating_state = pp_set_powergating_state,<br>
};<br>
<br>
-- <br>
2.7.4<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx" id="LPlnk57342" previewremoved="true">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>