Re: [PATCH 1/1] drm/amdgpu: Use list_del_init in amdgpu_mn_unregister

2017-08-01 Thread Felix Kuehling
Hi Christian, Please apply this patch if you think this is the correct solution. This is currently blocking the amd-kfd-staging merge from amd-staging-4.11. Kent will try another merge tomorrow morning our time. I'm quite sure this also breaks userptrs in the graphics driver. Thanks, Felix

[PATCH 1/1] drm/amdgpu: Use list_del_init in amdgpu_mn_unregister

2017-08-01 Thread Felix Kuehling
Otherwise bo->shadow_list (which is aliased by bo->mn_list) will not appear empty in amdgpu_ttm_bo_destroy and cause an oops when freeing former userptr BOs. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 2 +- 1 file changed, 1 insertion(+),

Re: vega firmware failing to load

2017-08-01 Thread Huang Rui
On Wed, Aug 02, 2017 at 10:07:01AM +1000, Dave Airlie wrote: > Running amd-staging-4.11 at 0ae168080db88fa3a2ec84741a7293a25e4ecb42 > on > VEGA10 0x1002:0x687F pciid > > with firmware from > https://people.freedesktop.org/~agd5f/radeon_ucode/vega10/ > > PSP firmware loading fails. > > Dave. >

Re: [PATCH] Add drm ioctl DRM_IOCTL_MODE_GETFB2 & associated helpers.

2017-08-01 Thread Joe Kniss
On Tue, Aug 1, 2017 at 1:46 PM, Laurent Pinchart < laurent.pinch...@ideasonboard.com> wrote: > Hi Joe, > > On Tuesday 01 Aug 2017 10:24:25 Joe Kniss wrote: > > On Tue, Aug 1, 2017 at 5:09 AM, Laurent Pinchart wrote: > > > On Monday 31 Jul 2017 11:29:13 Joe Kniss wrote: > > >> New getfb2

vega firmware failing to load

2017-08-01 Thread Dave Airlie
Running amd-staging-4.11 at 0ae168080db88fa3a2ec84741a7293a25e4ecb42 on VEGA10 0x1002:0x687F pciid with firmware from https://people.freedesktop.org/~agd5f/radeon_ucode/vega10/ PSP firmware loading fails. Dave. [1.690928] [drm] initializing kernel modesetting (VEGA10 0x1002:0x687F

Re: [PATCH] Add drm ioctl DRM_IOCTL_MODE_GETFB2 & associated helpers.

2017-08-01 Thread Laurent Pinchart
Hi Joe, On Tuesday 01 Aug 2017 10:24:25 Joe Kniss wrote: > On Tue, Aug 1, 2017 at 5:09 AM, Laurent Pinchart wrote: > > On Monday 31 Jul 2017 11:29:13 Joe Kniss wrote: > >> New getfb2 functionality uses drm_mode_fb_cmd2 struct to be symmetric > >> with addfb2. > > > > What's the use case for this

Re: [PATCH] drm/amd/amdgpu: Add tracepoint for DMA page mapping

2017-08-01 Thread Christian König
Am 01.08.2017 um 19:00 schrieb Tom St Denis: On 01/08/17 11:41 AM, Christian König wrote: We can turn of the trace subsystem during compile time already. Additional to that the trace points use self modifying code to make sure that they don't have any overhead as long as they are turned off.

Re: [PATCH] Add drm ioctl DRM_IOCTL_MODE_GETFB2 & associated helpers.

2017-08-01 Thread Joe Kniss
Thanks for the quick review! On Tue, Aug 1, 2017 at 5:09 AM, Laurent Pinchart wrote: > Hi Joe, > > Thank you for the patch. > > On Monday 31 Jul 2017 11:29:13 Joe Kniss wrote: > > New getfb2 functionality uses drm_mode_fb_cmd2 struct to be symmetric > > with

Re: [PATCH] drm/amd/amdgpu: Add tracepoint for DMA page mapping

2017-08-01 Thread Tom St Denis
On 01/08/17 11:41 AM, Christian König wrote: We can turn of the trace subsystem during compile time already. Additional to that the trace points use self modifying code to make sure that they don't have any overhead as long as they are turned off. But I don't think this works with the "if

Re: [PATCH] drm/amd/amdgpu: Add tracepoint for DMA page mapping

2017-08-01 Thread Tom St Denis
In v2 of the patch I used the _enabled() function around the blocks so the for loop is only reached if the trace is enabled. Tom On 01/08/17 11:56 AM, Xie, AlexBin wrote: I don't know if compiler is smart enough to optimize the following for statement out... + for (i = 0; i <

Re: [PATCH] drm/amd/amdgpu: Add tracepoint for DMA page mapping

2017-08-01 Thread Christian König
We can turn of the trace subsystem during compile time already. Additional to that the trace points use self modifying code to make sure that they don't have any overhead as long as they are turned off. But I don't think this works with the "if (trace_*_enabled()" as well. Anyway, not a

