RE: [PATCH] drm/amd/display: Fix white screen page fault for gpuvm

2021-09-13 Thread Liu, Aaron
[AMD Official Use Only] Verified on Yellow Carp. Acked-by: Aaron Liu -- Best Regards Aaron Liu > -Original Message- > From: Kazlauskas, Nicholas > Sent: Tuesday, September 14, 2021 3:26 AM > To: Alex Deucher > Cc: amd-gfx list ; Liu, Aaron > > Subject: Re: [PATCH] drm/amd/display: Fi

RE: [RFC][PATCH] drm/amdgpu/powerplay/smu10: Add custom profile

2021-09-13 Thread Quan, Evan
[AMD Official Use Only] Driver can exchange the custom profiling settings with SMU FW using the table below: TABLE_CUSTOM_DPM And the related data structure is CustomDpmSettings_t. BR Evan > -Original Message- > From: Alex Deucher > Sent: Monday, September 13, 2021 11:11 PM > To: Danie

[PATCH v2 1/1] drm/amdkfd: Add sysfs bitfields and enums to uAPI

2021-09-13 Thread Felix Kuehling
These bits are de-facto part of the uAPI, so declare them in a uAPI header. The corresponding bit-fields and enums in user mode are defined in https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/blob/master/include/hsakmttypes.h HSA_CAP_... -> HSA_CAPABILITY HSA_MEM_HEAP_TYPE_...

[PATCH] drm/amdkfd: SVM map to gpus check vma boundary

2021-09-13 Thread Philip Yang
SVM range may includes multiple VMAs with different vm_flags, if prange page index is the last page of the VMA offset + npages, update GPU mapping to create GPU page table with same VMA access permission. Signed-off-by: Philip Yang --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 2 ++ 1 file changed,

Re: [PATCH] drm/amd/display: Fix white screen page fault for gpuvm

