Re: [Nouveau] [PATCH 3/7] Revert "ACPI / OSI: Add OEM _OSI strings to disable NVidia RTD3"

2019-08-14 Thread Karol Herbst
On Thu, Aug 15, 2019 at 1:35 AM Alex Hung wrote: > > On Wed, Aug 14, 2019 at 3:31 PM Karol Herbst wrote: > > > > This reverts commit 9251a71db62ca9cc7e7cf364218610b0f018c291. > > > > This was never discussed with anybody Nouveau related and we would have > > NACKed > > this change immediately. >

Re: turn hmm migrate_vma upside down v3

2019-08-14 Thread Ralph Campbell
On 8/14/19 12:59 AM, Christoph Hellwig wrote: Hi Jérôme, Ben and Jason, below is a series against the hmm tree which starts revamping the migrate_vma functionality. The prime idea is to export three slightly lower level functions and thus avoid the need for migrate_vma_ops callbacks. Diffsta

Re: [PATCH 3/7] Revert "ACPI / OSI: Add OEM _OSI strings to disable NVidia RTD3"

2019-08-14 Thread Alex Hung
On Wed, Aug 14, 2019 at 3:31 PM Karol Herbst wrote: > > This reverts commit 9251a71db62ca9cc7e7cf364218610b0f018c291. > > This was never discussed with anybody Nouveau related and we would have NACKed > this change immediately. > > We have a better workaround, which makes it actually work with Nou

Re: [Nouveau] [PATCH 1/7] Revert "ACPI / OSI: Add OEM _OSI string to enable dGPU direct output"

2019-08-14 Thread Dave Airlie
On Thu, 15 Aug 2019 at 07:31, Karol Herbst wrote: > > This reverts commit 28586a51eea666d5531bcaef2f68e4abbd87242c. > > The original commit message didn't even make sense. AMD _does_ support it and > it works with Nouveau as well. > > Also what was the issue being solved here? No references to any

[Nouveau] [Bug 111392] [NV117] bus: MMIO read of 00000000 FAULT at 619444 [ IBUS ]

2019-08-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=111392 Giuseppe Lumia changed: What|Removed |Added Summary|[NV110] bus: MMIO read of |[NV117] bus: MMIO read of

Re: [PATCH 1/7] Revert "ACPI / OSI: Add OEM _OSI string to enable dGPU direct output"

2019-08-14 Thread Alex Hung
Thanks for the series of fixes. I will check whether these fixes work on the original intended systems. On Wed, Aug 14, 2019 at 3:31 PM Karol Herbst wrote: > > This reverts commit 28586a51eea666d5531bcaef2f68e4abbd87242c. > > The original commit message didn't even make sense. AMD _does_ support

[PATCH 5/7] drm/nouveau/pci: add nvkm_pcie_get_speed

2019-08-14 Thread Karol Herbst
v2: fixed compilation error Signed-off-by: Karol Herbst Reviewed-by: Lyude Paul CC: Alex Hung CC: Rafael J. Wysocki CC: Dave Airlie CC: Lyude Paul CC: Ben Skeggs --- drivers/gpu/drm/nouveau/include/nvkm/subdev/pci.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/pci/pcie.c| 8 2 f

[PATCH 6/7] drm/nouveau/pci: save the boot pcie link speed and restore it on fini

2019-08-14 Thread Karol Herbst
Apperantly things go south if we suspend the device with a different PCIE link speed set than it got booted with. Fixes runtime suspend on my gp107. This all looks like some bug inside the pci subsystem and I would prefer a fix there instead of nouveau, but maybe there is no real nice way of doing

[Nouveau] [PATCH 1/7] Revert "ACPI / OSI: Add OEM _OSI string to enable dGPU direct output"

2019-08-14 Thread Karol Herbst
This reverts commit 28586a51eea666d5531bcaef2f68e4abbd87242c. The original commit message didn't even make sense. AMD _does_ support it and it works with Nouveau as well. Also what was the issue being solved here? No references to any bugs and not even explaining any issue at all isn't the way we