Re: [PATCH] drm/amd/amdgpu: Add tracepoint for DMA page mapping

2017-08-01 Thread axie
Because this is used by a debug tool, can we use a macro to conditionally compile this feature? On 2017-08-01 10:54 AM, Christian König wrote: Am 01.08.2017 um 16:26 schrieb Tom St Denis: On 01/08/17 10:10 AM, Christian König wrote: You need to cover multiple code path here: 1. The one you

[PATCH] drm/amd/amdgpu: Add tracepoint for DMA page mapping (v2)

2017-08-01 Thread Tom St Denis
This helps map DMA addresses back to physical addresses. Signed-off-by: Tom St Denis (v2): Added tracepoints for USERPTR, SG mappings, and SWIOTBL mappings. Reformatted trace call perform PCI decoding internal to the trace. ---

Re: [PATCH] drm/amd/amdgpu: Add tracepoint for DMA page mapping

2017-08-01 Thread Christian König
Am 01.08.2017 um 16:26 schrieb Tom St Denis: On 01/08/17 10:10 AM, Christian König wrote: You need to cover multiple code path here: 1. The one you currently implemented which uses ttm_dma_populate() and pci_map_page(). 2. The one using ttm_dma_populate(). I'll have to look into this one

Re: [PATCH] drm/amd/amdgpu: Add tracepoint for DMA page mapping

2017-08-01 Thread Tom St Denis
On 01/08/17 10:10 AM, Christian König wrote: You need to cover multiple code path here: 1. The one you currently implemented which uses ttm_dma_populate() and pci_map_page(). 2. The one using ttm_dma_populate(). I'll have to look into this one though it's my understanding that code path is

Re: [PATCH xf86-video-ati v2 1/3] Use root window (pixmap) instead of screen pixmap for scanout updates

2017-08-01 Thread Alex Deucher
On Tue, Aug 1, 2017 at 5:19 AM, Michel Dänzer wrote: > From: Michel Dänzer > > Preparation for following changes, no functional change intended yet. > > Reviewed-by: Alex Deucher # v1 > Signed-off-by: Michel Dänzer

Re: [PATCH umr] Fix ib_addr_lo in BUFFER_CIK/BUFFER_CONST PM4 packets

2017-08-01 Thread Huang Rui
On Tue, Aug 01, 2017 at 06:00:42AM -0400, Tom St Denis wrote: > We correctly grabbed the bits but did not shift them > back to their correct place. > > Signed-off-by: Tom St Denis Tested-by: Huang Rui > --- > src/lib/ring_decode.c | 2 +- > 1 file

Re: [PATCH] drm/amd/amdgpu: Add tracepoint for DMA page mapping

2017-08-01 Thread Tom St Denis
On 01/08/17 07:55 AM, Christian König wrote: Am 01.08.2017 um 13:51 schrieb Tom St Denis: This helps map DMA addresses back to physical addresses. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 28

Re: [PATCH] Add drm ioctl DRM_IOCTL_MODE_GETFB2 & associated helpers.

2017-08-01 Thread Laurent Pinchart
Hi Joe, Thank you for the patch. On Monday 31 Jul 2017 11:29:13 Joe Kniss wrote: > New getfb2 functionality uses drm_mode_fb_cmd2 struct to be symmetric > with addfb2. What's the use case for this ? We haven't needed such an ioctl for so long that it seemed to me that userspace doesn't really

Re: [PATCH] drm/amd/amdgpu: Add tracepoint for DMA page mapping

2017-08-01 Thread Christian König
Am 01.08.2017 um 13:51 schrieb Tom St Denis: This helps map DMA addresses back to physical addresses. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 28 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 2

[PATCH] drm/amd/amdgpu: Add tracepoint for DMA page mapping

2017-08-01 Thread Tom St Denis
This helps map DMA addresses back to physical addresses. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 28 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 2 files changed, 36 insertions(+) diff --git

[PATCH umr] Fix ib_addr_lo in BUFFER_CIK/BUFFER_CONST PM4 packets

2017-08-01 Thread Tom St Denis
We correctly grabbed the bits but did not shift them back to their correct place. Signed-off-by: Tom St Denis --- src/lib/ring_decode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ring_decode.c b/src/lib/ring_decode.c index

[PATCH xf86-video-ati v2 1/3] Use root window (pixmap) instead of screen pixmap for scanout updates

2017-08-01 Thread Michel Dänzer
From: Michel Dänzer Preparation for following changes, no functional change intended yet. Reviewed-by: Alex Deucher # v1 Signed-off-by: Michel Dänzer --- v2: Add drmmode_screen_damage_destroy to prevent use-after-free

[PATCH xf86-video-ati v2 3/3] Allow DRI page flipping when some CRTCs use separate scanout buffers

2017-08-01 Thread Michel Dänzer
From: Michel Dänzer As long as the CRTC we're synchronizing to doesn't. Reviewed-by: Alex Deucher Signed-off-by: Michel Dänzer --- v2: Remove redundant checks from can_exchange which still prevented DRI2 page