2021-09-13 Thread Kazlauskas, Nicholas
On 2021-09-13 3:13 p.m., Alex Deucher wrote: Acked-by: Alex Deucher Can you add a fixes: tag? Alex Sure, I think the relevant patch is: Fixes: 64b1d0e8d50 ("drm/amd/display: Add DCN3.1 HWSEQ") Regards, Nicholas Kazlauskas On Mon, Sep 13, 2021 at 3:11 PM Nicholas Kazlauskas wrote: [Wh

Re: [PATCH] drm/amdgpu: Remove ununsed variable from amdgpu_ib_pool_init

2021-09-13 Thread Christian König
Am 13.09.21 um 19:27 schrieb Anson Jacob: Remove unused variable 'size'. Signed-off-by: Anson Jacob Yeah, that's because of the recent change that we now use the same size for everything. Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 1 - 1 file changed, 1

Re: [PATCH] drm/amd/display: Fix white screen page fault for gpuvm

2021-09-13 Thread Alex Deucher
Acked-by: Alex Deucher Can you add a fixes: tag? Alex On Mon, Sep 13, 2021 at 3:11 PM Nicholas Kazlauskas wrote: > > [Why] > The "base_addr_is_mc_addr" field was added for dcn3.1 support but > pa_config was never updated to set it to false. > > Uninitialized memory causes it to be set to true

[PATCH] drm/amd/display: Fix white screen page fault for gpuvm

2021-09-13 Thread Nicholas Kazlauskas
[Why] The "base_addr_is_mc_addr" field was added for dcn3.1 support but pa_config was never updated to set it to false. Uninitialized memory causes it to be set to true which results in address mistranslation and white screen. [How] Use memset to ensure all fields are initialized to 0 by default.

Re: [PATCH] drm/amd/display: Add NULL checks for vblank workqueue

2021-09-13 Thread Alex Deucher
On Tue, Sep 7, 2021 at 9:42 PM Mike Lothian wrote: > > Hi > > I've just tested this out against Linus's tree and it seems to fix things > > Out of interest does Tonga have GPU reset when things go wrong? Yes, it does. Alex > > Thanks > > Mike > > On Tue, 7 Sept 2021 at 15:20, Harry Wentland wr

Re: [PATCH] amd/display: enable panel orientation quirks

2021-09-13 Thread Alex Deucher
Applied. Thanks! Alex On Mon, Sep 13, 2021 at 11:24 AM Harry Wentland wrote: > > On 2021-09-10 11:37 a.m., Simon Ser wrote: > > This patch allows panel orientation quirks from DRM core to be > > used. They attach a DRM connector property "panel orientation" > > which indicates in which directio

Re: [PATCH] drm/amdgpu: Remove ununsed variable from amdgpu_ib_pool_init

2021-09-13 Thread Alex Deucher
Reviewed-by: Alex Deucher On Mon, Sep 13, 2021 at 1:28 PM Anson Jacob wrote: > > Remove unused variable 'size'. > > Signed-off-by: Anson Jacob > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c > b/driv

[PATCH] drm/amdgpu: Remove ununsed variable from amdgpu_ib_pool_init

2021-09-13 Thread Anson Jacob
Remove unused variable 'size'. Signed-off-by: Anson Jacob --- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c index 9274f32c3661..bc1297dcdf97 100644 --- a/drivers/gpu/drm/a

Re: [PATCH] drm/amdkfd: Add dummy function for kgd2kfd_resume_iommu

2021-09-13 Thread Alex Deucher
Reviewed-by: Alex Deucher On Mon, Sep 13, 2021 at 12:56 PM Anson Jacob wrote: > > Add dummy function when CONFIG_HSA_AMD is not enabled. > > Fixes: 433d2448d57c ("drm/amdkfd: separate kfd_iommu_resume from kfd_resume") > Signed-off-by: Anson Jacob > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_amdk

[PATCH] drm/amdkfd: Add dummy function for kgd2kfd_resume_iommu

2021-09-13 Thread Anson Jacob
Add dummy function when CONFIG_HSA_AMD is not enabled. Fixes: 433d2448d57c ("drm/amdkfd: separate kfd_iommu_resume from kfd_resume") Signed-off-by: Anson Jacob --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgp

Re: [PATCH 2/2] drm/amdgpu: Demote TMZ unsupported log message from warning to info

2021-09-13 Thread Alex Deucher
Applied. Thanks. Alex On Mon, Sep 13, 2021 at 4:46 AM Paul Menzel wrote: > > As the user cannot do anything about the unsupported Trusted Memory Zone > (TMZ) feature, do not warn about it, but make it informational, so > demote the log level from warning to info. > > Signed-off-by: Paul Menzel

Re: [PATCH] drm/amdgpu: Drop inline from amdgpu_ras_eeprom_max_record_count

2021-09-13 Thread Alex Deucher
Applied. Thanks! Alex On Thu, Sep 9, 2021 at 2:07 PM Lyude Paul wrote: > > Reviewed-by: Lyude Paul > > On Thu, 2021-09-09 at 18:56 +0200, Michel Dänzer wrote: > > From: Michel Dänzer > > > > This was unusual; normally, inline functions are declared static as > > well, and defined in a header

Re: [PATCH] drm/amdkfd: Cast atomic64_read return value

2021-09-13 Thread Michel Dänzer
On 2021-09-13 18:28, Felix Kuehling wrote: > Am 2021-09-13 um 12:18 p.m. schrieb Michel Dänzer: >> On 2021-09-13 17:19, Felix Kuehling wrote: >>> Am 2021-09-13 um 10:19 a.m. schrieb Michel Dänzer: From: Michel Dänzer Avoids warning with -Wformat: CC [M] drivers/gpu/drm/

Re: [PATCH] drm/amdkfd: Cast atomic64_read return value

2021-09-13 Thread Felix Kuehling
Am 2021-09-13 um 12:18 p.m. schrieb Michel Dänzer: > On 2021-09-13 17:19, Felix Kuehling wrote: >> Am 2021-09-13 um 10:19 a.m. schrieb Michel Dänzer: >>> From: Michel Dänzer >>> >>> Avoids warning with -Wformat: >>> >>> CC [M] drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_smi_events.o >>> ../drivers

Re: [PATCH] drm/amdkfd: Cast atomic64_read return value

2021-09-13 Thread Michel Dänzer
On 2021-09-13 17:19, Felix Kuehling wrote: > Am 2021-09-13 um 10:19 a.m. schrieb Michel Dänzer: >> From: Michel Dänzer >> >> Avoids warning with -Wformat: >> >> CC [M] drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_smi_events.o >> ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_smi_events.c: In function

[PATCH v2 08/12] lib: test_hmm add ioctl to get zone device type

2021-09-13 Thread Alex Sierra
new ioctl cmd added to query zone device type. This will be used once the test_hmm adds zone device public type. Signed-off-by: Alex Sierra --- lib/test_hmm.c | 15 ++- lib/test_hmm_uapi.h | 7 +++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/lib/test_hmm.

[PATCH v2 12/12] tools: update test_hmm script to support SP config

2021-09-13 Thread Alex Sierra
Add two more parameters to set spm_addr_dev0 & spm_addr_dev1 addresses. These two parameters configure the start SP addresses for each device in test_hmm driver. Consequently, this configures zone device type as public. Signed-off-by: Alex Sierra --- tools/testing/selftests/vm/test_hmm.sh | 20 +

[PATCH v2 11/12] tools: update hmm-test to support device public type

2021-09-13 Thread Alex Sierra
Test cases such as migrate_fault and migrate_multiple, were modified to explicit migrate from device to sys memory without the need of page faults, when using device public type. Snapshot test case updated to read memory device type first and based on that, get the proper returned results migrate_

[PATCH v2 10/12] lib: add support for device public type in test_hmm

2021-09-13 Thread Alex Sierra
Device Public type uses device memory that is coherently accesible by the CPU. This could be shown as SP (special purpose) memory range at the BIOS-e820 memory enumeration. If no SP memory is supported in system, this could be faked by setting CONFIG_EFI_FAKE_MEMMAP. Currently, test_hmm only suppo

[PATCH v2 09/12] lib: test_hmm add module param for zone device type

2021-09-13 Thread Alex Sierra
In order to configure device public in test_hmm, two module parameters should be passed, which correspond to the SP start address of each device (2) spm_addr_dev0 & spm_addr_dev1. If no parameters are passed, private device type is configured. Signed-off-by: Alex Sierra --- v5: Remove devmem->pag

[PATCH v2 06/12] drm/amdkfd: add SPM support for SVM

2021-09-13 Thread Alex Sierra
When CPU is connected throug XGMI, it has coherent access to VRAM resource. In this case that resource is taken from a table in the device gmc aperture base. This resource is used along with the device type, which could be DEVICE_PRIVATE or DEVICE_PUBLIC to create the device page map region. Signe

[PATCH v2 02/12] mm: remove extra ZONE_DEVICE struct page refcount

2021-09-13 Thread Alex Sierra
From: Ralph Campbell ZONE_DEVICE struct pages have an extra reference count that complicates the code for put_page() and several places in the kernel that need to check the reference count to see that a page is not being used (gup, compaction, migration, etc.). Clean up the code so the reference

[PATCH v2 05/12] drm/amdkfd: ref count init for device pages

2021-09-13 Thread Alex Sierra
Ref counter from device pages is init to zero during memmap init zone. The first time a new device page is allocated to migrate data into it, its ref counter needs to be initialized to one. Signed-off-by: Alex Sierra --- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 3 ++- 1 file changed, 2 inserti

[PATCH v2 07/12] drm/amdkfd: public type as sys mem on migration to ram

2021-09-13 Thread Alex Sierra
Public device type memory on VRAM to RAM migration, has similar access as System RAM from the CPU. This flag sets the source from the sender. Which in Public type case, should be set as MIGRATE_VMA_SELECT_DEVICE_PUBLIC. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling --- drivers/gpu/drm/

[PATCH v2 04/12] mm: add device public vma selection for memory migration

2021-09-13 Thread Alex Sierra
This case is used to migrate pages from device memory, back to system memory. Device public type memory is cache coherent from device and CPU point of view. Signed-off-by: Alex Sierra --- v2: condition added when migrations from device public pages. --- include/linux/migrate.h | 1 + mm/migrate.

[PATCH v2 03/12] mm: add zone device public type memory support

2021-09-13 Thread Alex Sierra
Device memory that is cache coherent from device and CPU point of view. This is use on platform that have an advance system bus (like CAPI or CCIX). Any page of a process can be migrated to such memory. However, no one should be allow to pin such memory so that it can always be evicted. Signed-off

[PATCH v2 00/12] MEMORY_DEVICE_PUBLIC for CPU-accessible coherent device memory

2021-09-13 Thread Alex Sierra
v1: AMD is building a system architecture for the Frontier supercomputer with a coherent interconnect between CPUs and GPUs. This hardware architecture allows the CPUs to coherently access GPU device memory. We have hardware in our labs and we are working with our partner HPE on the BIOS, firmware

[PATCH v2 01/12] ext4/xfs: add page refcount helper

2021-09-13 Thread Alex Sierra
From: Ralph Campbell There are several places where ZONE_DEVICE struct pages assume a reference count == 1 means the page is idle and free. Instead of open coding this, add a helper function to hide this detail. Signed-off-by: Ralph Campbell Signed-off-by: Alex Sierra Reviewed-by: Christoph He

Re: [PATCH] amd/display: enable panel orientation quirks

2021-09-13 Thread Harry Wentland
On 2021-09-10 11:37 a.m., Simon Ser wrote: > This patch allows panel orientation quirks from DRM core to be > used. They attach a DRM connector property "panel orientation" > which indicates in which direction the panel has been mounted. > Some machines have the internal screen mounted with a rotat

Re: [PATCH 1/1] drm/amdkfd: Add sysfs bitfields and enums to uAPI

2021-09-13 Thread Alex Deucher
On Fri, Sep 10, 2021 at 3:54 PM Felix Kuehling wrote: > > These bits are de-facto part of the uAPI, so declare them in a uAPI header. > Please include a link to the userspace that uses this in the commit message. Alex > Signed-off-by: Felix Kuehling > --- > MAINTAINERS

Re: [PATCH] drm/amdkfd: Cast atomic64_read return value

2021-09-13 Thread Felix Kuehling
Am 2021-09-13 um 10:19 a.m. schrieb Michel Dänzer: > From: Michel Dänzer > > Avoids warning with -Wformat: > > CC [M] drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_smi_events.o > ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_smi_events.c: In function > ‘kfd_smi_event_update_thermal_throttling’: > ../

Re: [RFC][PATCH] drm/amdgpu/powerplay/smu10: Add custom profile

2021-09-13 Thread Alex Deucher
On Wed, Sep 8, 2021 at 3:23 AM Daniel Gomez wrote: > > On Tue, 7 Sept 2021 at 19:23, Alex Deucher wrote: > > > > On Tue, Sep 7, 2021 at 4:53 AM Daniel Gomez wrote: > > > > > > Add custom power profile mode support on smu10. > > > Update workload bit list. > > > --- > > > > > > Hi, > > > > > > I'

Re: [PATCH v2] drm/amdgpu: Fix a race of IB test

2021-09-13 Thread Andrey Grodzovsky
Please add a tag V2 in description explaining what was the delta from V1. Other then that looks good to me. Andrey On 2021-09-12 7:48 p.m., xinhui pan wrote: Direct IB submission should be exclusive. So use write lock. Signed-off-by: xinhui pan --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.

Re: [PATCH] drm/amdgpu: use generic fb helpers instead of setting up AMD own's.

2021-09-13 Thread Alex Deucher
On Thu, Sep 9, 2021 at 11:25 PM Evan Quan wrote: > > With the shadow buffer support from generic framebuffer emulation, it's > possible now to have runpm kicked when no update for console. > > Change-Id: I285472c9100ee6f649d3f3f3548f402b9cd34eaf > Signed-off-by: Evan Quan > Acked-by: Christian Kö

[PATCH] drm/amdkfd: Cast atomic64_read return value

2021-09-13 Thread Michel Dänzer
From: Michel Dänzer Avoids warning with -Wformat: CC [M] drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_smi_events.o ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_smi_events.c: In function ‘kfd_smi_event_update_thermal_throttling’: ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_smi_events.c:224:60: war

[PATCH] drm/amdkfd: Cast atomic64_read return value

2021-09-13 Thread Michel Dänzer
From: Michel Dänzer Avoids warning with -Wformat: CC [M] drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_smi_events.o ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_smi_events.c: In function ‘kfd_smi_event_update_thermal_throttling’: ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_smi_events.c:224:60: war

Re: 回复: 回复: [PATCH v2] drm/amdgpu: Fix a race of IB test

2021-09-13 Thread Lazar, Lijo
Thanks for the clarification Xinhui. Based on Christian's explanation, what I understood is - this is an exceptional case in debugfs calls and the other goal is to avoid maintenance of one more lock just to support this API. I no longer have any issues with this approach. Thanks, Lijo On 9/

RE: [PATCH v4 2/3] drm/amdgpu: VCE avoid memory allocation during IB test

2021-09-13 Thread Liu, Leo
[AMD Official Use Only] 256 bytes alignment is for Video HW that is with GFX9, so it should be fine in general. Regards, Leo -Original Message- From: Koenig, Christian Sent: September 13, 2021 5:04 AM To: Pan, Xinhui ; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Liu, Leo ;

Re: 回复: [PATCH v2] drm/amdgpu: Fix a race of IB test

2021-09-13 Thread Christian König
NAK, this is not the lazy way to fix it at all. The reset semaphore protects the scheduler and ring objects from concurrent modification, so taking the write side of it is perfectly valid here. Christian. Am 13.09.21 um 06:42 schrieb Pan, Xinhui: [AMD Official Use Only] yep, that is a lazy

Re: [PATCH v4 3/3] drm/amdgpu: VCN avoid memory allocation during IB test

2021-09-13 Thread Christian König
Am 13.09.21 um 10:42 schrieb xinhui pan: alloc extra msg from direct IB pool. Reviewed-by: Christian König Signed-off-by: xinhui pan Reviewed-by: Christian König --- change from v1: msg is aligned to gpu page boundary --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 97 +++-

Re: [PATCH v4 2/3] drm/amdgpu: VCE avoid memory allocation during IB test

2021-09-13 Thread Christian König
Am 13.09.21 um 10:42 schrieb xinhui pan: alloc extra msg from direct IB pool. Signed-off-by: xinhui pan It would be cleaner if Leo could confirm that 256 byte alignment would work as well. But either way Reviewed-by: Christian König Regards, Christian. --- change from v1: msg is alloca

Re: [PATCH v4 1/3] drm/amdgpu: UVD avoid memory allocation during IB test

2021-09-13 Thread Christian König
Am 13.09.21 um 10:42 schrieb xinhui pan: move BO allocation in sw_init. Signed-off-by: xinhui pan --- change from v3: drop the bo resv lock in ib test. --- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 102 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h | 1 + drivers/gpu/dr

[PATCH 1/2] drm/amdgpu: Clarify that TMZ unsupported message is due to hardware

2021-09-13 Thread Paul Menzel
The warning amdgpu :05:00.0: amdgpu: Trusted Memory Zone (TMZ) feature not supported leaves the reader wondering, if anything can be done about it. As it’s unsupported in the hardware, and nothing can be done about, mention that in the log message. amdgpu :05:00.0: amdgpu: Truste

[PATCH 2/2] drm/amdgpu: Demote TMZ unsupported log message from warning to info

2021-09-13 Thread Paul Menzel
As the user cannot do anything about the unsupported Trusted Memory Zone (TMZ) feature, do not warn about it, but make it informational, so demote the log level from warning to info. Signed-off-by: Paul Menzel --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v4 3/3] drm/amdgpu: VCN avoid memory allocation during IB test

