[PATCH 0/5] HDCP SRM interface

Deucher, Alexander Alexander.Deucher at amd.com
Wed Jan 22 19:49:42 UTC 2020


[AMD Public Use]

If you resend the patch set, it might be good to include the script in the series for reference as well.

Alex

________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of Harry Wentland <hwentlan at amd.com>
Sent: Wednesday, January 22, 2020 2:27 PM
To: Lakha, Bhawanpreet <Bhawanpreet.Lakha at amd.com>; Alex Deucher <alexdeucher at gmail.com>
Cc: Wentland, Harry <Harry.Wentland at amd.com>; amd-gfx list <amd-gfx at lists.freedesktop.org>
Subject: Re: [PATCH 0/5] HDCP SRM interface



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://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Calexander.deucher%40amd.com%7C6045839ca9f14797ff3a08d79f713094%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637153180855191595&sdata=evmiajEJOkOb2L2GgUxg6JsWadR99PgoTE%2F6cQoBKfs%3D&reserved=0
>>>
_______________________________________________
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%7Calexander.deucher%40amd.com%7C6045839ca9f14797ff3a08d79f713094%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637153180855191595&sdata=evmiajEJOkOb2L2GgUxg6JsWadR99PgoTE%2F6cQoBKfs%3D&reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20200122/78e52161/attachment.htm>


More information about the amd-gfx mailing list