Re: [PATCH] drm/amdgpu: fix SI display support

2016-08-19 Thread Alex Deucher
I've squashed this patch into my si tree and also fixed the cursor. Updated tree: https://cgit.freedesktop.org/~agd5f/linux/log/?h=drm-next-4.9-si Alex On Fri, Aug 19, 2016 at 5:01 AM, Marek Olšák wrote: > From: Marek Olšák > > The tiling flags use the same amdgpu encoding regardless of the ASI

RE: [PATCH xf86-video-ati 3/3] Track damage accurately for RandR 1.4 slave scanout

2016-08-19 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Michel Dänzer > Sent: Friday, August 19, 2016 6:01 AM > To: amd-gfx@lists.freedesktop.org > Subject: [PATCH xf86-video-ati 3/3] Track damage accurately for RandR 1.4 > slave scanout > > From:

Re: [PATCH xserver 0/6] modesetting: add DRI2 page flip support

2016-08-19 Thread Emil Velikov
On 19 August 2016 at 03:09, Michel Dänzer wrote: > On 19/08/16 11:02 AM, Yu, Qiang wrote: >> >> Each point of the patch set is not broken. Patches are arranged like >> this to show how I do it: >> 1. create a pageflip.c to host common page flip code >> 2. copy amdgpu DDX DRI2 page flip code to mod

[PATCH libdrm 2/2] radeon: sync radeon_drm.h with the kernel

2016-08-19 Thread Marek Olšák
From: Marek Olšák the CIK tile mode definitions are moved out, userspace doesn't use them --- include/drm/radeon_drm.h | 51 +++- radeon/radeon_surface.c | 8 2 files changed, 50 insertions(+), 9 deletions(-) diff --git a/include/drm/radeon

[PATCH libdrm 1/2] amdgpu: sync amdgpu_drm.h with the kernel

2016-08-19 Thread Marek Olšák
From: Marek Olšák --- include/drm/amdgpu_drm.h | 42 ++ 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/include/drm/amdgpu_drm.h b/include/drm/amdgpu_drm.h index 92f5970..d192052 100644 --- a/include/drm/amdgpu_drm.h +++ b/include/drm/amdgp

RE: [PATCH 0/1] AMDGPU SI support almost fixed

2016-08-19 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Marek Olšák > Sent: Friday, August 19, 2016 5:25 AM > To: Michel Dänzer > Cc: amd-gfx@lists.freedesktop.org > Subject: Re: [PATCH 0/1] AMDGPU SI support almost fixed > > I've added this. The

Re: [PATCH libdrm 1/2] amdgpu: add SI support

2016-08-19 Thread Marek Olšák
On Fri, Aug 19, 2016 at 11:04 AM, Marek Olšák wrote: > From: Ronie Salgado > > --- > amdgpu/amdgpu_gpu_info.c | 18 +++--- > include/drm/amdgpu_drm.h | 1 + > 2 files changed, 12 insertions(+), 7 deletions(-) > > diff --git a/amdgpu/amdgpu_gpu_info.c b/amdgpu/amdgpu_gpu_info.c > ind

[PATCH v2 xserver 1/5] modesetting: make ms_do_pageflip generic for share with DRI2

2016-08-19 Thread Qiang Yu
Signed-off-by: Qiang Yu Reviewed-by: Michel Dänzer --- hw/xfree86/drivers/modesetting/present.c | 38 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/hw/xfree86/drivers/modesetting/present.c b/hw/xfree86/drivers/modesetting/present.c index 0093fb

Re: [PATCH v2 xserver 3/5] modesetting: move common page flip handle to pageflip.c

2016-08-19 Thread StDenis, Tom
Sorry, disregard. The pointer doesn't point inside the struct. That part of the patch is fine. Tom From: amd-gfx on behalf of StDenis, Tom Sent: Friday, August 19, 2016 07:30 To: Yu, Qiang; xorg-de...@lists.x.org Cc: mic...@daenzer.net; emil.l.veli...@gmai

Re: [PATCH v2 xserver 3/5] modesetting: move common page flip handle to pageflip.c

2016-08-19 Thread StDenis, Tom
In ms_pageflip_free() you cannot free the parent structure before freeing things it points to. That's undefined behaviour. Tom From: amd-gfx on behalf of Qiang Yu Sent: Friday, August 19, 2016 08:50 To: xorg-de...@lists.x.org Cc: Yu, Qiang; mic...@daenzer.net

