[PATCH 0/5] HDCP SRM interface

Bhawanpreet Lakha Bhawanpreet.lakha at amd.com
Wed Jan 22 16:44:00 UTC 2020


On 2020-01-22 11:23 a.m., Alex Deucher wrote:
> On Wed, Jan 22, 2020 at 11:12 AM Harry Wentland <hwentlan at amd.com> wrote:
>> On 2020-01-16 3:29 p.m., Bhawanpreet Lakha wrote:
>>> These patches adds support for SRM loading. By providing an interface to the
>>> usermode
>>>
>>> SRM has to be persistent and since the kernel cannot directly write to system
>>> storage we need to provide an interface so that the usermode can do it for us
>>>
>> We'll want to elaborate a bit more on why and how this is done. As
>> mentioned on my patch 2 comments I recommend to do this there as the
>> cover letter is lost after merge.
>>
> You might also want to cc dri-devel if you resend to get more reviews.
> I'm also not crazy about having to update the file in chunks, but I
> don't have any better ideas off hand.  Maybe an ioctl would be
> cleaner?
>
> Alex

The kernel can only send PAGE_SIZE (4KB) at once, so if the file is 
bigger than PAGE_SIZE (max SRM is 5KB) it will send it again until its 
finished (unless we increase the page size).

 From the user space its just a single command to read/write

     save to storage : cat /sys/class/drm/card0/device/hdcp_srm > file

     load from storage : cat file> /sys/class/drm/card0/device/hdcp_srm

I will send it to dri-devel after fixing what Harry suggested.

Thanks

Bhawan

>> Harry
>>
>>> Bhawanpreet Lakha (5):
>>>    drm/amd/display: Pass amdgpu_device instead of psp_context
>>>    drm/amd/display: update psp interface header
>>>    drm/amd/display: Add sysfs interface for set/get srm
>>>    drm/amd/display: Load srm before enabling HDCP
>>>    drm/amd/display: call psp set/get interfaces
>>>
>>>   .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |   2 +-
>>>   .../amd/display/amdgpu_dm/amdgpu_dm_hdcp.c    | 182 +++++++++++++++++-
>>>   .../amd/display/amdgpu_dm/amdgpu_dm_hdcp.h    |   9 +-
>>>   .../drm/amd/display/modules/hdcp/hdcp_psp.h   |  26 ++-
>>>   4 files changed, 212 insertions(+), 7 deletions(-)
>>>
>> _______________________________________________
>> 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=02%7C01%7CBhawanpreet.Lakha%40amd.com%7Ce190d770392e468225c308d79f57655d%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637153070030895879&sdata=5mlINUlUGz4bkIcK1hUjves9N3BviOdtKuLFPftn1SY%3D&reserved=0


More information about the amd-gfx mailing list