[PATCH 1/1] drm/amdgpu/display: remove hdcp_srm sysfs

Deucher, Alexander Alexander.Deucher at amd.com
Fri Feb 12 17:01:09 UTC 2021


[AMD Official Use Only - Internal Distribution Only]

Acked-by: Alex Deucher <alexander.deucher at amd.com>
________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of Nirmoy <nirmodas at amd.com>
Sent: Friday, February 12, 2021 11:59 AM
To: Das, Nirmoy <Nirmoy.Das at amd.com>; amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
Subject: Re: [PATCH 1/1] drm/amdgpu/display: remove hdcp_srm sysfs

ping!

I should've added more info into the subject line :

s/remove hdcp_srm sysfs/remove hdcp_srm sysfs on device removal

Without this patch I get below error on second/later modprobes

[ 404.362298] sysfs: cannot create duplicate filename
'/devices/pci0000:00/0000:00:01.1/0000:10:00.0/0000:11:00.0/0000:12:00.0/hdcp_srm'



Regards,

Nirmoy

On 2/10/21 6:21 PM, Nirmoy Das wrote:
> Fixes: 9037246bb2da5 ("drm/amd/display: Add sysfs interface for set/get srm")
>
> Signed-off-by: Nirmoy Das <nirmoy.das at amd.com>
> ---
>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c      | 2 +-
>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 3 ++-
>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.h | 2 +-
>   3 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 626a8cc92d65..083d75b747c2 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -1128,7 +1128,7 @@ static void amdgpu_dm_fini(struct amdgpu_device *adev)
>
>   #ifdef CONFIG_DRM_AMD_DC_HDCP
>        if (adev->dm.hdcp_workqueue) {
> -             hdcp_destroy(adev->dm.hdcp_workqueue);
> +             hdcp_destroy(&adev->dev->kobj, adev->dm.hdcp_workqueue);
>                adev->dm.hdcp_workqueue = NULL;
>        }
>
> 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
> index b297ddc24d3a..0cdbfcd475ec 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
> @@ -376,7 +376,7 @@ static void event_cpirq(struct work_struct *work)
>   }
>
>
> -void hdcp_destroy(struct hdcp_workqueue *hdcp_work)
> +void hdcp_destroy(struct kobject *kobj, struct hdcp_workqueue *hdcp_work)
>   {
>        int i = 0;
>
> @@ -385,6 +385,7 @@ void hdcp_destroy(struct hdcp_workqueue *hdcp_work)
>                cancel_delayed_work_sync(&hdcp_work[i].watchdog_timer_dwork);
>        }
>
> +     sysfs_remove_bin_file(kobj, &hdcp_work[0].attr);
>        kfree(hdcp_work->srm);
>        kfree(hdcp_work->srm_temp);
>        kfree(hdcp_work);
> 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
> index 5159b3a5e5b0..09294ff122fe 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.h
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.h
> @@ -69,7 +69,7 @@ void hdcp_update_display(struct hdcp_workqueue *hdcp_work,
>
>   void hdcp_reset_display(struct hdcp_workqueue *work, unsigned int link_index);
>   void hdcp_handle_cpirq(struct hdcp_workqueue *work, unsigned int link_index);
> -void hdcp_destroy(struct hdcp_workqueue *work);
> +void hdcp_destroy(struct kobject *kobj, struct hdcp_workqueue *work);
>
>   struct hdcp_workqueue *hdcp_create_workqueue(struct amdgpu_device *adev, struct cp_psp *cp_psp, struct dc *dc);
>
_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20210212/6bed5594/attachment-0001.htm>


More information about the amd-gfx mailing list