[PATCH v2 xserver 4/5] modesetting: add DRI2 page flip support

2016-08-19 Thread Qiang Yu
Signed-off-by: Qiang Yu --- hw/xfree86/drivers/modesetting/dri2.c | 230 -- 1 file changed, 221 insertions(+), 9 deletions(-) diff --git a/hw/xfree86/drivers/modesetting/dri2.c b/hw/xfree86/drivers/modesetting/dri2.c index 83cb3e0..acbb980 100644 --- a/hw/xfree86

[PATCH v2 xserver 3/5] modesetting: move common page flip handle to pageflip.c

2016-08-19 Thread Qiang Yu
The common page flip handle framework can be shared with DRI2 page flip. Signed-off-by: Qiang Yu --- hw/xfree86/drivers/modesetting/driver.h | 28 hw/xfree86/drivers/modesetting/pageflip.c | 102 -- hw/xfree86/drivers/modesetting/present.c | 63 +++--

[PATCH v2 xserver 5/5] modesetting: exclude DRI2 and prensent page flip

2016-08-19 Thread Qiang Yu
Signed-off-by: Qiang Yu Reviewed-by: Michel Dänzer --- hw/xfree86/drivers/modesetting/dri2.c| 11 +-- hw/xfree86/drivers/modesetting/driver.h | 5 +++-- hw/xfree86/drivers/modesetting/drmmode_display.h | 3 +++ hw/xfree86/drivers/modesetting/pageflip.c| 7

[PATCH v2 xserver 2/5] modesetting: move ms_do_pageflip to pageflip.c

2016-08-19 Thread Qiang Yu
Signed-off-by: Qiang Yu Reviewed-by: Michel Dänzer --- hw/xfree86/drivers/modesetting/Makefile.am | 1 + hw/xfree86/drivers/modesetting/driver.h| 48 ++ hw/xfree86/drivers/modesetting/pageflip.c | 251 hw/xfree86/drivers/modesetting/present.c | 252

[PATCH v2 xserver 0/5] modesetting: add DRI2 page flip support

2016-08-19 Thread Qiang Yu
Hi guys, This patch set is for adding DRI2 page flip support to modesetting driver. I mainly take reference of amdgpu DDX and reuse present page flip code in the modesetting driver. V2: 1. fix DRI2 page flip success handler event memory leak 2. adjust patch sequence to make DRI2 use the common

[PATCH xf86-video-amdgpu] Fix cursor size for SI

2016-08-19 Thread Marek Olšák
From: Marek Olšák This doesn't fix the missing cursor, which seems to be a kernel issue, because it's missing with modesetting as well. --- src/amdgpu_kms.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c index 9ee48df..d9f15a4 1

Re: [PATCH 0/1] AMDGPU SI support almost fixed

2016-08-19 Thread Marek Olšák
On Fri, Aug 19, 2016 at 12:04 PM, Michel Dänzer wrote: > On 19/08/16 07:00 PM, Marek Olšák wrote: >> On Fri, Aug 19, 2016 at 11:45 AM, Michel Dänzer wrote: >>> On 19/08/16 06:24 PM, Marek Olšák wrote: I've added this. The dmesg message is gone, but the cursor is still missing. >>>

Re: [PATCH 0/1] AMDGPU SI support almost fixed

2016-08-19 Thread Michel Dänzer
On 19/08/16 07:00 PM, Marek Olšák wrote: > On Fri, Aug 19, 2016 at 11:45 AM, Michel Dänzer wrote: >> On 19/08/16 06:24 PM, Marek Olšák wrote: >>> I've added this. The dmesg message is gone, but the cursor is still missing. >>> >>> diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c >>> index 9ee48df.

[PATCH xf86-video-ati 2/3] Handle RandR 1.4 slave dirty updates via radeon_drm_queue

2016-08-19 Thread Michel Dänzer
From: Michel Dänzer This reduces PCIe bandwidth usage and tearing. Signed-off-by: Michel Dänzer --- src/radeon_kms.c | 94 +--- 1 file changed, 90 insertions(+), 4 deletions(-) diff --git a/src/radeon_kms.c b/src/radeon_kms.c index d48c9b6..

