[PATCH] drm/amdgpu: restrict debugfs register access under SR-IOV

2020-04-08 Thread Yintian Tao
Under bare metal, there is no more else to take care of the GPU register access through MMIO. Under Virtualization, to access GPU register is implemented through KIQ during run-time due to world-switch. Therefore, under SR-IOV user can only access debugfs to r/w GPU registers when meets all three

RE: [PATCH] Revert "drm/amdgpu: change SH MEM alignment mode for gfx10"

2020-04-08 Thread Zhang, Hawking
[AMD Official Use Only - Internal Distribution Only] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: Gao, Likun Sent: Thursday, April 9, 2020 12:13 To: amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Gao, Likun Subject: [PATCH] Revert "drm/amdgpu: change SH MEM

[PATCH] Revert "drm/amdgpu: change SH MEM alignment mode for gfx10"

2020-04-08 Thread Likun Gao
From: Likun Gao This reverts commit 8d2afe375f6ed9d84ddca234d49a53cf875f9042. Revert the auto alignment mode set of SH MEM config, as it will result to OCL Conformance Test fail. --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver

[PATCH v2 1/3] drm/amd/amdgpu: add prefix for pr_* prints

2020-04-08 Thread Aurabindo Pillai
amdgpu uses lots of pr_* calls for printing error messages. With this prefix, errors shall be more obvious to the end use regarding its origin, and may help debugging. Prefix format: [xxx.x] amdgpu: ... Signed-off-by: Aurabindo Pillai --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 6 ++ 1 f

[PATCH v2 3/3] drm/amd/amdgpu: remove hardcoded module name in prints

2020-04-08 Thread Aurabindo Pillai
Let format prefixes take care of printing the module name through pr_fmt and dev_fmt definitions. Signed-off-by: Aurabindo Pillai --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c

[PATCH v2 0/3] drm/amd/amdgpu: Add print format prefix

2020-04-08 Thread Aurabindo Pillai
Changes in v2 * Add dev_fmt format prefix * Removed hardcoded module names in pr_* and dev_* prints Aurabindo Pillai (3): drm/amd/amdgpu: add prefix for pr_* prints drm/amd/amdgpu: add print prefix for dev_* variants drm/amd/amdgpu: remove hardcoded module name in prints drivers/gpu/drm/a

Re: [PATCH] drm/amd/amdgpu: add prefix for pr_* prints

