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,

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

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

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

[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

[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

[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

[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:

[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

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

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

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

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

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

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

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

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

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.

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

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

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

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

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 >

[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

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

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

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 >>

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

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

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

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

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

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

Re: [PATCH 1/5] dma-buf: use parameter structure for dma_buf_attach

2018-04-26 Thread kbuild test robot
Hi Christian, I love your patch! Yet something to improve: [auto build test ERROR on drm/drm-next] [also build test ERROR on v4.17-rc2 next-20180424] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

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

2018-04-26 Thread Deng, Emily
Hi all, Please help review this. Best Wishes, Emily Deng > -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of > Emily Deng > Sent: Thursday, April 26, 2018 12:07 PM > To: amd-gfx@lists.freedesktop.org > Cc: Deng, Emily