2021-09-13 Thread xinhui pan
alloc extra msg from direct IB pool. Reviewed-by: Christian König Signed-off-by: xinhui pan --- change from v1: msg is aligned to gpu page boundary --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 97 +++-- 1 file changed, 44 insertions(+), 53 deletions(-) diff --git a/drivers

[PATCH v4 2/3] drm/amdgpu: VCE avoid memory allocation during IB test

2021-09-13 Thread xinhui pan
alloc extra msg from direct IB pool. Signed-off-by: xinhui pan --- change from v1: msg is allocated separately. msg is aligned to gpu page boundary --- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 27 - 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/drivers/

[PATCH v4 1/3] drm/amdgpu: UVD avoid memory allocation during IB test

2021-09-13 Thread xinhui pan
move BO allocation in sw_init. Signed-off-by: xinhui pan --- change from v3: drop the bo resv lock in ib test. --- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 102 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 11 +-- drivers/g

Re: [PATCH 1/2] drm/amdgpu: Clarify that TMZ unsupported message is due to hardware

2021-09-13 Thread Christian König
Am 13.09.21 um 10:34 schrieb Paul Menzel: The warning amdgpu :05:00.0: amdgpu: Trusted Memory Zone (TMZ) feature not supported leaves the reader wondering, if anything can be done about it. As it’s unsupported in the hardware, and nothing can be done about, mention that in the log mes