[PATCH 7/7] drm/nouveau: abort runtime suspend if we hit an error

2019-08-14 Thread Karol Herbst
Signed-off-by: Karol Herbst CC: Alex Hung CC: Rafael J. Wysocki CC: Dave Airlie CC: Lyude Paul CC: Ben Skeggs --- drivers/gpu/drm/nouveau/nouveau_drm.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c inde

[Nouveau] [PATCH 2/7] Revert "ACPI / OSI: Add OEM _OSI string to enable NVidia HDMI audio"

2019-08-14 Thread Karol Herbst
This reverts commit 887532ca7ca59fcf0547a79211756791128030a3. We have a better solution for this: b516ea586d717 And same as with the last commit: "NVidia Linux driver" that's Nouveau, any out of tree driver does _not_ matter. And with Nouveau all of this works even though it required a proper fix

[Nouveau] [PATCH 4/7] drm/nouveau/pci: enable pcie link changes for pascal

2019-08-14 Thread Karol Herbst
Signed-off-by: Karol Herbst Reviewed-by: Lyude Paul CC: Alex Hung CC: Rafael J. Wysocki CC: Dave Airlie CC: Lyude Paul CC: Ben Skeggs --- drivers/gpu/drm/nouveau/nvkm/subdev/pci/gk104.c | 8 drivers/gpu/drm/nouveau/nvkm/subdev/pci/gp100.c | 10 ++ drivers/gpu/drm/nouveau/n

[PATCH 3/7] Revert "ACPI / OSI: Add OEM _OSI strings to disable NVidia RTD3"

2019-08-14 Thread Karol Herbst
This reverts commit 9251a71db62ca9cc7e7cf364218610b0f018c291. This was never discussed with anybody Nouveau related and we would have NACKed this change immediately. We have a better workaround, which makes it actually work with Nouveau. No idea why the comment mentions the Nvidia driver and assu

[PATCH 0/7] Adding a proper workaround for fixing RTD3 issues with Nouveau

2019-08-14 Thread Karol Herbst
First three patches are removing ACPI workarounds which should have never landed. The last four are adding a workaround to nouveau which seem to help quite a lot with the RTD3 issues with Nouveau, so let's discuss and get wider testing of those and see if there is any fallout or laptops where the

Re: [Nouveau] DMA-API: cacheline tracking ENOMEM, dma-debug disabled due to nouveau ?

2019-08-14 Thread Daniel Vetter
On Wed, Aug 14, 2019 at 04:50:33PM +0200, Corentin Labbe wrote: > Hello > > Since lot of release (at least since 4.19), I hit the following error message: > DMA-API: cacheline tracking ENOMEM, dma-debug disabled > > After hitting that, I try to check who is creating so many DMA mapping and > see

DMA-API: cacheline tracking ENOMEM, dma-debug disabled due to nouveau ?

2019-08-14 Thread Corentin Labbe
Hello Since lot of release (at least since 4.19), I hit the following error message: DMA-API: cacheline tracking ENOMEM, dma-debug disabled After hitting that, I try to check who is creating so many DMA mapping and see: cat /sys/kernel/debug/dma-api/dump | cut -d' ' -f2 | sort | uniq -c 6 a

Re: [Nouveau] [PATCH 04/15] mm: remove the pgmap field from struct hmm_vma_walk

2019-08-14 Thread Dan Williams
On Wed, Aug 14, 2019 at 6:28 AM Jason Gunthorpe wrote: > > On Wed, Aug 14, 2019 at 09:38:54AM +0200, Christoph Hellwig wrote: > > On Tue, Aug 13, 2019 at 06:36:33PM -0700, Dan Williams wrote: > > > Section alignment constraints somewhat save us here. The only example > > > I can think of a PMD not

Re: [Nouveau] [PATCH 01/10] mm: turn migrate_vma upside down

2019-08-14 Thread William Lewis
On 8/14/19 2:59 AM, Christoph Hellwig wrote: > There isn't any good reason to pass callbacks to migrate_vma. Instead > we can just export the three steps done by this function to drivers and > let them sequence the operation without callbacks. This removes a lot > of boilerplate code as-is, and

