[PATCH] drm/amdgpu: Fix display corruption on CI with dpm enabled

2018-04-26 Thread Rex Zhu
with dpm enabled, need to get active crtcs in dc/no-dc mode. caused by 'commit ebb649667a31 ("drm/amdgpu: Set pm_display_cfg in non-dc mode")' Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 32 1 file changed, 16 insertions(+), 16 deletions(

[PATCH 13/17] drm/radeon: Remove custom dma_fence_ops->wait implementation

2018-04-26 Thread Daniel Vetter
It's a copy of dma_fence_default_wait, written slightly differently. Signed-off-by: Daniel Vetter Cc: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: amd-gfx@lists.freedesktop.org --- drivers/gpu/drm/radeon/radeon_fence.c | 63 --- 1 file changed, 63

[PATCH] drm/amd/pp: Skip fan attributes if fan not present

2018-04-26 Thread Rex Zhu
With powerplay enabled, also need to skip fan attributes if no fan present. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 21 - drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 3 +++ 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/dr

RE: [PATCH] drm/amdgpu/sriov: reject kms open if TDR not finished or failed

2018-04-26 Thread Deng, Emily
Sorry, I don't get your point, when the GPU is doing a reset, even let the dkms open, the userspace will still fail, so during the reset, any driver open kms is meaningless. Best Wishes, Emily Deng > -Original Message- > From: Michel Dänzer [mailto:mic...@daenzer.net] > Sent: Thursday, A

Re: [PATCH 1/2] drm/ttm: Add TTM_PAGE_FLAG_TRANSHUGE

2018-04-26 Thread zhoucm1
On 2018年04月26日 23:06, Michel Dänzer wrote: From: Michel Dänzer When it's set, TTM tries to allocate huge pages if possible. Do you mean original driver doesn't do this? From the code, driver always try huge pages if CONFIG_TRANSPARENT_HUGEPAGE is enabled. Regards, David Zhou Drivers wh

Re: [PATCH 2/3] drm/scheduler: Don't call wait_event_killable for signaled process.

2018-04-26 Thread Andrey Grodzovsky
On 04/26/2018 11:57 AM, Eric W. Biederman wrote: Andrey Grodzovsky writes: On 04/26/2018 08:34 AM, Andrey Grodzovsky wrote: On 04/25/2018 08:01 PM, Eric W. Biederman wrote: Andrey Grodzovsky writes: On 04/25/2018 01:17 PM, Oleg Nesterov wrote: On 04/25, Andrey Grodzovsky wrote: here

Re: [PATCH xf86-video-amdgpu 2/2] Wait for pending flips in drmmode_output_set_tear_free

2018-04-26 Thread Samuel Li
On 2018-04-26 11:58 AM, Michel Dänzer wrote: > From: Michel Dänzer > > This prevents a nested call to drmHandleEvent, which would hang. > > Fixes hangs when disabling TearFree on a CRTC while a DRI3 client is > page flipping. > > Signed-off-by: Michel Dänzer > --- > src/drmmode_display.c |

Re: [PATCH] drm/amd/display: Use kvzalloc for potentially large allocations

2018-04-26 Thread Harry Wentland
On 2018-04-24 11:03 AM, Michel Dänzer wrote: > From: Michel Dänzer > > Allocating up to 32 physically contiguous pages can easily fail (and has > failed for me), and isn't necessary anyway. > > Signed-off-by: Michel Dänzer Reviewed-by: Harry Wentland Harry > --- > .../gpu/drm/amd/display/d

[PATCH umr] Add profiler using scanned wave data arrays.

2018-04-26 Thread Tom St Denis
Signed-off-by: Tom St Denis --- doc/sphinx/source/index.rst| 1 + doc/sphinx/source/profiler.rst | 36 doc/umr.1 | 4 ++ src/app/CMakeLists.txt | 1 + src/app/main.c | 15 - src/app/print_waves.c | 4 +- src/app/

[PATCH xf86-video-amdgpu 1/2] Refactor drmmode_output_set_tear_free helper

2018-04-26 Thread Michel Dänzer
From: Michel Dänzer Preparation for the following fix, no functional change intended. Signed-off-by: Michel Dänzer --- src/drmmode_display.c | 31 +++ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/src/drmmode_display.c b/src/drmmode_display.c index

[PATCH xf86-video-amdgpu 2/2] Wait for pending flips in drmmode_output_set_tear_free

2018-04-26 Thread Michel Dänzer
From: Michel Dänzer This prevents a nested call to drmHandleEvent, which would hang. Fixes hangs when disabling TearFree on a CRTC while a DRI3 client is page flipping. Signed-off-by: Michel Dänzer --- src/drmmode_display.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/drmm

[PATCH 1/2] drm/ttm: Add TTM_PAGE_FLAG_TRANSHUGE

2018-04-26 Thread Michel Dänzer
From: Michel Dänzer When it's set, TTM tries to allocate huge pages if possible. Drivers which can take advantage of huge pages should set it. Drivers not setting this flag no longer incur any overhead related to allocating or freeing huge pages. Cc: sta...@vger.kernel.org Signed-off-by: Michel

[PATCH 2/2] drm/ttm: Use GFP_TRANSHUGE_LIGHT for allocating huge pages

2018-04-26 Thread Michel Dänzer
From: Michel Dänzer GFP_TRANSHUGE tries very hard to allocate huge pages, which can result in long delays with high memory pressure. I have observed firefox freezing for up to around a minute due to this while restic was taking a full system backup. Since we don't really need huge pages, use GFP

Re: [Intel-gfx] [PATCH] drm/core: Remove drm_dev_unref() and it's uses

2018-04-26 Thread Alexandre Belloni
Hi, On 26/04/2018 15:45:44+0300, Laurent Pinchart wrote: > Hi Daniel, > > On Thursday, 26 April 2018 15:36:15 EEST Daniel Vetter wrote: > > On Thu, Apr 26, 2018 at 03:58:19PM +0530, Vaishali Thakkar wrote: > > > It's been a while since we introduced drm_dev{get/put} functions > > > to replace ref

Re: [Intel-gfx] [PATCH] drm/core: Remove drm_dev_unref() and it's uses

2018-04-26 Thread Daniel Vetter
On Thu, Apr 26, 2018 at 3:14 PM, Alexandre Belloni wrote: > Hi, > > On 26/04/2018 15:45:44+0300, Laurent Pinchart wrote: >> Hi Daniel, >> >> On Thursday, 26 April 2018 15:36:15 EEST Daniel Vetter wrote: >> > On Thu, Apr 26, 2018 at 03:58:19PM +0530, Vaishali Thakkar wrote: >> > > It's been a while

Re: [Intel-gfx] [PATCH] drm/core: Remove drm_dev_unref() and it's uses

2018-04-26 Thread Vaishali Thakkar
On Thu, Apr 26, 2018 at 6:15 PM, Laurent Pinchart wrote: > Hi Daniel, > > On Thursday, 26 April 2018 15:36:15 EEST Daniel Vetter wrote: >> On Thu, Apr 26, 2018 at 03:58:19PM +0530, Vaishali Thakkar wrote: >> > It's been a while since we introduced drm_dev{get/put} functions >> > to replace referen

Re: [PATCH 2/3] drm/scheduler: Don't call wait_event_killable for signaled process.

2018-04-26 Thread Andrey Grodzovsky
On 04/26/2018 08:34 AM, Andrey Grodzovsky wrote: On 04/25/2018 08:01 PM, Eric W. Biederman wrote: Andrey Grodzovsky writes: On 04/25/2018 01:17 PM, Oleg Nesterov wrote: On 04/25, Andrey Grodzovsky wrote: here (drm_sched_entity_fini) is also a bad idea, but we still want to be able to e

Re: noveau vs arm dma ops

2018-04-26 Thread Christoph Hellwig
On Wed, Apr 25, 2018 at 11:35:13PM +0200, Daniel Vetter wrote: > > get_required_mask() is supposed to tell you if you are safe. However > > we are missing lots of implementations of it for iommus so you might get > > some false negatives, improvements welcome. It's been on my list of > > things t

Re: [PATCH] drm/amdgpu/uvd7: add emit_reg_write_reg_wait ring callback

2018-04-26 Thread Alex Deucher
On Thu, Apr 26, 2018 at 7:12 AM, Xiaojie Yuan wrote: > Fix the NULL pointer dereference while running amdgpu_test: > > [ 54.972246] BUG: unable to handle kernel NULL pointer dereference at > > [ 54.972265] IP: (null) > [ 54.972273] PGD 0 P4D 0 > [ 54.972280] Oop

Re: noveau vs arm dma ops

2018-04-26 Thread Christoph Hellwig
On Wed, Apr 25, 2018 at 11:54:43PM +0100, Russell King - ARM Linux wrote: > > if the memory was previously dirty (iow, CPU has written), you need to > flush the dirty cache lines _before_ the GPU writes happen, but you > don't know whether the CPU has speculatively prefetched, so you need > to flu

Re: noveau vs arm dma ops

2018-04-26 Thread Russell King - ARM Linux
(While there's a rain shower...) On Thu, Apr 26, 2018 at 02:09:42AM -0700, Christoph Hellwig wrote: > synopsis: > > drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c:pdevinfo.dma_mask > = DMA_BIT_MASK(32); > drivers/gpu/drm/bridge/synopsys/dw-hdmi.c: pdevinfo.dma_mask =

Re: [Linaro-mm-sig] noveau vs arm dma ops

2018-04-26 Thread Christoph Hellwig
On Thu, Apr 26, 2018 at 11:20:44AM +0200, Daniel Vetter wrote: > The above is already what we're implementing in i915, at least > conceptually (it all boils down to clflush instructions because those > both invalidate and flush). The clwb instruction that just writes back dirty cache lines might b

Re: [Intel-gfx] [PATCH] drm/core: Remove drm_dev_unref() and it's uses

2018-04-26 Thread Laurent Pinchart
Hi Daniel, On Thursday, 26 April 2018 15:36:15 EEST Daniel Vetter wrote: > On Thu, Apr 26, 2018 at 03:58:19PM +0530, Vaishali Thakkar wrote: > > It's been a while since we introduced drm_dev{get/put} functions > > to replace reference/unreference in drm subsystem for the > > consistency purpose. S

Re: [Intel-gfx] [PATCH] drm/core: Remove drm_dev_unref() and it's uses

2018-04-26 Thread Daniel Vetter
On Thu, Apr 26, 2018 at 03:58:19PM +0530, Vaishali Thakkar wrote: > It's been a while since we introduced drm_dev{get/put} functions > to replace reference/unreference in drm subsystem for the > consistency purpose. So, with this patch, let's just replace > all current use cases of drm_dev_unref()

Re: [PATCH 2/3] drm/scheduler: Don't call wait_event_killable for signaled process.

2018-04-26 Thread Andrey Grodzovsky
On 04/25/2018 08:01 PM, Eric W. Biederman wrote: Andrey Grodzovsky writes: On 04/25/2018 01:17 PM, Oleg Nesterov wrote: On 04/25, Andrey Grodzovsky wrote: here (drm_sched_entity_fini) is also a bad idea, but we still want to be able to exit immediately and not wait for GPU jobs completion

Re: [PATCH 3/3] drm/amdgpu: Switch to interrupted wait to recover from ring hang.

2018-04-26 Thread Andrey Grodzovsky
On 04/25/2018 04:55 PM, Eric W. Biederman wrote: Andrey Grodzovsky writes: On 04/24/2018 12:30 PM, Eric W. Biederman wrote: "Panariti, David" writes: Andrey Grodzovsky writes: Kind of dma_fence_wait_killable, except that we don't have such API (maybe worth adding ?) Depends on how man

Re: [PATCH] drm/core: Remove drm_dev_unref() and it's uses

2018-04-26 Thread Boris Brezillon
On Thu, 26 Apr 2018 15:58:19 +0530 Vaishali Thakkar wrote: > It's been a while since we introduced drm_dev{get/put} functions > to replace reference/unreference in drm subsystem for the > consistency purpose. So, with this patch, let's just replace > all current use cases of drm_dev_unref() with

Re: [PATCH] drm/core: Remove drm_dev_unref() and it's uses

2018-04-26 Thread Thierry Reding
On Thu, Apr 26, 2018 at 03:58:19PM +0530, Vaishali Thakkar wrote: > It's been a while since we introduced drm_dev{get/put} functions > to replace reference/unreference in drm subsystem for the > consistency purpose. So, with this patch, let's just replace > all current use cases of drm_dev_unref()

[PATCH] drm/amdgpu/uvd7: add emit_reg_write_reg_wait ring callback

2018-04-26 Thread Xiaojie Yuan
Fix the NULL pointer dereference while running amdgpu_test: [ 54.972246] BUG: unable to handle kernel NULL pointer dereference at [ 54.972265] IP: (null) [ 54.972273] PGD 0 P4D 0 [ 54.972280] Oops: 0010 [#1] SMP PTI [ 54.972288] Modules linked in: amdkfd amd_i

Re: [PATCH] drm/core: Remove drm_dev_unref() and it's uses

2018-04-26 Thread Laurent Pinchart
Hi Vaishali, Thank you for the patch. On Thursday, 26 April 2018 13:28:19 EEST Vaishali Thakkar wrote: > It's been a while since we introduced drm_dev{get/put} functions > to replace reference/unreference in drm subsystem for the > consistency purpose. So, with this patch, let's just replace > al

[PATCH] drm/core: Remove drm_dev_unref() and it's uses

2018-04-26 Thread Vaishali Thakkar
It's been a while since we introduced drm_dev{get/put} functions to replace reference/unreference in drm subsystem for the consistency purpose. So, with this patch, let's just replace all current use cases of drm_dev_unref() with drm_dev_put and remove the function itself. Coccinelle was used for

Re: noveau vs arm dma ops

2018-04-26 Thread Daniel Vetter
On Thu, Apr 26, 2018 at 11:09 AM, Christoph Hellwig wrote: > On Wed, Apr 25, 2018 at 11:35:13PM +0200, Daniel Vetter wrote: >> > get_required_mask() is supposed to tell you if you are safe. However >> > we are missing lots of implementations of it for iommus so you might get >> > some false negat

Re: [Linaro-mm-sig] noveau vs arm dma ops

2018-04-26 Thread Daniel Vetter
On Thu, Apr 26, 2018 at 11:24 AM, Christoph Hellwig wrote: > On Thu, Apr 26, 2018 at 11:20:44AM +0200, Daniel Vetter wrote: >> The above is already what we're implementing in i915, at least >> conceptually (it all boils down to clflush instructions because those >> both invalidate and flush). > >

Re: [Linaro-mm-sig] noveau vs arm dma ops

2018-04-26 Thread Daniel Vetter
On Thu, Apr 26, 2018 at 12:54 AM, Russell King - ARM Linux wrote: > On Wed, Apr 25, 2018 at 08:33:12AM -0700, Christoph Hellwig wrote: >> On Wed, Apr 25, 2018 at 12:04:29PM +0200, Daniel Vetter wrote: >> > - dma api hides the cache flushing requirements from us. GPUs love >> > non-snooped access

Re: noveau vs arm dma ops

2018-04-26 Thread Daniel Vetter
On Thu, Apr 26, 2018 at 1:26 AM, Russell King - ARM Linux wrote: > On Wed, Apr 25, 2018 at 11:35:13PM +0200, Daniel Vetter wrote: >> On arm that doesn't work. The iommu api seems like a good fit, except >> the dma-api tends to get in the way a bit (drm/msm apparently has >> similar problems like t

Re: [PATCH] drm/amdgpu/sriov: reject kms open if TDR not finished or failed

2018-04-26 Thread Michel Dänzer
On 2018-04-26 09:57 AM, Deng, Emily wrote: This seems like a bad idea, as it would cause basically any userspace which wants to use the GPU to fail to start during a GPU reset. >>> [Emily] Yes, this is what the change want to do, when driver is >>> doing gpu recover or hardware is do

RE: [PATCH] drm/amdgpu/sriov: reject kms open if TDR not finished or failed

2018-04-26 Thread Deng, Emily
This seems like a bad idea, as it would cause basically any userspace which wants to use the GPU to fail to start during a GPU reset. [Emily] Yes, this is what the change want to do, when driver is doing gpu recover or hardware is doing reset, it doesn't want to be interrupted, and during the rese

RE: [PATCH] drm/amdgpu/sriov: reject kms open if TDR not finished or failed

2018-04-26 Thread Liu, Monk
Reviewed-by: Monk -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Emily Deng Sent: 2018年4月25日 14:40 To: amd-gfx@lists.freedesktop.org Cc: Deng, Emily ; Liu, Monk Subject: [PATCH] drm/amdgpu/sriov: reject kms open if TDR not finished or failed

RE: [PATCH] drm/amdgpu: For sriov reset, move IB test into exclusive mode

2018-04-26 Thread Liu, Monk
Reviewed-by: Monk Liu -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Emily Deng Sent: 2018年4月26日 12:07 To: amd-gfx@lists.freedesktop.org Cc: Deng, Emily Subject: [PATCH] drm/amdgpu: For sriov reset, move IB test into exclusive mode When put

RE: drm/amdgpu/sriov: Need to set in_gpu_reset flag to back after gpu reset

2018-04-26 Thread Liu, Monk
Reviewed-by: Monk -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Deng, Emily Sent: 2018年4月26日 10:07 To: Deng, Emily ; amd-gfx@lists.freedesktop.org Subject: drm/amdgpu/sriov: Need to set in_gpu_reset flag to back after gpu reset Ping... > --

Re: [PATCH] drm/amdgpu/sriov: reject kms open if TDR not finished or failed

2018-04-26 Thread Michel Dänzer
On 2018-04-26 04:03 AM, Deng, Emily wrote: > Hi Michel, >> This seems like a bad idea, as it would cause basically any >> userspace which wants to use the GPU to fail to start during a GPU >> reset. > [Emily] Yes, this is what the change want to do, when driver is doing > gpu recover or hardware is