Re: [PATCH] drm/amdgpu: return an error for hw access in INFO ioctl when in reset

2020-06-30 Thread Alex Deucher
ping? On Fri, Jun 26, 2020 at 10:04 AM Alex Deucher wrote: > > When the GPU is in reset, accessing the hw is unreliable and could > interfere with the reset. Return an error in those cases. > > Signed-off-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 6 ++ > 1 file

Re: [PATCH 1/3] drm/amdgpu/atomfirmware: fix vram_info fetching for renoir

2020-06-30 Thread Alex Deucher
Ping on this series? On Thu, Jun 25, 2020 at 6:05 PM Alex Deucher wrote: > > Renoir uses integrated_system_info table v12. The table > has the same layout as v11 with respect to this data. Just > reuse the existing code for v12 for stable. > > Fixes incorrectly reported vram info in the driver

Re: [pull] amdgpu, amdkfd, radeon drm-next-5.9

2020-06-30 Thread Dave Airlie
commit 5fa689e66bf406ef3a1afe03d0139d90b0b13773 Author: Likun Gao Commit: Alex Deucher drm/amdgpu/powerplay: add smu block for sienna_cichlid Add SMU block for sienna_cichlid with psp load type. Signed-off-by: Likun Gao Reviewed-by: Jack Xiao Spot the missing

[PATCH 1/1] drm/amdkfd: Remove redundand kfd2kgd interface lookup

2020-06-30 Thread Felix Kuehling
kfd_pasid.c isn't using the kfd2kgd interface any more. Remove redundant code trying to look up a device for finding that interface. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_pasid.c | 31 +++--- 1 file changed, 8 insertions(+), 23 deletions(-) diff

Re: [PATCH v5 01/12] iommu: Change type of pasid to u32

2020-06-30 Thread Felix Kuehling
Am 2020-06-30 um 7:44 p.m. schrieb Fenghua Yu: > PASID is defined as a few different types in iommu including "int", > "u32", and "unsigned int". To be consistent and to match with uapi > definitions, define PASID and its variations (e.g. max PASID) as "u32". > "u32" is also shorter and a little

[PATCH v5 00/12] x86: tag application address space for devices

2020-06-30 Thread Fenghua Yu
Typical hardware devices require a driver stack to translate application buffers to hardware addresses, and a kernel-user transition to notify the hardware of new work. What if both the translation and transition overhead could be eliminated? This is what Shared Virtual Address (SVA) and ENQCMD

[PATCH v5 10/12] x86/mmu: Allocate/free PASID