Re: [PATCH 1/1] drm/radeon: pass drm dev radeon_agp_head_init directly

2021-09-13 Thread Christian König
Am 13.09.21 um 10:27 schrieb Nirmoy Das: Pass drm dev directly as rdev->ddev gets initialized later on at radeon_device_init(). Bug: https://bugzilla.kernel.org/show_bug.cgi?id=214375 Signed-off-by: Nirmoy Das Reviewed-by: Christian König --- drivers/gpu/drm/radeon/radeon_kms.c | 2 +-

[PATCH 1/1] drm/radeon: pass drm dev radeon_agp_head_init directly

2021-09-13 Thread Nirmoy Das
Pass drm dev directly as rdev->ddev gets initialized later on at radeon_device_init(). Bug: https://bugzilla.kernel.org/show_bug.cgi?id=214375 Signed-off-by: Nirmoy Das --- drivers/gpu/drm/radeon/radeon_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rad

Re: [RFC PATCH v2] drm/ttm: Try to check if new ttm man out of bounds during compile

2021-09-13 Thread Christian König
Am 13.09.21 um 10:09 schrieb xinhui pan: Allow TTM know if vendor set new ttm mananger out of bounds by adding build_bug_on. Signed-off-by: xinhui pan Yeah, that looks better. Reviewed-by: Christian König Going to push that to drm-misc-next. Thanks, Christian. --- drivers/gpu/drm/ttm