[PATCH xf86-video-ati 3/3] Track damage accurately for RandR 1.4 slave scanout

2016-08-19 Thread Michel Dänzer
From: Michel Dänzer This further reduces the PCIe bandwidth usage. Signed-off-by: Michel Dänzer --- src/radeon_kms.c | 82 1 file changed, 71 insertions(+), 11 deletions(-) diff --git a/src/radeon_kms.c b/src/radeon_kms.c index adf56fd.

Re: [PATCH 0/1] AMDGPU SI support almost fixed

2016-08-19 Thread Marek Olšák
On Fri, Aug 19, 2016 at 11:45 AM, Michel Dänzer wrote: > On 19/08/16 06:24 PM, Marek Olšák wrote: >> I've added this. The dmesg message is gone, but the cursor is still missing. >> >> diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c >> index 9ee48df..d9f15a4 100644 >> --- a/src/amdgpu_kms.c >> +++

[PATCH xf86-video-ati 1/3] Use drmmode_crtc_scanout_* helpers for RandR 1.4 scanout pixmaps

2016-08-19 Thread Michel Dänzer
From: Michel Dänzer This should allow using multiple CRTCs via RandR 1.4 even with xserver < 1.17. It also simplifies the code a little, and paves the way for following changes. Signed-off-by: Michel Dänzer --- src/drmmode_display.c | 71 ++- src

Re: [PATCH 0/1] AMDGPU SI support almost fixed

2016-08-19 Thread Michel Dänzer
On 19/08/16 06:24 PM, Marek Olšák wrote: > I've added this. The dmesg message is gone, but the cursor is still missing. > > diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c > index 9ee48df..d9f15a4 100644 > --- a/src/amdgpu_kms.c > +++ b/src/amdgpu_kms.c > @@ -929,8 +929,14 @@ Bool AMDGPUPreInit_K

Re: [PATCH ddx] Add SI PCI IDs

2016-08-19 Thread Michel Dänzer
On 19/08/16 06:29 PM, Marek Olšák wrote: > I'm adding this. I hope that's it: > > diff --git a/man/amdgpu.man b/man/amdgpu.man > index fd35a9f..93244a4 100644 > --- a/man/amdgpu.man > +++ b/man/amdgpu.man > @@ -29,7 +29,7 @@ RandR support up to version 1.4; > .SH SUPPORTED HARDWARE > The > .B a

Re: [PATCH ddx] Add SI PCI IDs

2016-08-19 Thread Marek Olšák
I'm adding this. I hope that's it: diff --git a/man/amdgpu.man b/man/amdgpu.man index fd35a9f..93244a4 100644 --- a/man/amdgpu.man +++ b/man/amdgpu.man @@ -29,7 +29,7 @@ RandR support up to version 1.4; .SH SUPPORTED HARDWARE The .B amdgpu -driver supports CI and newer families' video cards. +d

Re: [PATCH 0/1] AMDGPU SI support almost fixed

2016-08-19 Thread Marek Olšák
I've added this. The dmesg message is gone, but the cursor is still missing. diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c index 9ee48df..d9f15a4 100644 --- a/src/amdgpu_kms.c +++ b/src/amdgpu_kms.c @@ -929,8 +929,14 @@ Bool AMDGPUPreInit_KMS(ScrnInfoPtr pScrn, int flags) else

Re: [PATCH ddx] Add SI PCI IDs

2016-08-19 Thread Michel Dänzer
On 19/08/16 06:04 PM, Marek Olšák wrote: > From: Ronie Salgado Please update the manpage as well. With that fixed, Reviewed-by: Michel Dänzer P.S. [PATCH ddx] — which DDX? ;) -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast |

Re: [PATCH 0/1] AMDGPU SI support almost fixed

2016-08-19 Thread Michel Dänzer
On 19/08/16 06:01 PM, Marek Olšák wrote: > Hi, > > This amdgpu patch fixes DCE support. Now only the cursor is broken: > > [ 37.936022] [drm:dce_v6_0_crtc_cursor_set2 [amdgpu]] *ERROR* bad cursor > width or height 128 x 128 The DDX driver's AMDGPUPreInit_KMS is hardcoding the >= CIK cursor si

Re: [PATCH xserver 0/6] modesetting: add DRI2 page flip support

