[PATCH 0/5] HDCP SRM interface

Harry Wentland hwentlan at amd.com
Wed Jan 22 19:27:53 UTC 2020



On 2020-01-22 11:44 a.m., Bhawanpreet Lakha wrote:
> 
> 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
> 

Please also add this info in the patch description or cover letter as
well, including how you iterate for a large SRM. A simple copy-paste
from the shell script should suffice. It's a bit hard to see how this
interface is being used from userspace, especially around the get/set in
chunks.

Harry

> 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://lists.freedesktop.org/mailman/listinfo/amd-gfx
>>>


More information about the amd-gfx mailing list