[PATCH] drm/amd/amdgpu: fix BANK_SELECT on Vega10

2017-08-24 Thread Roger He
BANK_SELECT should always be FRAGMENT_SIZE + 3 due to 8-entry (2^3) per cache line in L2 TLB for Vega10. Change-Id: I8cfcff197e2c571c1a547aaed959e492b4a6fe0e Signed-off-by: Roger He --- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 3 +-- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 3 +-- 2 files ch

Re: [PATCH] drm/amd/amdgpu: fix BANK_SELECT on Vega10

2017-08-24 Thread Christian König
Am 24.08.2017 um 09:07 schrieb Roger He: BANK_SELECT should always be FRAGMENT_SIZE + 3 due to 8-entry (2^3) per cache line in L2 TLB for Vega10. Change-Id: I8cfcff197e2c571c1a547aaed959e492b4a6fe0e Signed-off-by: Roger He Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/gfxhu

RE: [PATCH] drm/amdgpu: Add sysfs file for VBIOS

2017-08-24 Thread Russell, Kent
No real reason for sysfs instead of debugfs, I just picked the one that was more familiar with. I can definitely move it to debugfs instead. I will also clean up the commit message per Michel's comments. Thank you! Kent -Original Message- From: Christian König [mailto:deathsim...@vodaf

[PATCH 2/2] drm/ttm: Remove needless 'extern' on functions in header.

2017-08-24 Thread Tom St Denis
Minor tidy up. Signed-off-by: Tom St Denis --- include/drm/ttm/ttm_page_alloc.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/drm/ttm/ttm_page_alloc.h b/include/drm/ttm/ttm_page_alloc.h index 4400c08169cd..19bdd907613c 100644 --- a/include/drm/ttm/ttm_p

[PATCH 1/2] drm/ttm: Add dummy *populate_and_*map_pages() functions

2017-08-24 Thread Tom St Denis
On non IOTLB/IOMMU builds these functions would be undefined. Signed-off-by: Tom St Denis --- include/drm/ttm/ttm_page_alloc.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/drm/ttm/ttm_page_alloc.h b/include/drm/ttm/ttm_page_alloc.h index 8695918ea629..4400c08169cd 1006

Re: [PATCH 1/2] drm/ttm: Add dummy *populate_and_*map_pages() functions

2017-08-24 Thread Christian König
Am 24.08.2017 um 12:48 schrieb Tom St Denis: On non IOTLB/IOMMU builds these functions would be undefined. Signed-off-by: Tom St Denis --- include/drm/ttm/ttm_page_alloc.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/drm/ttm/ttm_page_alloc.h b/include/drm/ttm/ttm_p

Re: [PATCH 2/2] drm/ttm: Remove needless 'extern' on functions in header.

2017-08-24 Thread Christian König
Am 24.08.2017 um 12:48 schrieb Tom St Denis: Minor tidy up. Signed-off-by: Tom St Denis Thanks and sorry that I thought you added this, I really need more sleep. Patch is Reviewed-by: Christian König . Christian. --- include/drm/ttm/ttm_page_alloc.h | 12 ++-- 1 file changed, 6

Re: [PATCH 2/2] drm/ttm: Remove needless 'extern' on functions in header.

2017-08-24 Thread Tom St Denis
On 24/08/17 07:53 AM, Christian König wrote: Am 24.08.2017 um 12:48 schrieb Tom St Denis: Minor tidy up. Signed-off-by: Tom St Denis Thanks and sorry that I thought you added this, I really need more sleep. Patch is Reviewed-by: Christian König . No worries. For a second there I thought

Re: [PATCH] drm/amdgpu: Add sysfs file for VBIOS

2017-08-24 Thread Alex Deucher
On Thu, Aug 24, 2017 at 5:58 AM, Russell, Kent wrote: > No real reason for sysfs instead of debugfs, I just picked the one that was > more familiar with. I can definitely move it to debugfs instead. I will also > clean up the commit message per Michel's comments. Thank you! > While you are at i

