[PATCH] drm/amd/powerplay: use true, false for bool variable in smu7_hwmgr.c

2020-01-22 Thread Zheng Bin
From: zhengbin Fixes coccicheck warning: drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:723:2-50: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:733:3-52: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.

Re: [PATCH 2/2] drm/amdgpu: allocate entities on demand

2020-01-22 Thread Nirmoy
Hi Luben, Thanks for reviewing.  Was expecting lot from vim auto-indent :/ On 1/22/20 1:07 AM, Luben Tuikov wrote: On 2020-01-21 11:50 a.m., Nirmoy Das wrote: - switch (i) { + priority = (ctx->override_priority == DRM_SCHED_PRIORITY_UNSET) ? +

[PATCH 1/2] drm/amdgpu: individualize amdgpu entity allocation per HW IP

2020-01-22 Thread Nirmoy Das
Do not allocate all the entity at once. This is required for dynamic amdgpu_ctx_entity creation. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 143 +--- 1 file changed, 76 insertions(+), 67 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu

Re: [PATCH 1/2] drm/amdgpu: individualize amdgpu entity allocation per HW IP

2020-01-22 Thread Nirmoy
On 1/22/20 12:34 AM, Luben Tuikov wrote: + for (j = 0; j < amdgpu_ctx_num_entities[i]; ++j) { + struct amdgpu_ctx_entity *entity = &ctx->entities[i][j]; - kfree(entity->fences); - entity->fences = NULL; + kfree(entity

[PATCH 2/2] drm/amdgpu: allocate entities on demand

2020-01-22 Thread Nirmoy Das
Currently we pre-allocate entities and fences for all the HW IPs on context creation and some of which are might never be used. This patch tries to resolve entity/fences wastage by creating entities for a HW IP only when it is required. v2: consolidated priority checking at amdgpu_ctx_priority_pe

Re: [PATCH] drm/amdgpu: fix doc by clarifying sched_list definition

2020-01-22 Thread Nirmoy
On 1/21/20 3:31 PM, William Lewis wrote: + * @sched_list: A list of schedulers (drm_gpu_schedulers). + * Jobs from this entity, can be scheduled on any scheduler There's no reason to separate the subject from the verb here with a comma. Thanks William. + * on th

[PATCH] drm/amdgpu: fix doc by clarifying sched_list definition

2020-01-22 Thread Nirmoy Das
expand sched_list definition for better understanding. Also fix a typo atleast -> at least Signed-off-by: Nirmoy Das --- drivers/gpu/drm/scheduler/sched_entity.c | 2 +- include/drm/gpu_scheduler.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu

[PATCH] drm/amdgpu: remove unused label

2020-01-22 Thread Nirmoy Das
Fixes: 445a7d54 (drm/amdgpu/vcn2.5: fix a bug for the 2nd vcn instance) Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c index de32e96a8409..70fae7

Re: [PATCH] drm/amdgpu: fix doc by clarifying sched_list definition

2020-01-22 Thread Christian König
Am 22.01.20 um 10:38 schrieb Nirmoy Das: expand sched_list definition for better understanding. Also fix a typo atleast -> at least Signed-off-by: Nirmoy Das Reviewed-by: Christian König --- drivers/gpu/drm/scheduler/sched_entity.c | 2 +- include/drm/gpu_scheduler.h | 5 ++

Re: [PATCH 2/2] drm/amdgpu: allocate entities on demand

2020-01-22 Thread Christian König
Am 22.01.20 um 10:33 schrieb Nirmoy Das: Currently we pre-allocate entities and fences for all the HW IPs on context creation and some of which are might never be used. This patch tries to resolve entity/fences wastage by creating entities for a HW IP only when it is required. v2: consolidated

Re: [PATCH] drm/amdgpu: remove unused label

2020-01-22 Thread Christian König
Am 22.01.20 um 10:44 schrieb Nirmoy Das: Fixes: 445a7d54 (drm/amdgpu/vcn2.5: fix a bug for the 2nd vcn instance) Signed-off-by: Nirmoy Das Acked-by: Christian König --- drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vc

Re: [PATCH 2/2] drm/amdgpu: allocate entities on demand

2020-01-22 Thread Nirmoy
On 1/22/20 12:39 PM, Christian König wrote: Am 22.01.20 um 10:33 schrieb Nirmoy Das: Currently we pre-allocate entities and fences for all the HW IPs on context creation and some of which are might never be used. This patch tries to resolve entity/fences wastage by creating entities for a HW I

[PATCH 2/2] drm/amdgpu: allow higher level PD invalidations

2020-01-22 Thread Christian König
Allow partial invalidation on unallocated PDs. This is useful when we need to silence faults to stop interrupt floods on Vega. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/dr

[PATCH 1/2] drm/amdgpu: return EINVAL instead of ENOENT in the VM code

2020-01-22 Thread Christian König
That we can't find a PD above the root is expected can only happen if we try to update a larger range than actually managed by the VM. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd

Re: [PATCH 2/2] drm/amdgpu: allocate entities on demand

2020-01-22 Thread Luben Tuikov
On 2020-01-22 4:25 a.m., Nirmoy wrote: > Hi Luben, > > Thanks for reviewing.  Was expecting lot from vim auto-indent :/ Yes, no problem. It's a learning experience for me as well. If you use Emacs, pressing TAB anywhere on a line, will indent it according to the mode. (It runs the (c-indent-line

Re: [PATCH 2/5] drm/amd/display: update psp interface header

2020-01-22 Thread Harry Wentland
On 2020-01-16 3:29 p.m., Bhawanpreet Lakha wrote: > [Why] > We need to support SRM Why do we need to support SRM? Please refer to section 5 "Renewability" of the HDCP 2.x spec and its requirement to store the SRM in non-volatile memory. Why does this involve PSP? Describe that for AMD's content

Re: [PATCH 0/5] HDCP SRM interface

2020-01-22 Thread Harry Wentland
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

Re: [PATCH 0/5] HDCP SRM interface

2020-01-22 Thread Alex Deucher
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 > >

Re: [PATCH 1/2] drm/amdgpu: individualize amdgpu entity allocation per HW IP

2020-01-22 Thread Luben Tuikov
On 2020-01-22 4:32 a.m., Nirmoy wrote: > > On 1/22/20 12:34 AM, Luben Tuikov wrote: >> >>> + for (j = 0; j < amdgpu_ctx_num_entities[i]; ++j) { >>> + struct amdgpu_ctx_entity *entity = &ctx->entities[i][j]; >>> >>> - kfree(entity->fences); >>> - e

Re: [PATCH 0/5] HDCP SRM interface

2020-01-22 Thread Bhawanpreet Lakha
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 di

[PATCH] drm/amdgpu: remove the experimental flag for renoir

2020-01-22 Thread Alex Deucher
Should work properly with the latest sbios on 5.5 and newer kernels. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c inde

Radeon HD7750 lookup during higher load

2020-01-22 Thread Andreas Messer
Hello all, I recently started playing the game "0.A.D." and found after a while the display go blank. Music continues playing and the machine can still be reached through ssh. It looks to me same as problem reported here (dmesg output is almost equal): https://gitlab.freedesktop.org/mesa/mesa/iss

Re: [PATCH 1/2] drm/amdgpu: return EINVAL instead of ENOENT in the VM code

2020-01-22 Thread Luben Tuikov
Do we have user-space/libs rely on this errno in particular? On 2020-01-22 9:03 a.m., Christian König wrote: > That we can't find a PD above the root is expected can only happen if > we try to update a larger range than actually managed by the VM. > > Signed-off-by: Christian König > --- > driv

Re: [PATCH 1/2] drm/amdgpu: return EINVAL instead of ENOENT in the VM code

2020-01-22 Thread Christian König
Am 22.01.20 um 19:11 schrieb Luben Tuikov: Do we have user-space/libs rely on this errno in particular? No, userspace can't even directly call this function. The problem was rather that during debugging I called the function with fixed parameters and wondered for quite a while why it can't fi

Re: [PATCH 3/5] drm/amd/display: Add sysfs interface for set/get srm

2020-01-22 Thread Harry Wentland
On 2020-01-16 3:29 p.m., Bhawanpreet Lakha wrote: > [Why] > We need to set/get SRM and linux kernel is not suppose to write to the "We need to set/get SRM from/to PSP FW..." > storage, so we need to provide a interface. > an interface. Highlight that we expect these to be exercised by usermode

Re: [PATCH 5/5] drm/amd/display: call psp set/get interfaces

2020-01-22 Thread Harry Wentland
On 2020-01-16 3:29 p.m., Bhawanpreet Lakha wrote: > Call the cmd ids for set/get srm according to the sysfs call > > Signed-off-by: Bhawanpreet Lakha > Reviewed-by: Rodrigo Siqueira > --- > .../amd/display/amdgpu_dm/amdgpu_dm_hdcp.c| 49 ++- > 1 file changed, 48 insertions(+

Re: [PATCH 0/5] HDCP SRM interface

2020-01-22 Thread Harry Wentland
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

Re: [PATCH 0/5] HDCP SRM interface

2020-01-22 Thread Deucher, Alexander
[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 Wentland Sent: Wednesday, January 22, 2020 2:27 PM To: Lakha, Bhawanpreet ; Alex Deucher Cc: Went

Re: [PATCH v2] drm/dp_mst: Remove VCPI while disabling topology mgr

2020-01-22 Thread Lyude Paul
On Wed, 2020-01-22 at 04:48 +, Lin, Wayne wrote: > [AMD Public Use] > > Sorry for any inconvenience I brought. Nothing to be sorry about! This happens from time to time, it's my fault for not noticing it in the first place anyway :P. Ville from Intel is able to review it, so there's no rush

Re: [PATCH -next 00/14] drm/amdgpu: remove unnecessary conversion to bool

2020-01-22 Thread Alex Deucher
On Tue, Jan 21, 2020 at 11:08 AM Chen Zhou wrote: > > This patch series remove unnecessary conversion to bool in dir > drivers/gpu/drm/amd/amdgpu/, which is detected by coccicheck. Thanks for the patches. Already applied this patch: https://patchwork.freedesktop.org/series/72281/#rev2 which cove

Re: [PATCH] drm/amd/powerplay: use true, false for bool variable in smu7_hwmgr.c

2020-01-22 Thread Alex Deucher
On Wed, Jan 22, 2020 at 3:22 AM Zheng Bin wrote: > > From: zhengbin > > Fixes coccicheck warning: > > drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:723:2-50: WARNING: > Assignment of 0/1 to bool variable > drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:733:3-52: WARNING: > Assignment of 0/

[PATCH 0/6] HDCP SRM interface v2

2020-01-22 Thread Bhawanpreet Lakha
These patches adds support for SRM loading. SRM has to be saved in a non-volatile memory(spec) and PSP can't do that directly so we need to use the driver to do this Since the kernel cannot directly write to system storage we need to provide an interface so that the usermode can do it for us v2 -

[PATCH 2/6] drm/amd/display: update psp interface header

2020-01-22 Thread Bhawanpreet Lakha
[Why] We need to support SRM(System Renewability Message) As per hdcp spec (5.Renewability) SRM needs to be storage in a non-volatile memory. PSP owns the checking of SRM but doesn't have the ability to store it in a non-volatile memory. So we need the kernel driver to facilitate it using the inte

[PATCH 5/6] drm/amd/display: call psp set/get interfaces

2020-01-22 Thread Bhawanpreet Lakha
Call the cmd ids for set/get srm according to the sysfs call v2: Use define for the magic number Signed-off-by: Bhawanpreet Lakha Reviewed-by: Rodrigo Siqueira --- .../amd/display/amdgpu_dm/amdgpu_dm_hdcp.c| 50 ++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --gi

[PATCH 6/6] drm/amd/display: REFERENCE for srm interface patches

2020-01-22 Thread Bhawanpreet Lakha
This is just a reference for the patches. not to be merged Signed-off-by: Bhawanpreet Lakha --- REFERENCE | 49 + 1 file changed, 49 insertions(+) create mode 100644 REFERENCE diff --git a/REFERENCE b/REFERENCE new file mode 100644 index

[PATCH 1/6] drm/amd/display: Pass amdgpu_device instead of psp_context

2020-01-22 Thread Bhawanpreet Lakha
[Why] We need this to create sysfs (followup patch) [How] Change the parameter Signed-off-by: Bhawanpreet Lakha Reviewed-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 4 ++-- drivers/gpu/drm/amd/

[PATCH 4/6] drm/amd/display: Load srm before enabling HDCP

2020-01-22 Thread Bhawanpreet Lakha
[Why] we need to load SRM before we start HDCP. Because for S3 case the sysfs call will be after we have already enabled HDCP, so we might not be using the latest SRM [How] Set srm before starting HDCP. Signed-off-by: Bhawanpreet Lakha Reviewed-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/dis

[PATCH 3/6] drm/amd/display: Add sysfs interface for set/get srm

2020-01-22 Thread Bhawanpreet Lakha
[Why] PSP doesn't have the ability to store SRM in a non-volatile memory. And since the kernel cannot write to the storage directly, we need usermode to facilitate this As per spec the SRM needs to be persistent so this interface is to be called by the usermode anytime the system goes down/powers

Re: [PATCH 2/2] drm/amdgpu: allow higher level PD invalidations

2020-01-22 Thread Felix Kuehling
Two style nit-picks inline. Otherwise the series is Reviewed-by: Felix Kuehling On 2020-01-22 9:03 a.m., Christian König wrote: Allow partial invalidation on unallocated PDs. This is useful when we need to silence faults to stop interrupt floods on Vega. Signed-off-by: Christian König ---