Re: [PATCH v2] drm/amdgpu: conditionally compile amdgpu's amdkfd files

2018-05-18 Thread Felix Kuehling
On 2018-05-18 05:57 PM, Oded Gabbay wrote: >>> +struct kfd2kgd_calls *amdgpu_amdkfd_gfx_7_get_functions(void) >>> +{ >>> + return NULL; >> I think this will cause an oops in amdgpu_amdkfd_probe because that >> function doesn't handle kgd2kfd == NULL. You could remove >>

Re: [PATCH v3] drm/amdgpu: conditionally compile amdgpu's amdkfd files

2018-05-18 Thread Felix Kuehling
On 2018-05-18 05:57 PM, Oded Gabbay wrote: > In case CONFIG_HSA_AMD is not chosen, there is no need to compile amdkfd > files that reside inside amdgpu dirver. In addition, because amdkfd > depends on x86_64 architecture and amdgpu is not, compiling amdkfd files > under i386 architecture can cause

Re: [PATCH v2] drm/amdgpu: conditionally compile amdgpu's amdkfd files

2018-05-18 Thread Oded Gabbay
On Fri, May 18, 2018 at 11:06 PM, Felix Kuehling wrote: > Two more comments inline. One cosmetic, one real issue. With that fixed, > this patch is Reviewed-by: Felix Kuehling > > Regards, > Felix > > On 2018-05-18 03:42 PM, Oded Gabbay wrote: >>

[PATCH v3] drm/amdgpu: conditionally compile amdgpu's amdkfd files

2018-05-18 Thread Oded Gabbay
In case CONFIG_HSA_AMD is not chosen, there is no need to compile amdkfd files that reside inside amdgpu dirver. In addition, because amdkfd depends on x86_64 architecture and amdgpu is not, compiling amdkfd files under i386 architecture can cause compiler errors and warnings. This patch modifies

Re: [PATCH 1/1] drm/amdgpu: add kernel doc for amdgpu_object.c

2018-05-18 Thread Samuel Li
On 2018-05-18 02:54 PM, Alex Deucher wrote: > On Thu, May 17, 2018 at 6:20 PM, Samuel Li wrote: >> Signed-off-by: Samuel Li > > Please also add a separate DOC section at the top of this file giving > a brief overview of how amdgpu bo API works. E.g., how

Re: [PATCH v2] drm/amdgpu: conditionally compile amdgpu's amdkfd files

2018-05-18 Thread Felix Kuehling
Two more comments inline. One cosmetic, one real issue. With that fixed, this patch is Reviewed-by: Felix Kuehling Regards,   Felix On 2018-05-18 03:42 PM, Oded Gabbay wrote: > In case CONFIG_HSA_AMD is not chosen, there is no need to compile amdkfd > files that reside

Re: [PATCH] drm/amd/pp: Fix static checker warning

2018-05-18 Thread Alex Deucher
On Fri, May 18, 2018 at 2:28 AM, Rex Zhu wrote: > error: uninitialized symbol '' > > Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher > --- > drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c | 24 > +- >

Re: [PATCH] drm/amd/pp: fix a couple locking issues

2018-05-18 Thread Alex Deucher
On Fri, May 18, 2018 at 3:06 AM, Rex Zhu wrote: > We should return unlock on the error path > > Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher > --- > .../gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c | 31 >

Re: [PATCH 1/4] drm/amdgpu: add new DF 1.7 register defs

2018-05-18 Thread Alex Deucher
Ping? On Wed, May 16, 2018 at 4:51 PM, Alex Deucher wrote: > Signed-off-by: Alex Deucher > --- > drivers/gpu/drm/amd/include/asic_reg/df/df_1_7_offset.h | 4 > drivers/gpu/drm/amd/include/asic_reg/df/df_1_7_sh_mask.h | 4 > 2 files

[PATCH v2] drm/amdgpu: conditionally compile amdgpu's amdkfd files

2018-05-18 Thread Oded Gabbay
In case CONFIG_HSA_AMD is not chosen, there is no need to compile amdkfd files that reside inside amdgpu dirver. In addition, because amdkfd depends on x86_64 architecture and amdgpu is not, compiling amdkfd files under i386 architecture can cause compiler errors and warnings. This patch modifies

Re: [PATCH] drm/amdgpu: consider user preference when pinning for SG display

2018-05-18 Thread Alex Deucher
On Fri, May 18, 2018 at 2:22 PM, Samuel Li wrote: > > > On 2018-05-18 04:21 AM, Michel Dänzer wrote: >> On 2018-05-17 06:55 PM, Alex Deucher wrote: >>> If the pin domain is set to GTT | VRAM, look at the preferred domains >>> for the bo and respect that if it's been set

Re: [PATCH] drm/amdgpu: consider user preference when pinning for SG display

2018-05-18 Thread Alex Deucher
On Fri, May 18, 2018 at 4:21 AM, Michel Dänzer wrote: > On 2018-05-17 06:55 PM, Alex Deucher wrote: >> If the pin domain is set to GTT | VRAM, look at the preferred domains >> for the bo and respect that if it's been set explicitly. >> >> Signed-off-by: Alex Deucher

Re: [PATCH 2/2] drm/amdgpu: Auto switch to video profiling mode on VCN demand

2018-05-18 Thread Alex Deucher
On Fri, May 18, 2018 at 5:33 AM, Rex Zhu wrote: Add a commit message. Something like: Switch to the VIDEO power profiles when VCN is active which is the power profile optimized for video playback. With that fixed: Reviewed-by: Alex Deucher Want to

Re: [PATCH 1/2] drm/amd/pp: Add profiling mode setting on RV

2018-05-18 Thread Alex Deucher
On Fri, May 18, 2018 at 5:33 AM, Rex Zhu wrote: > For power saving, default profiling mode was setted > to power saving mode. > > Currently, not support CUSTOM mode and not display > detailed profiling mode parameters in sysfs. > > Signed-off-by: Rex Zhu

Re: [PATCH 1/1] drm/amdgpu: add kernel doc for amdgpu_object.c

2018-05-18 Thread Alex Deucher
On Thu, May 17, 2018 at 6:20 PM, Samuel Li wrote: > Signed-off-by: Samuel Li Please also add a separate DOC section at the top of this file giving a brief overview of how amdgpu bo API works. E.g., how you would allocate, free, kmap, etc. What pinning

Re: [PATCH] drm/amdgpu: conditionally compile amdgpu's amdkfd files

2018-05-18 Thread Oded Gabbay
On Thu, May 17, 2018 at 12:09 AM, Felix Kuehling wrote: > Hi Oded, > > Thanks for working on this! The Makefile changes look good. > > Instead of checking and calling function pointers in amdgpu_amdkfd_... > functions at runtime, couldn't you just define empty stub

Re: [PATCH] drm/amdgpu: consider user preference when pinning for SG display

2018-05-18 Thread Samuel Li
On 2018-05-18 04:21 AM, Michel Dänzer wrote: > On 2018-05-17 06:55 PM, Alex Deucher wrote: >> If the pin domain is set to GTT | VRAM, look at the preferred domains >> for the bo and respect that if it's been set explicitly. >> >> Signed-off-by: Alex Deucher >> --- >>

[PATCH libdrm 3/3] amdgpu: Destroy fd_hash table when the last device is removed.

2018-05-18 Thread Jan Vesely
Fixes memory leak on module unload. Analogous to mesa commit of the same name. Signed-off-by: Jan Vesely --- amdgpu/amdgpu_device.c | 4 1 file changed, 4 insertions(+) diff --git a/amdgpu/amdgpu_device.c b/amdgpu/amdgpu_device.c index e23dd3b3..34ac95b8 100644 ---

[PATCH libdrm v2 1/3] amdgpu: Take lock before removing devices from fd_tab hash table.

2018-05-18 Thread Jan Vesely
Close the file descriptors under lock as well. v2: close fds after removing from hash table Signed-off-by: Jan Vesely --- amdgpu/amdgpu_device.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/amdgpu/amdgpu_device.c

[PATCH libdrm 2/3] amdgpu/util_hash_table: Add helper function to count the number of entries in hash table

2018-05-18 Thread Jan Vesely
Analogous to the mesa commit of the same name. Signed-off-by: Jan Vesely --- amdgpu/util_hash_table.c | 12 amdgpu/util_hash_table.h | 2 ++ 2 files changed, 14 insertions(+) diff --git a/amdgpu/util_hash_table.c b/amdgpu/util_hash_table.c index

Re: [PATCH] drm/amd/amdgpu: Convert comments for amdgpu_ttm.c

2018-05-18 Thread Alex Deucher
On Fri, May 18, 2018 at 12:22 PM, Tom St Denis wrote: > We're moving to Sphinx style documentation. Conver the comments > to that format. Also document some new content. > Sorry, I should have been more clear. The current comment formatting is fine. What I'd like is a

[PATCH] drm/amd/amdgpu: Convert comments for amdgpu_ttm.c

2018-05-18 Thread Tom St Denis
We're moving to Sphinx style documentation. Conver the comments to that format. Also document some new content. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 254 +++- 1 file changed, 185 insertions(+), 69

[PATCH xf86-video-ati 1/2] Bail from dri2_create_buffer2 if we can't get a pixmap

2018-05-18 Thread Michel Dänzer
From: Michel Dänzer We would store the NULL pointer and continue, which would lead to a crash down the road. Bugzilla: https://bugs.freedesktop.org/106293 Signed-off-by: Michel Dänzer --- src/radeon_dri2.c | 40

[PATCH xf86-video-ati 2/2] glamor: Bail CreatePixmap on unsupported pixmap depth

2018-05-18 Thread Michel Dänzer
From: Michel Dänzer Fixes crash in that case. Bugzilla: https://bugs.freedesktop.org/106293 Signed-off-by: Michel Dänzer --- src/radeon_glamor.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c

Re: amd gpu in Xen domu -- NULL dereference in drivers/gpu/drm/drm_pci.c

2018-05-18 Thread Håkon Alstadheim
Den 18. mai 2018 13:18, skrev Håkon Alstadheim: > TL;DR: How to get some canonical work-around for quirks into official > module and/or kernel repo ? Running with gpu passed through to virtual > machine. > > - > I went ahead and switched to amdgpu driver, and it seems the NULL dereference of

amd gpu in Xen domu -- NULL dereference in drivers/gpu/drm/drm_pci.c

2018-05-18 Thread Håkon Alstadheim
TL;DR: How to get some canonical work-around for quirks into official module and/or kernel repo ? Running with gpu passed through to virtual machine. - I'm running this card: 00:06.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Curacao PRO [Radeon R7 370 / R9 270/370

Re: [PATCH] drm/amdgpu: add rcu_barrier after entity fini

2018-05-18 Thread Christian König
Ah! So we have one RCU grace period caused by the scheduler fence and another one from the hardware fence. Thanks for explaining that once more, that was really not obvious from reading the code. But this means we could we also fix it by moving the "dma_fence_put(fence->parent);" from

Re: [PATCH xf86-video-amdgpu 08/13] Set driver-private CRTC's dpms mode on disable

2018-05-18 Thread Michel Dänzer
On 2018-05-17 11:43 PM, Leo Li wrote: > On 2018-05-16 01:09 PM, Michel Dänzer wrote: >> On 2018-05-03 08:31 PM, sunpeng...@amd.com wrote: >>> From: "Leo (Sunpeng) Li" >>> >>> The dpms_mode flag on the driver-private CRTC was not being set when >>> it's DPMS state is set to

[PATCH xf86-video-amdgpu 2/2] Use drmmode_crtc_dpms in drmmode_set_desired_modes

2018-05-18 Thread Michel Dänzer
From: Michel Dänzer Simplifies the latter slightly. Signed-off-by: Michel Dänzer --- src/drmmode_display.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/drmmode_display.c b/src/drmmode_display.c index

[PATCH xf86-video-amdgpu 1/2] Call drmmode_do_crtc_dpms from drmmode_crtc_dpms as well

2018-05-18 Thread Michel Dänzer
From: Michel Dänzer Leo pointed out that drmmode_do_crtc_dpms wasn't getting called when turning off an output with xrandr --output --off This meant that the vblank sequence number and timestamp wouldn't be saved before turning off the CRTC in this case. Reported-by:

Re: [PATCH] drm/amd/amdgpu: Code comments for the amdgpu_ttm.c driver. (v2)

2018-05-18 Thread Tom St Denis
On 05/18/2018 05:52 AM, Christian König wrote: Am 17.05.2018 um 17:34 schrieb Alex Deucher: On Tue, May 15, 2018 at 10:02 AM, Tom St Denis wrote: NFC just comments. (v2):  Updated based on feedback from Alex Deucher. Signed-off-by: Tom St Denis

Re: [PATCH 1/5] drm/amdgpu: fix insert nop for VCN decode ring

2018-05-18 Thread Christian König
Am 17.05.2018 um 20:25 schrieb Alex Deucher: On Thu, May 17, 2018 at 2:24 PM, Leo Liu wrote: On 05/17/2018 02:18 PM, Alex Deucher wrote: On Thu, May 17, 2018 at 2:12 PM, Leo Liu wrote: NO_OP register should be writen to 0 Signed-off-by: Leo Liu

Re: [PATCH 2/2] drm/amdgpu: Take vcn encode rings into account in idle work

2018-05-18 Thread Christian König
Am 17.05.2018 um 20:03 schrieb Alex Deucher: Take the encode rings into account in the idle work handler. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 5 + 1 file changed, 5 insertions(+) diff --git

Re: [PATCH 1/2] Revert "drm/amdgpu/vg20:Restruct uvd.idle_work to support multiple instance (v2)"

2018-05-18 Thread Christian König
Am 17.05.2018 um 19:38 schrieb Alex Deucher: This reverts commit 4f7b8507bb4ba19f994e0d72eedd6029961be402. We don't need separate idle work handles for UVD 7.2. Both instances are driven by the same clock and power. Signed-off-by: Alex Deucher Reviewed-by:

RE: [PATCH] drm/amdgpu: add rcu_barrier after entity fini

2018-05-18 Thread Deng, Emily
Hi Christian, When we free an IB fence, we first call one call_rcu in drm_sched_fence_release_scheduled as the call trace one, then after the call trace one, we call the call_rcu second in the amdgpu_fence_release in call trace two, as below. The kmem_cache_free(amdgpu_fence_slab,

Re: [PATCH] drm/amdgpu: consider user preference when pinning for SG display

2018-05-18 Thread Christian König
Am 17.05.2018 um 18:55 schrieb Alex Deucher: If the pin domain is set to GTT | VRAM, look at the preferred domains for the bo and respect that if it's been set explicitly. Signed-off-by: Alex Deucher Reviewed-by: Christian König ---

Re: [PATCH 1/6] drm/amdgpu: rework VM state machine lock handling v2

2018-05-18 Thread Zhang, Jerry (Junwei)
2, 3, 4, 5 are Reviewed-by: Junwei Zhang Patch 1: could you show the reserving VM? Patch 6: I could read that code, but not sure the purpose. Jerry On 05/17/2018 05:49 PM, Christian König wrote: Only the moved state needs a separate spin lock protection. All other

Re: [PATCH] Remove calls to DAL suspend/resume from amdgpu_device_gpu_recover.

2018-05-18 Thread Christian König
Am 17.05.2018 um 20:41 schrieb Harry Wentland: On 2018-05-17 11:50 AM, Andrey Grodzovsky wrote: First of all it's already being called from the display code from amd_ip_funcs.suspend/resume hooks. Second of all, the place in amdgpu_device_gpu_recover it's being called is wrong for GPU stalls

Re: [PATCH] drm/amd/amdgpu: Code comments for the amdgpu_ttm.c driver. (v2)

2018-05-18 Thread Christian König
Am 17.05.2018 um 17:34 schrieb Alex Deucher: On Tue, May 15, 2018 at 10:02 AM, Tom St Denis wrote: NFC just comments. (v2): Updated based on feedback from Alex Deucher. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher

Re: [PATCH] drm/amdgpu: add rcu_barrier after entity fini

2018-05-18 Thread Christian König
Ok, I'm lost where do we use call_rcu() twice? Cause that sounds incorrect in the first place. Christian. Am 18.05.2018 um 11:41 schrieb Deng, Emily: Ping.. Best Wishes, Emily Deng -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of

RE: [PATCH] drm/amdgpu: add rcu_barrier after entity fini

2018-05-18 Thread Deng, Emily
Ping.. Best Wishes, Emily Deng > -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Deng, Emily > Sent: Friday, May 18, 2018 11:20 AM > To: Koenig, Christian ; amd- > g...@lists.freedesktop.org > Subject: RE:

[PATCH 1/2] drm/amd/pp: Add profiling mode setting on RV

2018-05-18 Thread Rex Zhu
For power saving, default profiling mode was setted to power saving mode. Currently, not support CUSTOM mode and not display detailed profiling mode parameters in sysfs. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c | 42 +++

[PATCH 2/2] drm/amdgpu: Auto switch to video profiling mode on VCN demand

2018-05-18 Thread Rex Zhu
Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c index 3549481..94b221f 100644 ---

Re: [PATCH] drm/amdgpu: consider user preference when pinning for SG display

2018-05-18 Thread Michel Dänzer
On 2018-05-17 06:55 PM, Alex Deucher wrote: > If the pin domain is set to GTT | VRAM, look at the preferred domains > for the bo and respect that if it's been set explicitly. > > Signed-off-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 9

Re: [PATCH xf86-video-amdgpu 00/13] Enabling Color Management - Round 2

2018-05-18 Thread Michel Dänzer
On 2018-05-17 11:43 PM, Leo Li wrote: > On 2018-05-16 01:06 PM, Michel Dänzer wrote: >> On 2018-05-03 08:31 PM, sunpeng...@amd.com wrote: >>> >>> 3. The three color management properties (Degamma LUT, Color >>> Transform Matrix >>>     (CTM), and Gamma LUT) are hard-coded into the DDX driver, to

Re: [PATCH xf86-video-amdgpu 10/13] Push staged color properties when DPMS state toggles On

2018-05-18 Thread Michel Dänzer
On 2018-05-17 11:44 PM, Leo Li wrote: > On 2018-05-16 01:10 PM, Michel Dänzer wrote: >> On 2018-05-03 08:31 PM, sunpeng...@amd.com wrote: >>> From: "Leo (Sunpeng) Li" >>> >>> This will persist color management properties on a CRTC across DPMS >>> state changes. >>> >>>

Re: [PATCH xf86-video-amdgpu 02/13] Push color properties to kernel DRM on CRTC init

2018-05-18 Thread Michel Dänzer
On 2018-05-17 11:43 PM, Leo Li wrote: > On 2018-05-16 01:08 PM, Michel Dänzer wrote: >> On 2018-05-03 08:31 PM, sunpeng...@amd.com wrote: >>> >>> @@ -1458,6 +1586,14 @@ drmmode_crtc_init(ScrnInfoPtr pScrn, >>> drmmode_ptr drmmode, drmModeResPtr mode_res >>>   drmmode_crtc->ctm->matrix[0] =

[PATCH] drm/amd/pp: fix a couple locking issues

2018-05-18 Thread Rex Zhu
We should return unlock on the error path Signed-off-by: Rex Zhu --- .../gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c | 31 +- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c

Re: [PATCH 6/6] drm/amdgpu: move VM BOs on LRU again

2018-05-18 Thread zhoucm1
CPU overhead is increased a bit, but we can optimize it later, the series is Reviewed-by: Chunming Zhou On 2018年05月17日 17:49, Christian König wrote: Move all BOs belonging to a VM on the LRU with every submission. Signed-off-by: Christian König

[PATCH] drm/amd/pp: Fix static checker warning

2018-05-18 Thread Rex Zhu
error: uninitialized symbol '' Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c | 24 +- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 3 ++- drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 6 ++ 3 files