Re: [Nouveau] [PATCH 04/15] mm: remove the pgmap field from struct hmm_vma_walk

2019-08-14 Thread Jason Gunthorpe
On Wed, Aug 14, 2019 at 09:38:54AM +0200, Christoph Hellwig wrote: > On Tue, Aug 13, 2019 at 06:36:33PM -0700, Dan Williams wrote: > > Section alignment constraints somewhat save us here. The only example > > I can think of a PMD not containing a uniform pgmap association for > > each pte is the ca

Re: [Nouveau] Video Hardware Decoding: Jittery Rectangles on Nvidia GT218 NVA8 VP4.

2019-08-14 Thread Ilia Mirkin
On Wed, Aug 14, 2019 at 7:37 AM Ralph Corderoy wrote: > > Hi Ilia, > > A fortnight ago, you wrote: > > > The video plays, CPU load is less (my aim), but there's ‘tearing’ of > > > the picture as if small rectangles that are updates are appearing in > > > the wrong location, off by a little. If I

Re: [Nouveau] Video Hardware Decoding: Jittery Rectangles on Nvidia GT218 NVA8 VP4.

2019-08-14 Thread Ralph Corderoy
Hi Ilia, A fortnight ago, you wrote: > > The video plays, CPU load is less (my aim), but there's ‘tearing’ of > > the picture as if small rectangles that are updates are appearing in > > the wrong location, off by a little. If I step through the frames > > with mpv's ‘.’ and ‘,’ then I've found a

[PATCH v7 0/9] drm: cec: convert DRM drivers to the new notifier API

2019-08-14 Thread Dariusz Marcinkiewicz
This series updates DRM drivers to use new CEC notifier API. Changes since v6: Made CEC notifiers' registration and de-registration symmetric in tda998x and dw-hdmi drivers. Also, accidentally dropped one patch in v6 (change to drm_dp_cec), brought it back now. Changes sinc

[PATCH v7 1/9] drm_dp_cec: add connector info support.

2019-08-14 Thread Dariusz Marcinkiewicz
Pass the connector info to the CEC adapter. This makes it possible to associate the CEC adapter with the corresponding drm connector. Signed-off-by: Dariusz Marcinkiewicz Signed-off-by: Hans Verkuil Tested-by: Hans Verkuil --- .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 2 +- drivers/gpu/

Re: [Nouveau] [Intel-gfx] [PATCH v6 08/17] drm/ttm: use gem vma_node

2019-08-14 Thread Gerd Hoffmann
Hi, > > Changing the order doesn't look hard. Patch attached (untested, have no > > test hardware). But maybe I missed some detail ... > > I came up with something very similar by splitting up nouveau_bo_new() > into allocation and initialization steps, so that when necessary the GEM > object

Re: [Nouveau] [Intel-gfx] [PATCH v6 08/17] drm/ttm: use gem vma_node

2019-08-14 Thread Thierry Reding
On Wed, Aug 14, 2019 at 07:58:27AM +0200, Gerd Hoffmann wrote: > > Hi Gerd, > > > > I've been seeing a regression on Nouveau with recent linux-next releases > > and git bisect points at this commit as the first bad one. If I revert > > it (there's a tiny conflict with a patch that was merged subse

[Nouveau] [PATCH 04/10] nouveau: factor out dmem fence completion

2019-08-14 Thread Christoph Hellwig
Factor out the end of fencing logic from the two migration routines. Signed-off-by: Christoph Hellwig Reviewed-by: Ralph Campbell --- drivers/gpu/drm/nouveau/nouveau_dmem.c | 33 -- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/nouveau/n

[Nouveau] [PATCH 06/10] nouveau: simplify nouveau_dmem_migrate_to_ram

2019-08-14 Thread Christoph Hellwig
Factor the main copy page to ram routine out into a helper that acts on a single page and which doesn't require the nouveau_dmem_fault structure for argument passing. Also remove the loop over multiple pages as we only handle one at the moment, although the structure of the main worker function ma

[Nouveau] [PATCH 10/10] mm: remove CONFIG_MIGRATE_VMA_HELPER