2020-06-30 Thread Fenghua Yu
A PASID is allocated for an "mm" the first time any thread attaches to an SVM capable device. Later device attachments (whether to the same device or another SVM device) will re-use the same PASID. The PASID is freed when the process exits (so no need to keep reference counts on how many SVM

[PATCH v5 04/12] x86/cpufeatures: Enumerate ENQCMD and ENQCMDS instructions

2020-06-30 Thread Fenghua Yu
Work submission instruction comes in two flavors. ENQCMD can be called both in ring 3 and ring 0 and always uses the contents of PASID MSR when shipping the command to the device. ENQCMDS allows a kernel driver to submit commands on behalf of a user process. The driver supplies the PASID value in

[PATCH v5 11/12] sched: Define and initialize a flag to identify valid PASID in the task

2020-06-30 Thread Fenghua Yu
From: Peter Zijlstra The flag is defined for the task to identify if the task has a valid PASID. Its initial value is 0 when the task is forked/cloned. It will be used shortly. Signed-off-by: Peter Zijlstra Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu --- v2: - Add this patch to

[PATCH v5 01/12] iommu: Change type of pasid to u32

2020-06-30 Thread Fenghua Yu
PASID is defined as a few different types in iommu including "int", "u32", and "unsigned int". To be consistent and to match with uapi definitions, define PASID and its variations (e.g. max PASID) as "u32". "u32" is also shorter and a little more explicit than "unsigned int". No PASID type change

[PATCH v5 08/12] fork: Clear PASID for new mm

2020-06-30 Thread Fenghua Yu
When a new mm is created, its PASID should be cleared, i.e. the PASID is initialized to its init state 0 on both ARM and X86. Signed-off-by: Fenghua Yu Reviewed-by: Tony Luck --- v2: - Add this patch to initialize PASID value for a new mm. include/linux/mm_types.h | 2 ++ kernel/fork.c

[PATCH v5 05/12] x86/fpu/xstate: Add supervisor PASID state for ENQCMD feature

2020-06-30 Thread Fenghua Yu
From: Yu-cheng Yu ENQCMD instruction reads PASID from IA32_PASID MSR. The MSR is stored in the task's supervisor FPU PASID state and is context switched by XSAVES/XRSTORS. Signed-off-by: Yu-cheng Yu Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Reviewed-by: Tony Luck --- v2: -

[PATCH v5 02/12] iommu/vt-d: Change flags type to unsigned int in binding mm

2020-06-30 Thread Fenghua Yu
"flags" passed to intel_svm_bind_mm() is a bit mask and should be defined as "unsigned int" instead of "int". Change its type to "unsigned int". Suggested-by: Thomas Gleixner Signed-off-by: Fenghua Yu Reviewed-by: Tony Luck Reviewed-by: Lu Baolu --- v5: - Reviewed by Lu Baolu v2: - Add this

[PATCH v5 03/12] docs: x86: Add documentation for SVA (Shared Virtual Addressing)

2020-06-30 Thread Fenghua Yu
From: Ashok Raj ENQCMD and Data Streaming Accelerator (DSA) and all of their associated features are a complicated stack with lots of interconnected pieces. This documentation provides a big picture overview for all of the features. Signed-off-by: Ashok Raj Co-developed-by: Fenghua Yu

[PATCH v5 07/12] mm: Define pasid in mm

2020-06-30 Thread Fenghua Yu
PASID is shared by all threads in a process. So the logical place to keep track of it is in the "mm". Both ARM and X86 need to use the PASID in the "mm". Suggested-by: Christoph Hellwig Signed-off-by: Fenghua Yu Reviewed-by: Tony Luck --- v4: - Change PASID type to u32 (Christoph) v3: -

[PATCH v5 09/12] x86/process: Clear PASID state for a newly forked/cloned thread

2020-06-30 Thread Fenghua Yu
The PASID state has to be cleared on forks, since the child has a different address space. The PASID is also cleared for thread clone. While it would be correct to inherit the PASID in this case, it is unknown whether the new task will use ENQCMD. Giving it the PASID "just in case" would have the

[PATCH v5 12/12] x86/traps: Fix up invalid PASID

2020-06-30 Thread Fenghua Yu
A #GP fault is generated when ENQCMD instruction is executed without a valid PASID value programmed in the current thread's PASID MSR. The #GP fault handler will initialize the MSR if a PASID has been allocated for this process. Decoding the user instruction is ugly and sets a bad architecture

[PATCH v5 06/12] x86/msr-index: Define IA32_PASID MSR

2020-06-30 Thread Fenghua Yu
The IA32_PASID MSR (0xd93) contains the Process Address Space Identifier (PASID), a 20-bit value. Bit 31 must be set to indicate the value programmed in the MSR is valid. Hardware uses PASID to identify process address space and direct responses to the right address space. Signed-off-by: Fenghua

RE: [PATCH] drm/amd/display: Only revalidate bandwidth on medium and fast updates

2020-06-30 Thread Li, Roman
[AMD Public Use] Reviewed-by: Roman Li -Original Message- From: amd-gfx On Behalf Of Nicholas Kazlauskas Sent: Monday, June 29, 2020 4:49 PM To: amd-gfx@lists.freedesktop.org Cc: Lakha, Bhawanpreet ; Siqueira, Rodrigo ; Wu, Hersen ; Kazlauskas, Nicholas Subject: [PATCH]

[PATCH] gpu/drm: Replace "%p" with "%pK"

2020-06-30 Thread Tiezhu Yang
When I update the latest kernel, I see the following "ptrval" boot messages. Use "%pK" instead of "%p" so that the cpu address can be printed when the kptr_restrict sysctl is set to 1. Both radeon_fence_driver_start_ring() and amdgpu_fence_driver_start_ring() have this similar issue, fix

Re: [PATCH] gpu/drm: Replace "%p" with "%pK"

2020-06-30 Thread Tiezhu Yang
On 06/30/2020 04:05 PM, Christian König wrote: Am 30.06.20 um 09:36 schrieb Tiezhu Yang: When I update the latest kernel, I see the following "ptrval" boot messages. Use "%pK" instead of "%p" so that the cpu address can be printed when the kptr_restrict sysctl is set to 1. Both

Re: [PATCH 2/2] drm/amdgpu: add TMR destory function for psp

2020-06-30 Thread Deucher, Alexander
[AMD Public Use] Series is: Reviewed-by: Alex Deucher From: amd-gfx on behalf of Huang Rui Sent: Tuesday, June 30, 2020 6:30 AM To: amd-gfx@lists.freedesktop.org Cc: Huang, Ray Subject: [PATCH 2/2] drm/amdgpu: add TMR destory function for psp TMR is

RE: [PATCH] drm/amdkfd: Add Arcturus GWS support and fix VG10

2020-06-30 Thread Greathouse, Joseph
[AMD Public Use] Response inline. Thanks, -Joe -Original Message- From: Russell, Kent Sent: Tuesday, June 30, 2020 7:00 AM To: Greathouse, Joseph ; amd-gfx@lists.freedesktop.org Cc: Greathouse, Joseph Subject: RE: [PATCH] drm/amdkfd: Add Arcturus GWS support and fix VG10 [AMD

RE: [PATCH] drm/amdkfd: Add Arcturus GWS support and fix VG10

2020-06-30 Thread Russell, Kent
[AMD Public Use] Thanks for answering my question offline. Patch is Reviewed-by: Kent Russell > -Original Message- > From: amd-gfx On Behalf Of Russell, > Kent > Sent: Tuesday, June 30, 2020 8:00 AM > To: Greathouse, Joseph ; amd- > g...@lists.freedesktop.org > Cc: Greathouse, Joseph

Re: [PATCH] gpu/drm: Replace "%p" with "%pK"

2020-06-30 Thread Christian König
Am 30.06.20 um 14:14 schrieb Tiezhu Yang: On 06/30/2020 04:05 PM, Christian König wrote: Am 30.06.20 um 09:36 schrieb Tiezhu Yang: When I update the latest kernel, I see the following "ptrval" boot messages. Use "%pK" instead of "%p" so that the cpu address can be printed when the

Re: [PATCH] drm/amd/powerplay: fix compile error with ARCH=arc

2020-06-30 Thread Alex Deucher
On Mon, Jun 29, 2020 at 11:54 PM Quan, Evan wrote: > > [AMD Official Use Only - Internal Distribution Only] > > That's because pr_warn/err/info are forbidden to use in power routines. > > /* > * DO NOT use these for err/warn/info/debug messages. > * Use dev_err, dev_warn, dev_info and dev_dbg

RE: [PATCH] drm/amdkfd: Add Arcturus GWS support and fix VG10

2020-06-30 Thread Russell, Kent
[AMD Public Use] One inquiry inline > -Original Message- > From: amd-gfx On Behalf Of Joseph > Greathouse > Sent: Monday, June 29, 2020 9:55 PM > To: amd-gfx@lists.freedesktop.org > Cc: Greathouse, Joseph > Subject: [PATCH] drm/amdkfd: Add Arcturus GWS support and fix VG10 > > Add

[PATCH 1/2] drm/amdgpu: asd function needs to be unloaded in suspend phase

2020-06-30 Thread Huang Rui
Unload ASD function in suspend phase. Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 9342a9e8cadf..e57a53d5ca96 100644 ---

[PATCH 2/2] drm/amdgpu: add TMR destory function for psp

2020-06-30 Thread Huang Rui
TMR is required to be destoried with GFX_CMD_ID_DESTROY_TMR while the system goes to suspend. Otherwise, PSP may return the failure state (0x007) on Gfx-2-PSP command GFX_CMD_ID_SETUP_TMR after do multiple times suspend/resume. Signed-off-by: Huang Rui ---

Re: [PATCH] Revert "drm/amdgpu: support access regs outside of mmio bar"

2020-06-30 Thread Christian König
Am 30.06.20 um 10:55 schrieb Hawking Zhang: This reverts commit e318290d4845026623924a42435eafd101f669ac. Fallback to a stable base until we have a correct new one Signed-off-by:Hawking Zhang Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 19 ++---

[PATCH] Revert "drm/amdgpu: support access regs outside of mmio bar"

2020-06-30 Thread Hawking Zhang
This reverts commit e318290d4845026623924a42435eafd101f669ac. Fallback to a stable base until we have a correct new one Signed-off-by:Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 19 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 45 +++---

Re: [PATCH] drm/amdgpu: Adding wait time before reading upll control register

2020-06-30 Thread Christian König
Am 30.06.20 um 00:46 schrieb Luben Tuikov: On 2020-06-26 1:04 p.m., Christian König wrote: Am 26.06.20 um 18:12 schrieb Alex Jivin: Adding a delay between writing to UVD control register and reading from it. This is to allow the HW to process the write command. Signed-off-by: Alex Jivin