RE: [PATCH] drm/amdgpu: Add sysfs file for VBIOS

2017-08-24 Thread Russell, Kent
I can definitely add that as well. Kent -Original Message- From: Alex Deucher [mailto:alexdeuc...@gmail.com] Sent: Thursday, August 24, 2017 8:56 AM To: Russell, Kent Cc: Christian König; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: Add sysfs file for VBIOS On Thu, Au

[PATCH v2] drm/amdgpu: Add debugfs file for VBIOS and version

2017-08-24 Thread Kent Russell
Add 2 debugfs files, one that contains the VBIOS version, and one that contains the VBIOS itself. These won't change after initialization, so we can add the VBIOS version when we parse the atombios information. This ensures that we can find out the VBIOS version, even when the dmesg buffer fills u

RE: [PATCH v2] drm/amdgpu: Add debugfs file for VBIOS and version

2017-08-24 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Kent Russell > Sent: Thursday, August 24, 2017 10:10 AM > To: amd-gfx@lists.freedesktop.org > Cc: Russell, Kent > Subject: [PATCH v2] drm/amdgpu: Add debugfs file for VBIOS and version > > Ad

Re: [PATCH v2] drm/amdgpu: Add debugfs file for VBIOS and version

2017-08-24 Thread Christian König
Am 24.08.2017 um 16:10 schrieb Kent Russell: Add 2 debugfs files, one that contains the VBIOS version, and one that contains the VBIOS itself. These won't change after initialization, so we can add the VBIOS version when we parse the atombios information. This ensures that we can find out the VB

RE: [PATCH v2] drm/amdgpu: Add debugfs file for VBIOS and version

2017-08-24 Thread Russell, Kent
That would make sense. I was just trying to follow the existing style, to avoid any major confusion or complications when things do get tidied up. Thanks! Kent -Original Message- From: Christian König [mailto:deathsim...@vodafone.de] Sent: Thursday, August 24, 2017 10:26 AM To: Russell

Re: [PATCH] drm/amdgpu: Add sysfs file for VBIOS

2017-08-24 Thread Kuehling, Felix
Debugfs is only accessible by Root. The BIOS version is already reported in the kernel log, which is visible to everyone. So why hide this away in debugfs? I think Kent's intention is to add VBIOS version reporting to the rocm-smi tool. I'd prefer using a stable interface like sysfs, and one tha

Re: [PATCH] drm/amdgpu: Add sysfs file for VBIOS

2017-08-24 Thread Alex Deucher
On Thu, Aug 24, 2017 at 11:35 AM, Kuehling, Felix wrote: > Debugfs is only accessible by Root. The BIOS version is already reported in > the kernel log, which is visible to everyone. So why hide this away in > debugfs? > > I think Kent's intention is to add VBIOS version reporting to the rocm-sm

RE: [PATCH] drm/amdgpu: Add sysfs file for VBIOS

2017-08-24 Thread Russell, Kent
We already access the GPU Power usage via debugfs, which is why I didn't think it was a huge deal to switch it over, since we already need root access for the SMI due to that. Kent -Original Message- From: Alex Deucher [mailto:alexdeuc...@gmail.com] Sent: Thursday, August 24, 2017 11:

Re: [PATCH] drm/amdgpu: Add sysfs file for VBIOS

2017-08-24 Thread Christian König
Actually the main difference is not root vs. user, but rather unstable vs stable interface. If you want a stable interface for an userspace tool you should use sysfs, if you don't care about that you should use debugfs. Christian. Am 24.08.2017 um 18:37 schrieb Russell, Kent: We already acc

Re: [PATCH] drm/amdgpu: check memory allocation failure

2017-08-24 Thread Alex Deucher
On Wed, Aug 23, 2017 at 4:39 AM, Christian König wrote: > Am 23.08.2017 um 07:52 schrieb Christophe JAILLET: >> >> Check memory allocation failure and return -ENOMEM in such a case. >> >> 'num_post_dep_syncobjs' still has to be set to 0 before the test in order >> to have it initialized if 'amdgpu