2019-08-14 Thread Christoph Hellwig
CONFIG_MIGRATE_VMA_HELPER guards helpers that are required for proper devic private memory support. Remove the option and just check for CONFIG_DEVICE_PRIVATE instead. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/nouveau/Kconfig | 1 - mm/Kconfig | 3 --- mm/migrate

[Nouveau] [PATCH 05/10] nouveau: remove a few function stubs

2019-08-14 Thread Christoph Hellwig
nouveau_dmem_migrate_vma and nouveau_dmem_convert_pfn are only called when CONFIG_DRM_NOUVEAU_SVM is enabled, so there is no need to provide !CONFIG_DRM_NOUVEAU_SVM stubs for them. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/nouveau/nouveau_dmem.h | 11 --- 1 file changed, 11 de

[Nouveau] [PATCH 07/10] nouveau: simplify nouveau_dmem_migrate_vma

2019-08-14 Thread Christoph Hellwig
Factor the main copy page to vram routine out into a helper that acts on a single page and which doesn't require the nouveau_dmem_migrate structure for argument passing. As an added benefit the new version only allocates the dma address array once and reuses it for each subsequent chunk of work.

[PATCH 08/10] mm: remove the unused MIGRATE_PFN_ERROR flag

2019-08-14 Thread Christoph Hellwig
Now that we can rely errors in the normal control flow there is no need for this flag, remove it. Signed-off-by: Christoph Hellwig Reviewed-by: Ralph Campbell --- include/linux/migrate.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/migrate.h b/include/linux/migrate.h index 1

[PATCH 09/10] mm: remove the unused MIGRATE_PFN_DEVICE flag

2019-08-14 Thread Christoph Hellwig
No one ever checks this flag, and we could easily get that information from the page if needed. Signed-off-by: Christoph Hellwig Reviewed-by: Ralph Campbell --- drivers/gpu/drm/nouveau/nouveau_dmem.c | 3 +-- include/linux/migrate.h| 1 - mm/migrate.c |

[Nouveau] [PATCH 02/10] nouveau: reset dma_nr in nouveau_dmem_migrate_alloc_and_copy

2019-08-14 Thread Christoph Hellwig
When we start a new batch of dma_map operations we need to reset dma_nr, as we start filling a newly allocated array. Signed-off-by: Christoph Hellwig Reviewed-by: Ralph Campbell --- drivers/gpu/drm/nouveau/nouveau_dmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/nouve

[Nouveau] [PATCH 01/10] mm: turn migrate_vma upside down

2019-08-14 Thread Christoph Hellwig
There isn't any good reason to pass callbacks to migrate_vma. Instead we can just export the three steps done by this function to drivers and let them sequence the operation without callbacks. This removes a lot of boilerplate code as-is, and will allow the drivers to drastically improve code flo

[Nouveau] [PATCH 03/10] nouveau: factor out device memory address calculation

2019-08-14 Thread Christoph Hellwig
Factor out the repeated device memory address calculation into a helper. Signed-off-by: Christoph Hellwig Reviewed-by: Ralph Campbell --- drivers/gpu/drm/nouveau/nouveau_dmem.c | 42 +++--- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/drivers/gpu/drm/nouve

[Nouveau] turn hmm migrate_vma upside down v3

2019-08-14 Thread Christoph Hellwig
Hi Jérôme, Ben and Jason, below is a series against the hmm tree which starts revamping the migrate_vma functionality. The prime idea is to export three slightly lower level functions and thus avoid the need for migrate_vma_ops callbacks. Diffstat: 7 files changed, 282 insertions(+), 614 de

Re: [PATCH 04/15] mm: remove the pgmap field from struct hmm_vma_walk

2019-08-14 Thread Christoph Hellwig
On Tue, Aug 13, 2019 at 06:36:33PM -0700, Dan Williams wrote: > Section alignment constraints somewhat save us here. The only example > I can think of a PMD not containing a uniform pgmap association for > each pte is the case when the pgmap overlaps normal dram, i.e. shares > the same 'struct memo