2016-08-19 Thread Michel Dänzer
On 19/08/16 04:57 PM, Emil Velikov wrote: > On 19 August 2016 at 03:09, Michel Dänzer wrote: >> On 19/08/16 11:02 AM, Yu, Qiang wrote: >>> >>> Each point of the patch set is not broken. Patches are arranged like >>> this to show how I do it: >>> 1. create a pageflip.c to host common page flip code

Re: [PATCH xserver 3/6] modesetting: add DRI2 page flip support

2016-08-19 Thread Michel Dänzer
On 19/08/16 04:48 PM, Yu, Qiang wrote: > > +/* Post damage on the front buffer so that listeners, such > + * as DisplayLink know take a copy and shove it over the USB. > + * also for sw cursors. > + */ SW cursors cannot work correctly with page flipping. F

[PATCH ddx] Add SI PCI IDs

2016-08-19 Thread Marek Olšák
From: Ronie Salgado --- src/amdgpu_chipinfo_gen.h | 73 +++ src/amdgpu_chipset_gen.h | 73 +++ src/amdgpu_pci_chipset_gen.h | 73 +++ src/amdgpu_pci_device_match_gen.

[PATCH libdrm 2/2] amdgpu: fix valgrind warnings caused by amdgpu_query_firmware_version

2016-08-19 Thread Marek Olšák
From: Marek Olšák --- amdgpu/amdgpu_gpu_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/amdgpu/amdgpu_gpu_info.c b/amdgpu/amdgpu_gpu_info.c index 5c1644b..0f23297 100644 --- a/amdgpu/amdgpu_gpu_info.c +++ b/amdgpu/amdgpu_gpu_info.c @@ -112,21 +112,21 @@ int amdgpu_quer

[PATCH libdrm 1/2] amdgpu: add SI support

2016-08-19 Thread Marek Olšák
From: Ronie Salgado --- amdgpu/amdgpu_gpu_info.c | 18 +++--- include/drm/amdgpu_drm.h | 1 + 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/amdgpu/amdgpu_gpu_info.c b/amdgpu/amdgpu_gpu_info.c index 0cc17f1..5c1644b 100644 --- a/amdgpu/amdgpu_gpu_info.c +++ b/amdgpu

[PATCH] drm/amdgpu: fix SI display support

2016-08-19 Thread Marek Olšák
From: Marek Olšák The tiling flags use the same amdgpu encoding regardless of the ASIC. Signed-off-by: Marek Olšák --- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 74 --- drivers/gpu/drm/amd/include/asic_reg/si/sid.h | 32 2 files changed, 11 insertions

[PATCH 0/1] AMDGPU SI support almost fixed

2016-08-19 Thread Marek Olšák
Hi, This amdgpu patch fixes DCE support. Now only the cursor is broken: [ 37.936022] [drm:dce_v6_0_crtc_cursor_set2 [amdgpu]] *ERROR* bad cursor width or height 128 x 128 Everything else seems to work. I've not tested UVD and VCE. Now I'm gonna send out all userspace patches that I intend to

Re: [PATCH xserver 3/6] modesetting: add DRI2 page flip support

2016-08-19 Thread Yu, Qiang
>>> +/* Post damage on the front buffer so that listeners, such >>> + * as DisplayLink know take a copy and shove it over the USB. >>> + * also for sw cursors. >>> + */ >> >> SW cursors cannot work correctly with page flipping. For that reason, >> xf86-video-ati/amdgpu disable page

Re: [PATCH xserver 3/6] modesetting: add DRI2 page flip support

2016-08-19 Thread Michel Dänzer
On 19/08/16 04:06 PM, Yu, Qiang wrote: > >>> +static Bool >>> +can_exchange(ScrnInfoPtr scrn, DrawablePtr draw, >>> + DRI2BufferPtr front, DRI2BufferPtr back) >>> +{ >> >> [...] >> >>> +if (!update_front(draw, front)) >>> +return FALSE; >> >> I know you just copied this fro

Re: [PATCH xserver 3/6] modesetting: add DRI2 page flip support

2016-08-19 Thread Yu, Qiang
> +static Bool > +can_exchange(ScrnInfoPtr scrn, DrawablePtr draw, > + DRI2BufferPtr front, DRI2BufferPtr back) > +{ [...] > +if (!update_front(draw, front)) > +return FALSE; I know you just copied this from -ati/amdgpu, but: I don't think can_exchange should call update_f