Re: [PATCH] drm/amdgpu/virtual_dce: Virtual display doesn't support disable vblank immediately

2017-08-18 Thread Michel Dänzer
On 18/08/17 02:48 PM, Emily Deng wrote: > For virtual display, it uses software timer to emulate the vsync interrupt, > it doesn't have high precision, so doesn't support disable vblank immediately. > > BUG: SWDEV-129274 > > Signed-off-by: Emily Deng > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ir

Re: [PATCH] drm/amdgpu: fix a bogus warning

2017-08-18 Thread Christian König
Reviewed-by: Christian König Am 17.08.2017 um 23:03 schrieb Xie, AlexBin: Reviewed-by: Alex Xie *From:* amd-gfx on behalf of Alex Deucher *Sent:* Thursday, August 17, 2017 4:44 PM *To:* amd-gfx@lists.freedesktop.o

Re: [PATCH] drm/atomic: put commit when -ERESTARTSYS received

2017-08-18 Thread Daniel Vetter
On Thu, Aug 17, 2017 at 10:21:18AM -0400, Jerry Zuo wrote: > During page flip atomic_check and atomic_commit can return > -ERESTARTSYS to restart the ioctl. When this happens we fail to > put the commit object leading to a memory leak. > > v2: Changed subject tag to drm/atomic > > Signed-off-by:

[PATCH] drm/ttm: use reservation_object_trylock in ttm_bo_individualize_resv