[RFC PATCH v2] drm/ttm: Try to check if new ttm man out of bounds during compile

2021-09-13 Thread xinhui pan
Allow TTM know if vendor set new ttm mananger out of bounds by adding build_bug_on. Signed-off-by: xinhui pan --- drivers/gpu/drm/ttm/ttm_range_manager.c | 8 include/drm/ttm/ttm_device.h| 3 +++ include/drm/ttm/ttm_range_manager.h | 18 -- 3 files chan

[PATCH] drm/amdgpu: Update PSP TA unload function

2021-09-13 Thread Candice Li
Update PSP TA unload function to use PSP TA context as input argument. Signed-off-by: Candice Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/a

[PATCH] drm/amdgpu: Conform ASD header/loading to generic TA systems

2021-09-13 Thread Candice Li
Update asd_context structure and add asd_initialize function to conform ASD header/loading to generic TA systems. Signed-off-by: Candice Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 60 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 10 ++--- 2 files changed, 26 insertio

回复: 回复: [PATCH v2] drm/amdgpu: Fix a race of IB test

2021-09-13 Thread Pan, Xinhui
[AMD Official Use Only] Of source IB test can hang the GPU. But it wait fence with one specific timeout. and it not depends on gpu scheduler. So IB test must can return. 发件人: Lazar, Lijo 发送时间: 2021年9月13日 15:15 收件人: Christian König; Koenig, Christian; Pan

