[PATCH] drm/amdgpu: Release the correct object on error in amdgpu_benchmark_move()

2019-11-14 Thread Dan Carpenter
There is a typo so this unreserves "sobj" instead of "dobj". Fixes: bb812f1ea87d ("drm/amdgpu: allocate gart memory when it's required (v3)") Signed-off-by: Dan Carpenter --- From static analysis. Not tested. drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c | 2 +- 1 file changed, 1 insertion(+),

RE: [PATCH] drm/amdgpu: Fix the null pointer issue for tdr

2019-11-14 Thread Deng, Emily
Hi Andrey, Currently, I am busying with another issue, maybe will try next week. Best wishes Emily Deng >-Original Message- >From: Grodzovsky, Andrey >Sent: Friday, November 15, 2019 6:14 AM >To: Koenig, Christian ; Deng, Emily >; amd-gfx@lists.freedesktop.org >Subject: Re: [PATCH

[PATCH 11/12] tests/amdgpu: add atomic dma command to verify the secure buffer

2019-11-14 Thread Aaron Liu
DMA's atomic behavir is unlike GFX,If the comparing data is not equal to destination data, For GFX, loop again till gfx timeout(system hang). For DMA, loop again till timer expired and then send interrupt. So testcase can't use interrupt mechanism. We take another way to verify. When the comparing

[PATCH 10/12] tests/amdgpu: add test to submit a gfx command with secure context

2019-11-14 Thread Aaron Liu
This patch is to test the command submission with secure context. Signed-off-by: Aaron Liu --- tests/amdgpu/security_tests.c | 9 + 1 file changed, 9 insertions(+) diff --git a/tests/amdgpu/security_tests.c b/tests/amdgpu/security_tests.c index a3807ee..0bb4ad2 100644 --- a/tests/amdgpu

[PATCH 12/12] tests/amdgpu: add test to submit a sdma command with secure context

2019-11-14 Thread Aaron Liu
This patch add test to submit a sdma command with secure context. Signed-off-by: Aaron Liu --- tests/amdgpu/security_tests.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/tests/amdgpu/security_tests.c b/tests/amdgpu/security_tests.c index 0bb4ad2..eb239f4 100644 --- a/tests/amd

[PATCH 06/12] tests/amdgpu: add device handle as input param for exec_cs_helper and write_linear_helper (v4)

2019-11-14 Thread Aaron Liu
From: Huang Rui This patch is to add add device handle as input param for exec_cs_helper and write_linear_helper. Because they are needed in security tests. v2: fix typo that basic tests should be un-secure. v3: refine the function implementation. v4: remove amdgpu_cs_ctx_create3 calling. Sign

[PATCH 09/12] tests/amdgpu: add atomic_mem cp_packet to verify the secure buffer

2019-11-14 Thread Aaron Liu
Secure buffer is only able to be read with trusted ip block. So we need use GFX ip to read it back instead of CPU. Steps: 1. use write_data packet to write 0xdeadbeaf to secure buffer, 2. use atmoic_mem packet and ATOMIC_CMPSWAP_RTN_32 opcode to compare the cmp_data(0xdeadbeaf) to the written data

[PATCH 05/12] tests/amdgpu: expand write linear helper for security (v3)

2019-11-14 Thread Aaron Liu
From: Huang Rui This patch expand write linear helper for security to submit the command with secure context. v2: refine the function implementation. v3: remove amdgpu_cs_ctx_create3. Signed-off-by: Huang Rui Signed-off-by: Aaron Liu Reviewed-by: Alex Deucher --- tests/amdgpu/amdgpu_test.h

[PATCH 08/12] tests/amdgpu: expand secure param for exec_cs_helper

2019-11-14 Thread Aaron Liu
This patch expands secure param for amdgpu_test_exec_cs_helper_raw. The flag is transfered to kernel with cs. Signed-off-by: Aaron Liu --- tests/amdgpu/basic_tests.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/amdgpu/basic_tests.c b/tests/amdgpu/basic_tests.

[PATCH 07/12] amdgpu: using IB flags for TMZ or non-TMZ

2019-11-14 Thread Aaron Liu
In kernel, cs->in.flags is used for TMZ. Hence libdrm should transfer the flag to kernel. Signed-off-by: Aaron Liu --- amdgpu/amdgpu.h| 4 +++- amdgpu/amdgpu_cs.c | 4 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h index f45f9f7..aee3f3d

[PATCH 01/12] amdgpu: add UAPI for creating encrypted buffers

2019-11-14 Thread Aaron Liu
From: Huang Rui To align the kernel uapi change from Alex: "Add a flag to the GEM_CREATE ioctl to create encrypted buffers. Buffers with this flag set will be created with the TMZ bit set in the PTEs or engines accessing them. This is required in order to properly access the data from the engine

[PATCH 00/12] Initial TMZ support for libdrm and amdgpu_test

2019-11-14 Thread Liu, Aaron
These series of patches are to initial TMZ support for libdrm and amdgpu_test. They are based on amd-staging-hybrid-master20190125 branch. So far, gfx/sdma TMZ tests are passed on Raven. Please review them. Thanks, Aaron Aaron Liu (6): amdgpu: using IB flags for TMZ or non-TMZ tests/amd

[PATCH 02/12] tests/amdgpu: add security test suite (v2)

2019-11-14 Thread Aaron Liu
From: Huang Rui This patch is to add a new test suite to store security tests. In Raven+ asics, it will support TMZ (trust memory zone), and it is page-based protection feature. v2: remove tests/amdgpu/Makefile.am and update to tests/amdgpu/meson.build Signed-off-by: Huang Rui Signed-off-by: A

[PATCH 03/12] tests/amdgpu: add secure buffer allocation test for system memory

2019-11-14 Thread Aaron Liu
From: Huang Rui This patch is to add secure buffer allocation test for system memory. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher --- tests/amdgpu/security_tests.c | 9 + 1 file changed, 9 insertions(+) diff --git a/tests/amdgpu/security_tests.c b/tests/amdgpu/security_tests.c

[PATCH 04/12] tests/amdgpu: add secure buffer allocation test for invisible VRAM

2019-11-14 Thread Aaron Liu
From: Huang Rui This patch is to add secure buffer allocation test for invisible VRAM. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher --- tests/amdgpu/security_tests.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/tests/amdgpu/security_tests.c b/tests/amdgpu/security_tes

RE: [PATCH 1/2] drm/amdgpu/ras: Extract amdgpu_ras_save_bad_pages from amdgpu_ras_reserve_bad_pages

2019-11-14 Thread Zhou1, Tao
Sorry, I confused reserve_bad_pages with add_bad_pages, you're right. If vram allocated info could be reserved after gpu reset, it seems your patch is unnecessary. If there is a risk that the info is lost, I think [data->0, data->count) pages instead of only [data->last_reserved, data->count) pa

Re: [Regression] Broken Raven Ridge firmware on kernel 5.3.11 and up

2019-11-14 Thread Luya Tshimbalanga
Thanks Alex for the quick reply. The kernel in question is from Fedora that somehow failed to install the firmware in the initrd. The firmware is present as highlighted on the bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=1772313#c4 Awaiting for the Fedora Kernel team to investigate the

Re: [PATCH] drm/amd/display: Use pixel encoding 444 for dongle usb-c to hdmi

2019-11-14 Thread Julien Isorce
Hi Harry, As suggested I created the issue here https://gitlab.freedesktop.org/drm/amd/issues/2 with a picture of the problem attached. Please take a look, thx! Julien On Mon, Nov 11, 2019 at 1:11 PM Harry Wentland wrote: > On 2019-10-08 2:15 p.m., Julien Isorce wrote: > > Hi Harry, > > > > I

Re: [PATCH] drm/amdgpu: Fix the null pointer issue for tdr

2019-11-14 Thread Andrey Grodzovsky
Attached. Emily - can you give it a try ? Andrey On 11/14/19 3:12 AM, Christian König wrote: What about instead of peeking at the job to actually remove it from ring_mirror_list right there, Also an interesting idea. We would need to protect the mirror list with a lock again, but that should

[pull] amdgpu drm-fixes-5.4

2019-11-14 Thread Alex Deucher
Hi Dave, Daniel, Just one fix for 5.4. The following changes since commit 31f4f5b495a62c9a8b15b1c3581acd5efeb9af8c: Linux 5.4-rc7 (2019-11-10 16:17:15 -0800) are available in the Git repository at: git://people.freedesktop.org/~agd5f/linux tags/drm-fixes-5.4-2019-11-14 for you to fetch ch

RE: [PATCH 1/2] drm/dsc: Update drm_dsc to reflect native 4.2.0 DSC spec

2019-11-14 Thread Cornij, Nikola
Yes -Original Message- From: Wentland, Harry Sent: November 14, 2019 4:22 PM To: Cornij, Nikola ; Lipski, Mikita ; amd-gfx@lists.freedesktop.org Cc: Wentland, Harry ; Deucher, Alexander ; manasi.d.nav...@intel.com; David Francis Subject: Re: [PATCH 1/2] drm/dsc: Update drm_dsc to ref

Re: [PATCH 1/2] drm/dsc: Update drm_dsc to reflect native 4.2.0 DSC spec

2019-11-14 Thread Harry Wentland
On 2019-11-14 4:20 p.m., Cornij, Nikola wrote: > This looks good, too. > Can we treat this as your reviewed-by for both changes? Usually people mark these as reviewed with a Reviewed-by: Harry Wentland Thanks, Harry > -Original Message- > From: mikita.lip...@amd.com > Sent: November

RE: [PATCH 1/2] drm/dsc: Update drm_dsc to reflect native 4.2.0 DSC spec

2019-11-14 Thread Cornij, Nikola
This looks good, too. -Original Message- From: mikita.lip...@amd.com Sent: November 13, 2019 2:07 PM To: amd-gfx@lists.freedesktop.org Cc: Wentland, Harry ; Deucher, Alexander ; Cornij, Nikola ; manasi.d.nav...@intel.com; Lipski, Mikita ; David Francis Subject: [PATCH 1/2] drm/dsc: U

RE: [PATCH 2/2] drm/dsc: Use 32-bit integers for some DSC parameter calculations

2019-11-14 Thread Cornij, Nikola
Looks good to me -Original Message- From: mikita.lip...@amd.com Sent: November 13, 2019 2:07 PM To: amd-gfx@lists.freedesktop.org Cc: Wentland, Harry ; Deucher, Alexander ; Cornij, Nikola ; manasi.d.nav...@intel.com; Lipski, Mikita Subject: [PATCH 2/2] drm/dsc: Use 32-bit integers for

Re: [PATCH 0/4] drm/amd/display: remove some set but not used variables

2019-11-14 Thread Alex Deucher
On Thu, Nov 14, 2019 at 11:41 AM Harry Wentland wrote: > > On 2019-11-14 7:36 a.m., zhengbin wrote: > > zhengbin (4): > > drm/amd/display: remove set but not used variable 'old_plane_crtc' > > drm/amd/display: remove set but not used variable 'bp' in > > bios_parser2.c > > drm/amd/displa

[PATCH 2/2] drm/amdgpu: disable gfxoff when using register read interface

2019-11-14 Thread Alex Deucher
When gfxoff is enabled, accessing gfx registers via MMIO can lead to a hang. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205497 Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/am

[PATCH 1/2] Revert "drm/amdgpu: don't read registers if gfxoff is enabled (v2)"

2019-11-14 Thread Alex Deucher
This reverts commit 5e49d6f654c569c2de920babbaf5cf7c4c4a353f. Drop this workaround in favor of a better one. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/nv.c| 27 ++ drivers/gpu/drm/amd/amdgpu/soc15.c | 31 -- 2 files change

Re: [PATCH 1/2] drm/amdgpu/ras: Extract amdgpu_ras_save_bad_pages from amdgpu_ras_reserve_bad_pages

2019-11-14 Thread Andrey Grodzovsky
On 11/13/19 10:09 PM, Zhou1, Tao wrote: Two questions: 1. "we lose all reservation during ASIC reset" Are you sure of it? I remember the content of vram may be lost after reset but the allocated status could be reserved. Yea, now that I am thinking of it I think i might have confused it with

Re: [PATCH 0/4] drm/amd/display: remove some set but not used variables

2019-11-14 Thread Harry Wentland
On 2019-11-14 7:36 a.m., zhengbin wrote: > zhengbin (4): > drm/amd/display: remove set but not used variable 'old_plane_crtc' > drm/amd/display: remove set but not used variable 'bp' in > bios_parser2.c > drm/amd/display: remove set but not used variable 'bp' in > bios_parser.c > dr

Re: [PATCH 16/21] drm/amdgpu: enable JPEG2.0 dpm

2019-11-14 Thread Leo Liu
On 2019-11-14 11:03 a.m., Alex Deucher wrote: On Tue, Nov 12, 2019 at 1:04 PM Leo Liu wrote: By using its own enabling function Signed-off-by: Leo Liu --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 8 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.h | 1 + drivers/gpu/drm/amd/amdgpu/jpeg_

Re: [PATCH 16/21] drm/amdgpu: enable JPEG2.0 dpm

2019-11-14 Thread Alex Deucher
On Tue, Nov 12, 2019 at 1:04 PM Leo Liu wrote: > > By using its own enabling function > > Signed-off-by: Leo Liu > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 8 > drivers/gpu/drm/amd/amdgpu/amdgpu_pm.h | 1 + > drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c | 10 +- > 3 files chan

Re: [PATCH] drm/amdgpu: Fix the null pointer issue for tdr

2019-11-14 Thread Andrey Grodzovsky
ok Andrey On 11/14/19 3:12 AM, Christian König wrote: What about instead of peeking at the job to actually remove it from ring_mirror_list right there, Also an interesting idea. We would need to protect the mirror list with a lock again, but that should be the lesser evil. Maybe prototype th

Re: [PATCH] drm/amdgpu/gfx10: explicitly wait for cp idle after halt/unhalt

2019-11-14 Thread Deucher, Alexander
Acked-by: Alex Deucher From: amd-gfx on behalf of Xiaojie Yuan Sent: Thursday, November 14, 2019 4:13 AM To: amd-gfx@lists.freedesktop.org Cc: Long, Gang ; Xiao, Jack ; Yuan, Xiaojie ; Zhang, Hawking Subject: [PATCH] drm/amdgpu/gfx10: explicitly wait for cp i

[PATCH 0/4] drm/amd/display: remove some set but not used variables

2019-11-14 Thread zhengbin
zhengbin (4): drm/amd/display: remove set but not used variable 'old_plane_crtc' drm/amd/display: remove set but not used variable 'bp' in bios_parser2.c drm/amd/display: remove set but not used variable 'bp' in bios_parser.c drm/amd/display: remove set but not used variable 'min_co

[PATCH 4/4] drm/amd/display: remove set but not used variable 'min_content'

2019-11-14 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/amd/display/modules/color/color_gamma.c: In function build_freesync_hdr: drivers/gpu/drm/amd/display/modules/color/color_gamma.c:830:20: warning: variable min_content set but not used [-Wunused-but-set-variable] It is not used since

[PATCH 2/4] drm/amd/display: remove set but not used variable 'bp' in bios_parser2.c

2019-11-14 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c: In function bios_get_board_layout_info: drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c:1826:22: warning: variable bp set but not used [-Wunused-but-set-variable] It is introduced by commit 1ee

[PATCH 1/4] drm/amd/display: remove set but not used variable 'old_plane_crtc'

2019-11-14 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c: In function dm_determine_update_type_for_commit: drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:6516:36: warning: variable old_plane_crtc set but not used [-Wunused-but-set-variable] It is intro

[PATCH 3/4] drm/amd/display: remove set but not used variable 'bp' in bios_parser.c

2019-11-14 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/amd/display/dc/bios/bios_parser.c: In function bios_get_board_layout_info: drivers/gpu/drm/amd/display/dc/bios/bios_parser.c:2743:22: warning: variable bp set but not used [-Wunused-but-set-variable] It is introduced by commit 1eeed

Re: [Regression] Broken Raven Ridge firmware on kernel 5.3.11 and up

2019-11-14 Thread Alex Deucher
On Thu, Nov 14, 2019 at 1:34 AM Luya Tshimbalanga wrote: > > Hello team, > > I filed a bug on the kernel with a broken Raven Ridge firmware resulting > a blank screen thus unable to boot to either graphical and text mode. > Could someone investigate the issue on: > > https://bugzilla.kernel.org/sh

Re: [PATCH] drm/amd/powerplay: issue no PPSMC_MSG_GetCurrPkgPwr on unsupported ASICs

2019-11-14 Thread Deucher, Alexander
Acked-by: Alex Deucher From: amd-gfx on behalf of Evan Quan Sent: Thursday, November 14, 2019 2:33 AM To: amd-gfx@lists.freedesktop.org Cc: Quan, Evan Subject: [PATCH] drm/amd/powerplay: issue no PPSMC_MSG_GetCurrPkgPwr on unsupported ASICs Otherwise, the er

Re: [PATCH 2/2] drm/amdgpu: invalidate semphore mmhub workaround for gfx9/gfx10

2019-11-14 Thread Christian König
Am 14.11.19 um 11:17 schrieb Changfeng.Zhu: From: changzhu MMHUB may lose GPUVM invalidate acknowledge state across power-gating off cycle when it does invalidation req/ack work. So we must acquire/release one of the vm_invalidate_eng*_sem around the invalidation req/ack. Besides, vm_invalida

[PATCH 1/2] drm/amdgpu: enable mmhub power pate for renoir

2019-11-14 Thread Changfeng.Zhu
From: changzhu mmhub power gate structure is changed in renoir compared with raven. It goes through smu_dpm_set_power_gate other than adev->powerplay.pp_funcs->set_powergating_by_smu in renoir. So we can realize mmhub power gate in smu_dpm_set_power_gate -> smu_powergate_mmhub -> powergate_mmhub

[PATCH 2/2] drm/amdgpu: invalidate semphore mmhub workaround for gfx9/gfx10

2019-11-14 Thread Changfeng.Zhu
From: changzhu MMHUB may lose GPUVM invalidate acknowledge state across power-gating off cycle when it does invalidation req/ack work. So we must acquire/release one of the vm_invalidate_eng*_sem around the invalidation req/ack. Besides, vm_invalidate_eng*_sem will be read-only after acquire it

Re: [PATCH] drm/amd/powerplay: correct fine grained dpm force level setting

2019-11-14 Thread Wang, Kevin(Yang)
Reviewed-by: Kevin Wang From: amd-gfx on behalf of Evan Quan Sent: Thursday, November 14, 2019 5:07 PM To: amd-gfx@lists.freedesktop.org Cc: Quan, Evan Subject: [PATCH] drm/amd/powerplay: correct fine grained dpm force level setting For fine grained dpm, the

[PATCH] drm/amdgpu/gfx10: explicitly wait for cp idle after halt/unhalt

2019-11-14 Thread Xiaojie Yuan
50us is not enough to wait for cp ready after gpu reset on some navi asics. Signed-off-by: Xiaojie Yuan Suggested-by: Jack Xiao --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/d

[PATCH] drm/amd/powerplay: correct fine grained dpm force level setting

2019-11-14 Thread Evan Quan
For fine grained dpm, there is only two levels supported. However to reflect correctly the current clock frequency, there is an intermediate level faked. Thus on forcing level setting, we need to treat level 2 correctly as level 1. Change-Id: I32f936636f27eb8d8d9002bedd701f2bb0d3060a Signed-off-by

Re: drm core/helpers and MIT license

2019-11-14 Thread Simon Ser
Adding zeis...@freebsd.org for FreeBSD. I'll try to see if I can ping some NetBSD/OpenBSD folks too. On Tuesday, November 12, 2019 4:03 PM, Daniel Vetter wrote: > Hi all, > > Dave and me chatted about this last week on irc. Essentially we have: > > $ git grep SPDX.*GPL -- ':(glob)drivers/gpu/dr

Re: [PATCH] drm/amdgpu: Fix the null pointer issue for tdr

2019-11-14 Thread Christian König
What about instead of peeking at the job to actually remove it from ring_mirror_list right there, Also an interesting idea. We would need to protect the mirror list with a lock again, but that should be the lesser evil. Maybe prototype that and see if it works or not. Regards, Christian. Am 1