From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB231C2D0DB for ; Wed, 22 Jan 2020 19:49:45 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8F5DD24655 for ; Wed, 22 Jan 2020 19:49:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amdcloud.onmicrosoft.com header.i=@amdcloud.onmicrosoft.com header.b="rtAKSyBS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8F5DD24655 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=amd-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5830A6F8A1; Wed, 22 Jan 2020 19:49:45 +0000 (UTC) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2060.outbound.protection.outlook.com [40.107.236.60]) by gabe.freedesktop.org (Postfix) with ESMTPS id 743376F8A1 for ; Wed, 22 Jan 2020 19:49:44 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JEP+WzvJaQ/8ixOjXOW4TkjTezTAhvy84AJl1bP24qZPBqjjE98S+mxAPoVYJyKHNzGrQdWrrld+K48eJyBFpPaBnQ72a54SLwQ3igg1u9BfatWRl8ISIr1TCGrcZ+4FLmacDDkuf+KffpqCxZFDV7wVJ4rBdZBjiuLHnth0YcuIcGxUu6AAmss7cy0rkghK1CvFk1fc5S7Q4EIQeEi7l76Rw5VCH9tauIn3nbDMVZMFtj81Az2sa15EDwcWOyJkE/lAzKObhEST6M219R0OwdTyUbRDpgqLoUDQoIWX4PQbQSYsMk+hmFZUHaz9sFjTfZatVTBfTOFRvngTLucHWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CyLWwV0X8Yxnk2TAJ4ox2YXuhnZCfDZXuMl3or7Gss4=; b=WKfn5EnqtpHYUYS+hTr65CwlBehUo+8PgyRl5i/fbgTlVR8D4SOLJ2O+5GPRMydDy/Kswt1mRA5AveHSn85BkjfpB+hWTTS4vLjEs/EZOjumUBjTzRmtX8lBx7GCOhkvnTY0lQe7NnpVvdVTN+uhJEcGOaSPIx0cg5o+qvQBFZmiUD8iPhL4TZljl+gNSVmbY8xxe+d62BHDnzJqGKE0balV1LrxKe7TPRFwlA3icaUGAfRuKOyurXUg9kSc0hwK2wQhK5BaJEVMHlz8cWInK6xxBJQ+lQdXYZjw6FFhETWqxVwag2MKAWI828aEKT4hKhIldNMaBSnDQbGs4rPJvg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CyLWwV0X8Yxnk2TAJ4ox2YXuhnZCfDZXuMl3or7Gss4=; b=rtAKSyBSKUrNk9U+R1p4juU/eGDTCk2hZ9VwT7HquZv12J7IZ/mwjaFvAA5OQdqC89QkEEKdktIxg4bueIdjur0Fy8GoJJV+wF2tl/wvM9W/2paScfSyNRn9rlnZ2LxVahkg35lr+jWAUYIjygF3iRjEX7Mg2qT8oQh0sEf3JTA= Received: from CH2PR12MB3912.namprd12.prod.outlook.com (52.132.246.86) by CH2PR12MB3736.namprd12.prod.outlook.com (52.132.246.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.20; Wed, 22 Jan 2020 19:49:42 +0000 Received: from CH2PR12MB3912.namprd12.prod.outlook.com ([fe80::35e4:f61:8c42:333d]) by CH2PR12MB3912.namprd12.prod.outlook.com ([fe80::35e4:f61:8c42:333d%6]) with mapi id 15.20.2644.028; Wed, 22 Jan 2020 19:49:42 +0000 From: "Deucher, Alexander" To: "Wentland, Harry" , "Lakha, Bhawanpreet" , Alex Deucher Subject: Re: [PATCH 0/5] HDCP SRM interface Thread-Topic: [PATCH 0/5] HDCP SRM interface Thread-Index: AQHVzKvG5kVag1x7lkKHo0+XkeY/A6f24/yAgAADIYCAAAXWAIAALcqAgAAF6mQ= Date: Wed, 22 Jan 2020 19:49:42 +0000 Message-ID: References: <20200116202945.21801-1-Bhawanpreet.Lakha@amd.com> <55a3fd2d-c2ed-4af0-543e-9850118b722a@amd.com> <7eca48bb-d1e8-a1c4-0812-665438a38ecb@amd.com>, <67fb6764-7add-372c-95ae-8294c6e1c1e9@amd.com> In-Reply-To: <67fb6764-7add-372c-95ae-8294c6e1c1e9@amd.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_0d814d60-469d-470c-8cb0-58434e2bf457_Enabled=True; MSIP_Label_0d814d60-469d-470c-8cb0-58434e2bf457_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; MSIP_Label_0d814d60-469d-470c-8cb0-58434e2bf457_SetDate=2020-01-22T19:49:42.160Z; MSIP_Label_0d814d60-469d-470c-8cb0-58434e2bf457_Name=AMD Public; MSIP_Label_0d814d60-469d-470c-8cb0-58434e2bf457_ContentBits=0; MSIP_Label_0d814d60-469d-470c-8cb0-58434e2bf457_Method=Privileged; authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Deucher@amd.com; x-originating-ip: [71.219.59.120] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: af3580f9-36b1-4dc0-933a-08d79f7439a0 x-ms-traffictypediagnostic: CH2PR12MB3736:|CH2PR12MB3736: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 029097202E x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(136003)(396003)(366004)(376002)(346002)(199004)(189003)(966005)(45080400002)(478600001)(4326008)(2906002)(52536014)(71200400001)(8936002)(81156014)(19627405001)(76116006)(81166006)(186003)(8676002)(53546011)(7696005)(316002)(55016002)(66946007)(66556008)(9686003)(33656002)(86362001)(64756008)(5660300002)(6506007)(66476007)(66446008)(54906003)(110136005)(26005); DIR:OUT; SFP:1101; SCL:1; SRVR:CH2PR12MB3736; H:CH2PR12MB3912.namprd12.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: l3AFd6xbeO4EY8QaO5CrpXr8RTP9WZT9f1rxQYPyi8m6+foF9p1cvO6xtye49qyX3DGWYwUqy2DY8sQ3tx1m6t14OISo1QYf9RTBKjRJ1d+ksP+Iw3rgC9Y9xkomMMCu29G4dfWhRWNUAwSsaqsAgB1Ajkkk5fzJR7ULJ0W/3yr68kMVOR4SBXlYfLQ2JywN8aaAgiDXbvNgYlzCc4U97iLcuvnKIMQ4wWbet2aLVxgATAZj8Bcd3py44VyXjuFvjlvMU3aH8m9ETI8caQ/wp0tNdhxXAg5W2XbrH+3O3ThR6tIKDLO9couEGbHW2WmneDwK5gYthRcXLr6JvSjOZUZ9Qcbgxgkk4FyD58fUkYrpvhx1rysT4lTQk7EegO+kFhSmIgNk2AsQhDQzmsY+oenxnMe8zT8ysHDlGjCcujxlKVN84igt50/TUidRfXz0tiFoNseDHhnM/XHiaNg6GiAKpFyQ/z3xt0jPZoJUdJU= MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: af3580f9-36b1-4dc0-933a-08d79f7439a0 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Jan 2020 19:49:42.6622 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: vmWy3yCA3F1rcjt1zdr5sUGD0iD7FoKrR7KRVXkB7pVQADgjEmgfs65Dwm6VcWFjd/LbAmJ6PkXyIBqKkWdO9Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB3736 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Wentland, Harry" , amd-gfx list Content-Type: multipart/mixed; boundary="===============0946515435==" Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" --===============0946515435== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_CH2PR12MB3912DC3EC38450B31ED2FFFBF70C0CH2PR12MB3912namp_" --_000_CH2PR12MB3912DC3EC38450B31ED2FFFBF70C0CH2PR12MB3912namp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable [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 on behalf of Harry We= ntland Sent: Wednesday, January 22, 2020 2:27 PM To: Lakha, Bhawanpreet ; Alex Deucher Cc: Wentland, Harry ; amd-gfx list 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 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@lists.freedesktop.org >>> https://nam11.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Flis= ts.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=3D02%7C01%7Calex= ander.deucher%40amd.com%7C6045839ca9f14797ff3a08d79f713094%7C3dd8961fe4884e= 608e11a82d994e183d%7C0%7C0%7C637153180855191595&sdata=3DevmiajEJOkOb2L2= GgUxg6JsWadR99PgoTE%2F6cQoBKfs%3D&reserved=3D0 >>> _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://nam11.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Flists.f= reedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=3D02%7C01%7Calexande= r.deucher%40amd.com%7C6045839ca9f14797ff3a08d79f713094%7C3dd8961fe4884e608e= 11a82d994e183d%7C0%7C0%7C637153180855191595&sdata=3DevmiajEJOkOb2L2GgUx= g6JsWadR99PgoTE%2F6cQoBKfs%3D&reserved=3D0 --_000_CH2PR12MB3912DC3EC38450B31ED2FFFBF70C0CH2PR12MB3912namp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

[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@lists.freedesktop.org> on behalf of Harry Wentland <hwentlan= @amd.com>
Sent: Wednesday, January 22, 2020 2:27 PM
To: Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com>; Alex Deuch= er <alexdeucher@gmail.com>
Cc: Wentland, Harry <Harry.Wentland@amd.com>; amd-gfx list <= ;amd-gfx@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@amd.c= om> wrote:
>>> On 2020-01-16 3:29 p.m., Bhawanpreet Lakha wrote:
>>>> These patches adds support for SRM loading. By providing a= n
>>>> interface to the
>>>> usermode
>>>>
>>>> SRM has to be persistent and since the kernel cannot direc= tly write
>>>> to system
>>>> storage we need to provide an interface so that the usermo= de 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 revi= ews.
>> 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 b= e
>> 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/h= dcp_srm > file
>
>     load from storage : cat file> /sys/class/drm/car= d0/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 o= f psp_context
>>>>    drm/amd/display: update psp interface header<= br> >>>>    drm/amd/display: Add sysfs interface for set/= get srm
>>>>    drm/amd/display: Load srm before enabling HDC= P
>>>>    drm/amd/display: call psp set/get interfaces<= br> >>>>
>>>>   .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |&nbs= p;  2 +-
>>>>   .../amd/display/amdgpu_dm/amdgpu_dm_hdcp.c &nb= sp;  | 182
>>>> +++++++++++= 3;+++++-
>>>>   .../amd/display/amdgpu_dm/amdgpu_dm_hdcp.h &nb= sp;  |   9 +-
>>>>   .../drm/amd/display/modules/hdcp/hdcp_psp.h &n= bsp; |  26 ++-
>>>>   4 files changed, 212 insertions(+), 7 deletions= (-)
>>>>
>>> _______________________________________________
>>> amd-gfx mailing list
>>> amd-gfx@lists.freedesktop.org
>>> https://nam11.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Flists.f= reedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=3D02%7C01%7Calex= ander.deucher%40amd.com%7C6045839ca9f14797ff3a08d79f713094%7C3dd8961fe4884e= 608e11a82d994e183d%7C0%7C0%7C637153180855191595&amp;sdata=3DevmiajEJOkO= b2L2GgUxg6JsWadR99PgoTE%2F6cQoBKfs%3D&amp;reserved=3D0
>>>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
http= s://nam11.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Flists.freed= esktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=3D02%7C01%7Calexande= r.deucher%40amd.com%7C6045839ca9f14797ff3a08d79f713094%7C3dd8961fe4884e608e= 11a82d994e183d%7C0%7C0%7C637153180855191595&amp;sdata=3DevmiajEJOkOb2L2= GgUxg6JsWadR99PgoTE%2F6cQoBKfs%3D&amp;reserved=3D0
--_000_CH2PR12MB3912DC3EC38450B31ED2FFFBF70C0CH2PR12MB3912namp_-- --===============0946515435== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx --===============0946515435==--