Re: 回复: [PATCH v2] drm/amdgpu: Fix a race of IB test

2021-09-13 Thread Christian König
Am 13.09.21 um 09:15 schrieb Lazar, Lijo: On 9/13/2021 12:21 PM, Christian König wrote: Keep in mind that we don't try to avoid contention here. The goal is rather to have as few locks as possible to avoid the extra overhead in the hot path. Contention is completely irrelevant for the debug a

Re: [PATCH v3 3/8] x86/sev: Add an x86 version of cc_platform_has()

2021-09-13 Thread Borislav Petkov
On Wed, Sep 08, 2021 at 05:58:34PM -0500, Tom Lendacky wrote: > diff --git a/arch/x86/kernel/cc_platform.c b/arch/x86/kernel/cc_platform.c > new file mode 100644 > index ..3c9bacd3c3f3 > --- /dev/null > +++ b/arch/x86/kernel/cc_platform.c > @@ -0,0 +1,21 @@ > +// SPDX-License-Identifier

Re: [PATCH v3 2/8] mm: Introduce a function to check for confidential computing features

2021-09-13 Thread Borislav Petkov
On Wed, Sep 08, 2021 at 05:58:33PM -0500, Tom Lendacky wrote: > In prep for other confidential computing technologies, introduce a generic preparation > helper function, cc_platform_has(), that can be used to check for specific > active confidential computing attributes, like memory encryption. T

Re: [PATCH] drm/ttm: add a WARN_ON in ttm_set_driver_manager when array bounds (v2)

2021-09-13 Thread Robin Murphy
On 2021-09-10 11:09, Guchun Chen wrote: Vendor will define their own memory types on top of TTM_PL_PRIV, but call ttm_set_driver_manager directly without checking mem_type value when setting up memory manager. So add such check to aware the case when array bounds. v2: lower check level to WARN_O

Re: 回复: [PATCH v2] drm/amdgpu: Fix a race of IB test

2021-09-13 Thread Lazar, Lijo
On 9/13/2021 12:21 PM, Christian König wrote: Keep in mind that we don't try to avoid contention here. The goal is rather to have as few locks as possible to avoid the extra overhead in the hot path. Contention is completely irrelevant for the debug and device reset since that are rarely o