<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:11pt;color:#0078D7;margin:5pt;" align="Left">
[AMD Official Use Only - Internal Distribution Only]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Acked-by: Alex Deucher <alexander.deucher@amd.com><br>
</div>
<div id="appendonsend"></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 Nirmoy <nirmodas@amd.com><br>
<b>Sent:</b> Friday, February 12, 2021 11:59 AM<br>
<b>To:</b> Das, Nirmoy <Nirmoy.Das@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Subject:</b> Re: [PATCH 1/1] drm/amdgpu/display: remove hdcp_srm sysfs</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">ping!<br>
<br>
I should've added more info into the subject line :<br>
<br>
s/remove hdcp_srm sysfs/remove hdcp_srm sysfs on device removal<br>
<br>
Without this patch I get below error on second/later modprobes<br>
<br>
[ 404.362298] sysfs: cannot create duplicate filename <br>
'/devices/pci0000:00/0000:00:01.1/0000:10:00.0/0000:11:00.0/0000:12:00.0/hdcp_srm'<br>
<br>
<br>
<br>
Regards,<br>
<br>
Nirmoy<br>
<br>
On 2/10/21 6:21 PM, Nirmoy Das wrote:<br>
> Fixes: 9037246bb2da5 ("drm/amd/display: Add sysfs interface for set/get srm")<br>
><br>
> Signed-off-by: Nirmoy Das <nirmoy.das@amd.com><br>
> ---<br>
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-<br>
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 3 ++-<br>
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.h | 2 +-<br>
> 3 files changed, 4 insertions(+), 3 deletions(-)<br>
><br>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c<br>
> index 626a8cc92d65..083d75b747c2 100644<br>
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c<br>
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c<br>
> @@ -1128,7 +1128,7 @@ static void amdgpu_dm_fini(struct amdgpu_device *adev)<br>
> <br>
> #ifdef CONFIG_DRM_AMD_DC_HDCP<br>
> if (adev->dm.hdcp_workqueue) {<br>
> - hdcp_destroy(adev->dm.hdcp_workqueue);<br>
> + hdcp_destroy(&adev->dev->kobj, adev->dm.hdcp_workqueue);<br>
> adev->dm.hdcp_workqueue = NULL;<br>
> }<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 b297ddc24d3a..0cdbfcd475ec 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>
> @@ -376,7 +376,7 @@ static void event_cpirq(struct work_struct *work)<br>
> }<br>
> <br>
> <br>
> -void hdcp_destroy(struct hdcp_workqueue *hdcp_work)<br>
> +void hdcp_destroy(struct kobject *kobj, struct hdcp_workqueue *hdcp_work)<br>
> {<br>
> int i = 0;<br>
> <br>
> @@ -385,6 +385,7 @@ void hdcp_destroy(struct hdcp_workqueue *hdcp_work)<br>
> cancel_delayed_work_sync(&hdcp_work[i].watchdog_timer_dwork);<br>
> }<br>
> <br>
> + sysfs_remove_bin_file(kobj, &hdcp_work[0].attr);<br>
> kfree(hdcp_work->srm);<br>
> kfree(hdcp_work->srm_temp);<br>
> kfree(hdcp_work);<br>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.h b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.h<br>
> index 5159b3a5e5b0..09294ff122fe 100644<br>
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.h<br>
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.h<br>
> @@ -69,7 +69,7 @@ void hdcp_update_display(struct hdcp_workqueue *hdcp_work,<br>
> <br>
> void hdcp_reset_display(struct hdcp_workqueue *work, unsigned int link_index);<br>
> void hdcp_handle_cpirq(struct hdcp_workqueue *work, unsigned int link_index);<br>
> -void hdcp_destroy(struct hdcp_workqueue *work);<br>
> +void hdcp_destroy(struct kobject *kobj, struct hdcp_workqueue *work);<br>
> <br>
> struct hdcp_workqueue *hdcp_create_workqueue(struct amdgpu_device *adev, struct cp_psp *cp_psp, struct dc *dc);<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&data=04%7C01%7Calexander.deucher%40amd.com%7Cf40303a3004b47d738b208d8cf77a0eb%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637487460023369776%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=QQJJm%2FfsnHj5kdltRjDv8Jd8qK8IYxEHleraMrXRuKY%3D&reserved=0">https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Calexander.deucher%40amd.com%7Cf40303a3004b47d738b208d8cf77a0eb%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637487460023369776%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=QQJJm%2FfsnHj5kdltRjDv8Jd8qK8IYxEHleraMrXRuKY%3D&reserved=0</a><br>
</div>
</span></font></div>
</div>
</body>
</html>