2020-04-08 Thread Aurabindo Pillai
Hi Joe, On Wed, Apr 8, 2020 at 11:37 AM Joe Perches wrote: > > All the embedded uses of "amdgpu:" in logging > messages should also be deleted. > > $ git grep -P '(?:dev_|pr_).*"amdgpu:' drivers/gpu/drm/amd/amdgpu/ > drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c: > pr_err("amdgp

[PATCH v2 2/3] drm/amd/amdgpu: add print prefix for dev_* variants

2020-04-08 Thread Aurabindo Pillai
Define dev_fmt macro for informative print messages Signed-off-by: Aurabindo Pillai --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 67d654a89..7a52d37e6 100644 --- a

[PATCH] drm/ttm: Schedule out if possibe in bo delayed delete worker

2020-04-08 Thread xinhui pan
The delayed delete list is per device which might be very huge. And in a heavy workload test, the list might always not be empty. That will trigger any RCU stall warnings or softlockups in non-preemptible kernels Lets do schedule out if possible in that case. Signed-off-by: xinhui pan --- driver

Re: [PATCH] drm/amdgpu/sriov move program of sq_config to PF

2020-04-08 Thread Felix Kuehling
Am 2020-04-08 um 9:27 a.m. schrieb Deucher, Alexander: > > [AMD Public Use] > > > Acked-by: Alex Deucher > > *From:* amd-gfx on behalf of > Jack Zhang > *Sent:* Wednesday, April 8, 2020 6:33 AM > *To:* amd-gfx@lists.freede

[pull] amdgpu drm-fixes-5.7

2020-04-08 Thread Alex Deucher
Hi Dave, Daniel, Fixes for 5.7. The following changes since commit 3148a6a0ef3cf93570f30a477292768f7eb5d3c3: drm/amdkfd: kfree the wrong pointer (2020-04-01 14:44:22 -0400) are available in the Git repository at: git://people.freedesktop.org/~agd5f/linux tags/amd-drm-fixes-5.7-2020-04-08

[PATCH] drm/amdgpu/display: avoid unused-variable warning

2020-04-08 Thread Arnd Bergmann
Without CONFIG_DEBUG_FS, this newly added function causes a harmless warning: amdgpu_dm/amdgpu_dm.c: In function 'amdgpu_dm_connector_late_register': amdgpu_dm/amdgpu_dm.c:4723:30: error: unused variable 'amdgpu_dm_connector' [-Werror=unused-variable] 4723 | struct amdgpu_dm_connector *amdgpu_d

Re: [PATCH] drm/amdgpu/display: avoid unused-variable warning

2020-04-08 Thread Alex Deucher
On Wed, Apr 8, 2020 at 3:13 PM Arnd Bergmann wrote: > > Without CONFIG_DEBUG_FS, this newly added function causes a harmless > warning: > > amdgpu_dm/amdgpu_dm.c: In function 'amdgpu_dm_connector_late_register': > amdgpu_dm/amdgpu_dm.c:4723:30: error: unused variable 'amdgpu_dm_connector' > [-Wer

[PATCH v2] x86: insn: Add insn_is_fpu()

2020-04-08 Thread Masami Hiramatsu
Add insn_is_fpu(insn) which tells that the insn is whether touch the FPU/SSE/MMX register or the instruction of FP coprocessor. Signed-off-by: Masami Hiramatsu --- Changes in v2: - Introduce FPU superscript. - Fix to add INAT_FPUIFVEX for variant if the first opcode has no last prefix super

Re: [PATCH] drm/amd/amdgpu: add prefix for pr_* prints

2020-04-08 Thread Joe Perches
On Wed, 2020-04-08 at 09:37 -0400, Aurabindo Pillai wrote: > amdgpu uses lots of pr_* calls for printing error messages. > With this prefix, errors shall be more obvious to the end > use regarding its origin, and may help debugging. > > Prefix format: > > [xxx.x] amdgpu: ... [] > diff --git a

Re: [PATCH v2] drm/ttm: clean up ttm_trace_dma_map/ttm_trace_dma_unmap (v2)

2020-04-08 Thread Christian König
Am 08.04.20 um 16:00 schrieb Alex Deucher: On Tue, Apr 7, 2020 at 5:50 AM Christian König wrote: Am 07.04.20 um 11:12 schrieb Huang Rui: ttm_trace_dma_map/ttm_trace_dma_unmap is never used anymore. v2: remove the file completely Signed-off-by: Huang Rui Reviewed-by: Christian König Can

Re: [PATCH v2] drm/ttm: clean up ttm_trace_dma_map/ttm_trace_dma_unmap (v2)

2020-04-08 Thread Alex Deucher
On Tue, Apr 7, 2020 at 5:50 AM Christian König wrote: > > Am 07.04.20 um 11:12 schrieb Huang Rui: > > ttm_trace_dma_map/ttm_trace_dma_unmap is never used anymore. > > > > v2: remove the file completely > > > > Signed-off-by: Huang Rui > > Reviewed-by: Christian König > Can one of you make sure

Re: [PATCH 00/15] amdgpu: remove load and unload callbacks (v3)

2020-04-08 Thread Alex Deucher
On Wed, Apr 8, 2020 at 3:38 AM Thomas Zimmermann wrote: > > Hi Alex > > Am 07.02.20 um 20:50 schrieb Alex Deucher: > > These are deprecated and the drm will soon start warning when drivers still > > use them. It was a long and twisty road, but seems to work. > > Are you going to convert radeon as

Re: [PATCH] amdgpu_kms: Remove unnecessary condition check

2020-04-08 Thread Alex Deucher
On Tue, Apr 7, 2020 at 2:30 PM Aurabindo Pillai wrote: > > Execution will only reach here if the asserted condition is true. > Hence there is no need for the additional check. > > Signed-off-by: Aurabindo Pillai Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 10 -

[PATCH] drm/amd/amdgpu: add prefix for pr_* prints

2020-04-08 Thread Aurabindo Pillai
amdgpu uses lots of pr_* calls for printing error messages. With this prefix, errors shall be more obvious to the end use regarding its origin, and may help debugging. Prefix format: [xxx.x] amdgpu: ... Signed-off-by: Aurabindo Pillai --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 6 ++ 1 f

Re: [PATCH] drm/amdgpu/display: fix warning when compiling without debugfs

2020-04-08 Thread Mikita Lipski
Reviewed-by: Mikita Lipski Thanks, Mikita On 2020-04-08 9:31 a.m., Alex Deucher wrote: fixes unused variable warning. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/d

Re: [PATCH] drm/amdgpu/display: fix warning when compiling without debugfs

2020-04-08 Thread Christian König
Am 08.04.20 um 15:31 schrieb Alex Deucher: fixes unused variable warning. Signed-off-by: Alex Deucher Acked-by: Christian König --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm

[PATCH] drm/amdgpu/display: fix warning when compiling without debugfs

2020-04-08 Thread Alex Deucher
fixes unused variable warning. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 1155fb

Re: [PATCH] drm/amdgpu/sriov move program of sq_config to PF

2020-04-08 Thread Deucher, Alexander
[AMD Public Use] Acked-by: Alex Deucher From: amd-gfx on behalf of Jack Zhang Sent: Wednesday, April 8, 2020 6:33 AM To: amd-gfx@lists.freedesktop.org Cc: Zhang, Jack (Jian) Subject: [PATCH] drm/amdgpu/sriov move program of sq_config to PF Since SQ_CONFIG wi

Re: [PATCH] drm/amdgpu: unify fw_write_wait for new gfx9 asics

2020-04-08 Thread Deucher, Alexander
[AMD Public Use] Reviewed-by: Alex Deucher From: Liu, Aaron Sent: Wednesday, April 8, 2020 2:45 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Huang, Ray ; Dai, Yuxian (David) ; Liu, Aaron Subject: [PATCH] drm/amdgpu: unify fw_write_wait for ne

Re: [PATCH] drm/amdgpu: fix out of bounds memcpy

2020-04-08 Thread Nirmoy
On 4/8/20 12:16 PM, Christian König wrote: The buffer needs to be two bytes larger when the maximum is 32. Signed-off-by: Christian König Acked-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

RE: [PATCH] drm/amdgpu/sriov move program of sq_config to PF

2020-04-08 Thread Zhang, Jack (Jian)
-Original Message- From: Jack Zhang Sent: Wednesday, April 8, 2020 6:34 PM To: amd-gfx@lists.freedesktop.org Cc: Zhang, Jack (Jian) Subject: [PATCH] drm/amdgpu/sriov move program of sq_config to PF Since SQ_CONFIG will influence performance behavior, it's unsafe to program in VF. The

[PATCH] drm/amdgpu/sriov move program of sq_config to PF

2020-04-08 Thread Jack Zhang
Since SQ_CONFIG will influence performance behavior, it's unsafe to program in VF. Therefore, program of SQ_CONFIG need to be moved to PF under siov. Skip it here in guest driver. Signed-off-by: Jack Zhang --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 dele

[PATCH] drm/amdgpu: fix out of bounds memcpy

2020-04-08 Thread Christian König
The buffer needs to be two bytes larger when the maximum is 32. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c b/drivers/gpu/drm/amd/amdgpu/amdgp

Re: [PATCH] drm/amdgpu: unify fw_write_wait for new gfx9 asics

2020-04-08 Thread Huang Rui
On Wed, Apr 08, 2020 at 02:45:48PM +0800, Liu, Aaron wrote: > Make the fw_write_wait default case true since presumably all new > gfx9 asics will have updated firmware. That is using unique WAIT_REG_MEM > packet with opration=1. > > Signed-off-by: Aaron Liu > --- Acked-by: Huang Rui > drivers

Re: [PATCH 00/15] amdgpu: remove load and unload callbacks (v3)

2020-04-08 Thread Thomas Zimmermann
Hi Alex Am 07.02.20 um 20:50 schrieb Alex Deucher: > These are deprecated and the drm will soon start warning when drivers still > use them. It was a long and twisty road, but seems to work. Are you going to convert radeon as well? It's the only remaining KMS driver that uses load. Best regards

Re: [PATCH 4/4] drm/amdgpu: add new unlocked flag for PTE updates

2020-04-08 Thread Christian König
Am 07.04.20 um 21:24 schrieb Felix Kuehling: Am 2020-04-07 um 10:27 a.m. schrieb Christian König: For HMM support we need the ability to invalidate PTEs from a MM callback where we can't lock the root PD. Add a new flag to better support this instead of assuming that all invalidation updates ar