]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Initialize attribute for hdcp_srm sysfs file
authorDavid Ward <david.ward@gatech.edu>
Mon, 10 May 2021 09:30:39 +0000 (05:30 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 11 May 2021 13:43:41 +0000 (09:43 -0400)
commit372e1c49aa4a382ffebaf9bdc5946e51145a9f0c
treef6113577ededc61d146b8b93b95836ccf50e2ef9
parent9f18679d827c873b6ee72f96f6ff93aed30c4e5a
drm/amd/display: Initialize attribute for hdcp_srm sysfs file

It is stored in dynamically allocated memory, so sysfs_bin_attr_init() must
be called to initialize it. (Note: "initialization" only sets the .attr.key
member in this struct; it does not change the value of any other members.)

Otherwise, when CONFIG_DEBUG_LOCK_ALLOC=y this message appears during boot:

    BUG: key ffff9248900cd148 has not been registered!

Fixes: e8da1e735222 ("drm/amd/display: Add sysfs interface for set/get srm")
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1586
Reported-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Signed-off-by: David Ward <david.ward@gatech.edu>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c