2017-08-18 Thread Christian König
From: Christian König Fixes a false positive from might_sleep(). The reservation object is freshly initialized, so nobody else can hold the mutex but the function is called from atomic context. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 2 +- 1 file changed, 1 insertion(

Re: [PATCH 1/2] drm/ttm: Add DMA map/unmap tracepoint

2017-08-18 Thread Christian König
Am 17.08.2017 um 14:29 schrieb Tom St Denis: Also exports two functions that vendor drivers can call to trace DMA mappings. This is meant to help translate IOMMU mappings of bus addresses back to physical pages. Used by the umr amdgpu debugger for instance. Signed-off-by: Tom St Denis --- d

[PATCH xf86-video-amdgpu 03/10] Create drmmode_wait_vblank helper

2017-08-18 Thread Michel Dänzer
From: Michel Dänzer Allows cleaning up the code considerably. (Ported from radeon commit 99f1d7a474af3683fe1a66f50c0bb8935478ff0a) Signed-off-by: Michel Dänzer --- src/amdgpu_dri2.c | 97 +++ src/amdgpu_drv.h | 2 -- src/amdgpu_kms.c

[PATCH xf86-video-amdgpu 02/10] Pass reference CRTC to amdgpu_do_pageflip directly

2017-08-18 Thread Michel Dänzer
From: Michel Dänzer Simplifies the code slightly. (Ported from radeon commit 49cc61ab970ee28d4509b4e2dd0a57165136889f) Signed-off-by: Michel Dänzer --- src/amdgpu_dri2.c | 4 +--- src/amdgpu_present.c | 6 ++ src/drmmode_display.c | 11 +++ src/drmmode_display.h | 2 +- 4

[PATCH xf86-video-amdgpu 01/10] Remove drmmode_crtc->scanout_destroy[] array

2017-08-18 Thread Michel Dänzer
From: Michel Dänzer No longer necessary since we're reference counting framebuffers. (Ported from radeon commit 3f120fa1d5d921656a367751bc079e020e9ab105) Signed-off-by: Michel Dänzer --- src/drmmode_display.c | 22 -- src/drmmode_display.h | 1 - 2 files changed, 4 insert

[PATCH xf86-video-amdgpu 05/10] Wait for pending flips synchronously before turning off a CRTC

2017-08-18 Thread Michel Dänzer
From: Michel Dänzer Allows removing drmmode_clear_pending_flip and the pending_dpms_mode field and cleaning up the code considerably. (Ported from radeon commit e6d7dc2070f4d21a6900916bb70a31839112882c) Signed-off-by: Michel Dänzer --- src/amdgpu_kms.c | 12 ++- src/amdgpu_presen

[PATCH xf86-video-amdgpu 08/10] Pass extents to amdgpu_scanout_do_update

2017-08-18 Thread Michel Dänzer
From: Michel Dänzer Preparation for following change, no functional change intended yet. (Ported from radeon commit 65e0c5ea1b4adff21d673dbf54af99704c429627) Signed-off-by: Michel Dänzer --- src/amdgpu_drv.h | 2 +- src/amdgpu_kms.c | 41 + s

[PATCH xf86-video-amdgpu 06/10] Handle multiple "pending" Present flips

2017-08-18 Thread Michel Dänzer
From: Michel Dänzer The xserver Present code can submit a flip in response to notifying it that a vblank event arrived. This can happen before the completion event of the previous flip is processed. In that case, we were clearing the drmmode_crtc->flip_pending field prematurely. Prevent this by

[PATCH xf86-video-amdgpu 09/10] Always allow Present page flipping with TearFree

2017-08-18 Thread Michel Dänzer
From: Michel Dänzer Even if TearFree is active for the the CRTC we're synchronizing to. In that case, for Present flips synchronized to vertical blank, the other scanout buffer is immediately synchronized and flipped to during the target vertical blank period. For Present flips not synchronized t

[PATCH xf86-video-amdgpu 10/10] Always allow DRI2 page flipping with TearFree

2017-08-18 Thread Michel Dänzer
From: Michel Dänzer Even if TearFree is enabled for the CRTC we're synchronizing to. (Ported from radeon commit d314cbfb228bb4b8762714f98d0c114a8ee3f061) Signed-off-by: Michel Dänzer --- man/amdgpu.man| 6 ++ src/amdgpu_dri2.c | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-)

[PATCH xf86-video-amdgpu 04/10] Create drmmode_crtc_wait_pending_event helper macro

2017-08-18 Thread Michel Dänzer
From: Michel Dänzer Preparation for following change, no functional change intended yet. (Ported from radeon commit f87acdbfb1b0b6d2769764772a52ea8b81675e20) Signed-off-by: Michel Dänzer --- src/drmmode_display.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --gi

[PATCH xf86-video-amdgpu 07/10] Add source drawable parameter to amdgpu_scanout_do_update

2017-08-18 Thread Michel Dänzer
From: Michel Dänzer Preparation for following changes, no functional change intended yet. (Ported from radeon commit 1443270e52e8562bd8dc3603f301963bd4027cef) Signed-off-by: Michel Dänzer --- src/amdgpu_drv.h | 3 ++- src/amdgpu_kms.c | 18 +- src/drmmode_display.c

[PATCH xf86-video-amdgpu 2/3] Use xorg_list_append for the DRM event list

2017-08-18 Thread Michel Dänzer
From: Michel Dänzer We were adding entries at the start of the list, i.e. the list was ordered from most recently added to least recently added. However, the corresponding DRM events are generally expected to arrive in the same order as they are queued, which means that amdgpu_drm_queue_alloc wou

[PATCH xf86-video-amdgpu 3/3] Make amdgpu_scanout_do_update take a PixmapPtr instead of a DrawablePtr

2017-08-18 Thread Michel Dänzer
From: Michel Dänzer All callers were already passing in a pixmap. This allows simplifying the rotated scanout case slightly. (Ported from radeon commit d822a0f47070374ad0c1a97b559bae27724dc52a) Signed-off-by: Michel Dänzer --- src/amdgpu_drv.h | 2 +- src/amdgpu_kms.c | 13 ++-

[PATCH xf86-video-amdgpu 1/3] Consolidate amdgpu_scanout_flip_abort/handler helpers

2017-08-18 Thread Michel Dänzer
From: Michel Dänzer While at it, make them use crtc->driver_private. (Ported from radeon commit 36ce7920136c0d723c9397a84e7dd5926a9c7943) Signed-off-by: Michel Dänzer --- src/amdgpu_kms.c | 85 1 file changed, 36 insertions(+), 49 delet

[PATCH 1/2] drm/ttm: Add DMA map/unmap tracepoint (v2)

2017-08-18 Thread Tom St Denis
Also exports two functions that vendor drivers can call to trace DMA mappings. This is meant to help translate IOMMU mappings of bus addresses back to physical pages. Used by the umr amdgpu debugger for instance. Signed-off-by: Tom St Denis (v2): Use dev_name() to get PCI path instead. --- dr

[PATCH 2/2] drm/amd/amdgpu: Remove AMDGPU tracepoint and use new TTM tracepoint (v2)

2017-08-18 Thread Tom St Denis
Switches the AMDGPU driver over to the TTM tracepoint and removes our old one. Now you can enable traces before loading the module and trace all mappings. Signed-off-by: Tom St Denis (v2): Use struct device instead of pci in trace. --- drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 56 ---

[PATCH umr] Switch over to TTM trace point from AMDGPU tracepoint

2017-08-18 Thread Tom St Denis
Signed-off-by: Tom St Denis --- src/lib/read_vram.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/lib/read_vram.c b/src/lib/read_vram.c index 7516484bb4af..f38748c1b94d 100644 --- a/src/lib/read_vram.c +++ b/src/lib/read_vram.c @@ -104,20 +104,20 @

Re: [PATCH 1/2] drm/ttm: Add DMA map/unmap tracepoint (v2)

2017-08-18 Thread Christian König
Am 18.08.2017 um 14:54 schrieb Tom St Denis: Also exports two functions that vendor drivers can call to trace DMA mappings. This is meant to help translate IOMMU mappings of bus addresses back to physical pages. Used by the umr amdgpu debugger for instance. Sorry to have even more notes on th

[PATCH] drm/ttm: use reservation_object_trylock in ttm_bo_individualize_resv v2

2017-08-18 Thread Christian König
From: Christian König Fixes a false positive from might_sleep(). The reservation object is freshly initialized, so nobody else can hold the mutex but the function is called from atomic context. v2: Correctly invert the check as well. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_

[PATCH] drm/ttm: Add DMA map/unmap tracepoint (v3)

2017-08-18 Thread Tom St Denis
Also exports two functions that vendor drivers can call to trace DMA mappings. This is meant to help translate IOMMU mappings of bus addresses back to physical pages. Used by the umr amdgpu debugger for instance. Signed-off-by: Tom St Denis (v2): Use dev_name() to get PCI path instead. (v3): U

Re: [PATCH] drm/ttm: Add DMA map/unmap tracepoint (v3)

2017-08-18 Thread Christian König
Am 18.08.2017 um 15:22 schrieb Tom St Denis: Also exports two functions that vendor drivers can call to trace DMA mappings. This is meant to help translate IOMMU mappings of bus addresses back to physical pages. Used by the umr amdgpu debugger for instance. Signed-off-by: Tom St Denis Revie

[PATCH 2/2] drm/amd/amdgpu: Remove AMDGPU tracepoint and use new TTM tracepoint (v2)

2017-08-18 Thread Tom St Denis
Switches the AMDGPU driver over to the TTM tracepoint and removes our old one. Now you can enable traces before loading the module and trace all mappings. Signed-off-by: Tom St Denis Reviewed-by: Christian König (v2): Use struct device instead of pci in trace. --- drivers/gpu/drm/amd/amdgpu/a

[PATCH 1/2] drm/ttm: Add DMA map/unmap tracepoint (v3)

2017-08-18 Thread Tom St Denis
Also exports two functions that vendor drivers can call to trace DMA mappings. This is meant to help translate IOMMU mappings of bus addresses back to physical pages. Used by the umr amdgpu debugger for instance. Signed-off-by: Tom St Denis Reviewed-by: Christian König (v2): Use dev_name() to

[PATCH 1/2] drm/amd/amdgpu: Use new TTM populate/map helper function

2017-08-18 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 33 ++--- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 38d26a7d5d0d..3b9921dfcb18 100644

[PATCH] drm/ttm: Add helper functions to populate/map in one call

2017-08-18 Thread Tom St Denis
These functions replace a section of common code found in radeon/amdgpu drivers (and possibly others) as part of the ttm_tt_*populate() callbacks. Signed-off-by: Tom St Denis --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 41 include/drm/ttm/ttm_page_alloc.h

[PATCH 2/2] drm/radeon: use new TTM populate/dma map helper functions

2017-08-18 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/radeon/radeon_ttm.c | 33 ++--- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c index 616f0711f202..9489d750e656 100644 --- a/drive

RE: [PATCH xf86-video-ati] modesetting: re-set the crtc's mode when link-status goes BAD

2017-08-18 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Michel Dänzer > Sent: Friday, August 18, 2017 1:54 AM > To: amd-gfx@lists.freedesktop.org > Subject: [PATCH xf86-video-ati] modesetting: re-set the crtc's mode when > link-status goes BAD > >

RE: [PATCH xf86-video-amdgpu 10/10] Always allow DRI2 page flipping with TearFree

2017-08-18 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Michel Dänzer > Sent: Friday, August 18, 2017 4:53 AM > To: amd-gfx@lists.freedesktop.org > Subject: [PATCH xf86-video-amdgpu 10/10] Always allow DRI2 page flipping > with TearFree > > From:

RE: [PATCH xf86-video-amdgpu 3/3] Make amdgpu_scanout_do_update take a PixmapPtr instead of a DrawablePtr

2017-08-18 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Michel Dänzer > Sent: Friday, August 18, 2017 4:55 AM > To: amd-gfx@lists.freedesktop.org > Subject: [PATCH xf86-video-amdgpu 3/3] Make > amdgpu_scanout_do_update take a PixmapPtr instead of a

RE: [PATCH] drm/ttm: use reservation_object_trylock in ttm_bo_individualize_resv v2

2017-08-18 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Christian König > Sent: Friday, August 18, 2017 9:32 AM > To: dri-de...@lists.freedesktop.org; amd-gfx@lists.freedesktop.org > Subject: [PATCH] drm/ttm: use reservation_object_trylock in > ttm

Re: [PATCH xf86-video-amdgpu 04/10] Create drmmode_crtc_wait_pending_event helper macro

2017-08-18 Thread Abramov, Slava
One comment inline From: amd-gfx on behalf of Michel Dänzer Sent: Friday, August 18, 2017 4:53 AM To: amd-gfx@lists.freedesktop.org Subject: [PATCH xf86-video-amdgpu 04/10] Create drmmode_crtc_wait_pending_event helper macro From: Michel Dänzer Preparation

[PATCH] drm/amdgpu: Fix huge page updates with CPU

2017-08-18 Thread Felix Kuehling
Correctly detect system memory mappings when using CPU and don't use huge pages for them. Avoid incorrectly translating a physical page table GPU address when splitting a huge page while mapping system memory. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 16 +++

Re: [PATCH] drm/amdgpu: Fix huge page updates with CPU

2017-08-18 Thread Christian König
Am 18.08.2017 um 17:18 schrieb Felix Kuehling: Correctly detect system memory mappings when using CPU and don't use huge pages for them. Avoid incorrectly translating a physical page table GPU address when splitting a huge page while mapping system memory. Signed-off-by: Felix Kuehling Revie

[PATCH] drm/amdgpu: fix and cleanup shadow handling

2017-08-18 Thread Christian König
From: Christian König Set the shadow flag on the shadow and not the parent, always bind shadow BOs during allocation instead of manually, use the reservation_object wrappers to grab the lock. This fixes a couple of issues with binding the shadow BOs as well as correctly evicting them when memory

Re: [PATCH 21/24] drm/amdgpu: Add kgd/kfd interface to support scratch memory v2

2017-08-18 Thread Oded Gabbay
On Wed, Aug 16, 2017 at 6:00 AM, Felix Kuehling wrote: > > From: Moses Reuben > > v2: > * Shortened headline > * Removed write_config_static_mem, it gets initialized by gfx_v?_0_gpu_init > * Renamed alloc_memory_of_scratch to set_scratch_backing_va > * Made set_scratch_backing_va a void function

Re: [PATCH 22/24] drm/amdkfd: Adding new IOCTL for scratch memory v2

2017-08-18 Thread Oded Gabbay
On Wed, Aug 16, 2017 at 6:00 AM, Felix Kuehling wrote: > From: Moses Reuben > > v2: > * Renamed ALLOC_MEMORY_OF_SCRATCH to SET_SCRATCH_BACKING_VA > * Removed size parameter from the ioctl, it was unused > * Removed hole in ioctl number space > * No more call to write_config_static_mem > * Return

[pull] radeon and amdgpu drm-next-4.14

2017-08-18 Thread Alex Deucher
Hi Dave, More changes for 4.14. Highlights: - command submission overhead improvements - Huge page support for vega10 - physical mode support for mjpeg for asics that don't support UVD vm - improve ttm_mem_type_manager_func debug - misc ttm fixes, cleanups - misc gpuvm cleanups The following cha

Re: [PATCH 06/24] drm/amdkfd: Clean up KFD style errors and warnings v2

2017-08-18 Thread Oded Gabbay
On Wed, Aug 16, 2017 at 6:00 AM, Felix Kuehling wrote: > From: Kent Russell > > Using checkpatch.pl -f showed a number of style issues. This > patch addresses as many of them as possible. Some long lines have been > left for readability, but attempts to minimize them have been made. > > v2: Brok

[PATCH 3/6 v3] ASoC: AMD: disabling memory gating in stoney platform

2017-08-18 Thread Alex Deucher
From: Vijendar Mukunda For Stoney platform, Memory gating is disabled.i.e SRAM Banks won't be turned off. By Default, SRAM Bank state set to ON. Added condition checks to skip SRAM Bank state set logic for Stoney platform. Reviewed-by: Alex Deucher Signed-off-by: Vijendar Mukunda Signed-off-by

[PATCH 1/6 v3] drm/amd/amdgpu: Added asic_type as ACP DMA driver platform data

2017-08-18 Thread Alex Deucher
From: Vijendar Mukunda asic_type information is passed to ACP DMA Driver as platform data. Reviewed-by: Alex Deucher Signed-off-by: Vijendar Mukunda Signed-off-by: Alex Deucher --- v2: Removed asic_type local variable and directly passing asic_type instance to ACP DMA driver as platform data

[PATCH 5/6 v3] ASoC: AMD: Audio buffer related changes for Stoney

2017-08-18 Thread Alex Deucher
From: Vijendar Mukunda Stoney uses 16kb SRAM memory for playback and 16Kb for capture.Modified Max buffer size to have the correct mapping between System Memory and SRAM. Added snd_pcm_hardware structures for playback and capture for Stoney. Reviewed-by: Alex Deucher Signed-off-by: Vijendar Mu

[PATCH 6/6 v3] ASoC: AMD: Add machine driver for cz rt5650

2017-08-18 Thread Alex Deucher
From: Akshu Agrawal The driver is used for AMD board using rt5650 codec. Reviewed-by: Alex Deucher Signed-off-by: Akshu Agrawal Signed-off-by: Alex Deucher --- v2: Change ACPI ID to AMDI1002 v3: add R-b, resend sound/soc/amd/Kconfig | 7 ++ sound/soc/amd/Makefile | 2 + sound/

[PATCH 0/6 v3] Add ASoC support for AMD Stoney APUs

2017-08-18 Thread Alex Deucher
This patch set updates the AMD GPU and Audio CoProcessor (ACP) audio drivers and the designware i2s driver for Stoney (ST). ST is an APU similar to Carrizo (CZ) which already has ACP audio support. The i2s controller and ACP audio DMA engine are part of the GPU and both need updating so I would li

[PATCH 4/6 v2] ASoC: AMD: DMA driver changes for Stoney Platform

2017-08-18 Thread Alex Deucher
From: Vijendar Mukunda Added DMA driver changes for Stoney platform. Below are the key differences between Stoney and CZ In Stoney, Memory Gating is disabled.SRAM Banks won't be turned off.No Of SRAM Banks reduced to 6. DAGB Garlic Interface used and 16 bit resolution is supported. SRAM bank 1 &

[PATCH 2/6 v2] drm/amdgpu Moving amdgpu asic types to a separate file

2017-08-18 Thread Alex Deucher
From: Akshu Agrawal Amdgpu asic types will be required for other drivers too. Hence, its better to keep it in a separate include file. Reviewed-by: Alex Deucher Signed-off-by: Akshu Agrawal Signed-off-by: Alex Deucher --- v1: New patch to share asic_type definitions between GPU and audio dri

Re: [PATCH] drm/ttm: Add DMA map/unmap tracepoint (v3)

2017-08-18 Thread Tom St Denis
Hi Christian, Should I wait for comments on dri-devel or can I push the TTM trace patches to our stg-4.12 already? Cheers, Tom On 18/08/17 09:45 AM, Christian König wrote: Am 18.08.2017 um 15:22 schrieb Tom St Denis: Also exports two functions that vendor drivers can call to trace DMA mappi

[PATCH 1/3] drm/amdgpu/gfx8: fix spelling typo in mqd allocation

2017-08-18 Thread Alex Deucher
Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c| 12 ++-- drivers/gpu/drm/amd/include/vi_structs.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c index 0710b

[PATCH 3/3] drm/amdgpu/gfx9: adjust mqd allocation size

2017-08-18 Thread Alex Deucher
to allocate additional space for the dynamic cu masks. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c| 25 ++--- drivers/gpu/drm/amd/include/v9_structs.h | 8 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/

[PATCH 2/3] drm/amdgpu/gfx9: update mqd to include dynamic CU mask

2017-08-18 Thread Alex Deucher
Necessary for proper operation with KIQ. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/include/v9_structs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/include/v9_structs.h b/drivers/gpu/drm/amd/include/v9_structs.h index 9a9e6c7..56d79db 10