Re: [PATCH][drm-next] drm/amdgpu: remove duplicate return statement

2017-08-24 Thread Alex Deucher
On Wed, Aug 23, 2017 at 2:24 PM, Felix Kuehling wrote: > I must have added that accidentally when cherry-picking an internal > patch for upstreaming. Thanks for catching it. > > Reviewed-by: Felix Kuehling Applied. thanks! Alex > > Regards, > Felix > > > On 2017-08-23 09:17 AM, Colin King w

[PATCH] drm/amdgpu/powerplay/vega10: fix typo in register base index

2017-08-24 Thread Alex Deucher
Probably a copy pasta. No functional difference, both have the same value. Reported-by: Michael von Khurja Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmg

Re: [PATCH] drm/amdgpu/powerplay/vega10: fix typo in register base index

2017-08-24 Thread Felix Kuehling
Reviewed-by: Felix Kuehling On 2017-08-24 04:09 PM, Alex Deucher wrote: > Probably a copy pasta. No functional difference, both have > the same value. > > Reported-by: Michael von Khurja > Signed-off-by: Alex Deucher > --- > drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 2 +- > 1 fi

[PATCH 1/4] drm/amdgpu/gfx8: apply dynamic cu mask to APUs as well

2017-08-24 Thread Alex Deucher
Confirmed with the hw team. It's the same for all asics. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c index 7754

[PATCH 4/4] drm/amdgpu/gfx9: adjust mqd allocation size

2017-08-24 Thread Alex Deucher
To allocate additional space for the dynamic cu masks. Confirmed with the hw team that we only need 1 dword for the mask. The mask is the same for each SE so you only need 1 dword. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c| 25 ++--- drivers/g

[PATCH 3/4] drm/amdgpu/gfx9: update mqd to include dynamic CU mask

2017-08-24 Thread Alex Deucher
Necessary for proper operation with KIQ. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/include/v9_structs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/include/v9_structs.h b/drivers/gpu/drm/amd/include/v9_structs.h index 9a9e6c7..56d79db 10

[PATCH 2/4] drm/amdgpu/gfx8: drop cz mqd

2017-08-24 Thread Alex Deucher
It was unused and according to hw team, it's the same for all asics in a gfx family so remove it. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/include/vi_structs.h | 259 --- 1 file changed, 259 deletions(-) diff --git a/drivers/gpu/drm/amd/include/vi_structs.

Re: [PATCH 4/4] drm/amdgpu/gfx9: adjust mqd allocation size

2017-08-24 Thread Felix Kuehling
On 2017-08-24 05:00 PM, Alex Deucher wrote: > --- a/drivers/gpu/drm/amd/include/v9_structs.h > +++ b/drivers/gpu/drm/amd/include/v9_structs.h > @@ -672,6 +672,14 @@ struct v9_mqd { > uint32_t reserved_511; > }; > > +struct v9_mqd_allocation { > + struct v9_mqd mqd; > + uint32_t wpt

Re: [PATCH] drm/amdgpu: Add sysfs file for VBIOS

2017-08-24 Thread Russell, Kent
The plan is for the vbios version to be available through the ROCM-SMI utility. We have the GPU power usage listed in the debugfs currently. If they are both to be used for a userspace utility, should we be moving both of those to sysfs instead? Kent KENT RUSSELL Software Engineer | Vertical W

Re: [PATCH 4/4] drm/amdgpu/gfx9: adjust mqd allocation size

2017-08-24 Thread Alex Deucher
On Thu, Aug 24, 2017 at 5:14 PM, Felix Kuehling wrote: > On 2017-08-24 05:00 PM, Alex Deucher wrote: >> --- a/drivers/gpu/drm/amd/include/v9_structs.h >> +++ b/drivers/gpu/drm/amd/include/v9_structs.h >> @@ -672,6 +672,14 @@ struct v9_mqd { >> uint32_t reserved_511; >> }; >> >> +struct v9_m