[Nouveau] [Bug 91319] Nouveau driver cannot extract FCODE ROM / DCB Block from OpenFirmware Device tree

2017-11-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91319

ree...@gmail.com changed:

   What|Removed |Added

 CC||ree...@gmail.com

--- Comment #16 from ree...@gmail.com ---
I'm having this exact same problem on kernel 4.9.49 on ppc 32-bit.
I see that this was previously fixed. Should this be re-opened or should I file
a new bug report?

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [PATCH 00/15] drm: More plane clipping polish

2017-11-30 Thread Ville Syrjala
From: Ville Syrjälä 

This series first unifies all users of drm_atomic_helper_check_plane_state()
to populate the clip rectangle with drm_mode_get_hv_timing(), and once
everything is unified the clip rectangle handling is sucked into
drm_atomic_helper_check_plane_state() away from driver code.

Entire series available here:
git://github.com/vsyrjala/linux.git atomic_plane_helper_clip

Cc: Archit Taneja 
Cc: Ben Skeggs 
Cc: Brian Starkey 
Cc: CK Hu 
Cc: Daniel Vetter 
Cc: freedr...@lists.freedesktop.org
Cc: Laurent Pinchart 
Cc: linux-amlo...@lists.infradead.org
Cc: linux-arm-...@vger.kernel.org
Cc: linux-te...@vger.kernel.org
Cc: Liviu Dudau 
Cc: Mali DP Maintainers 
Cc: Mark Yao 
Cc: Neil Armstrong 
Cc: Noralf Trønnes 
Cc: nouveau@lists.freedesktop.org
Cc: Philipp Zabel 
Cc: Rob Clark 
Cc: Shawn Guo 
Cc: Sinclair Yeh 
Cc: Thierry Reding 
Cc: Thomas Hellstrom 
Cc: VMware Graphics 

Ville Syrjälä (15):
  drm/i915: Reject odd pipe source width with double wide/dual link
  drm/i915: Use drm_mode_get_hv_timing() to populate plane clip
rectangle
  drm/arm/hdlcd: Use drm_mode_get_hv_timing() to populate plane clip
rectangle
  drm/arm/mali-dp: Use drm_mode_get_hv_timing() to populate plane clip
rectangle
  drm/simple_kms_helper: Use drm_mode_get_hv_timing() to populate plane
clip rectangle
  drm/imx: Use drm_mode_get_hv_timing() to populate plane clip rectangle
  drm/mediatek: Use drm_mode_get_hv_timing() to populate plane clip
rectangle
  drm/meson: Use drm_mode_get_hv_timing() to populate plane clip
rectangle
  drm/msm/mdp5: Use drm_mode_get_hv_timing() to populate plane clip
rectangle
  drm/nouveau/kms/nv50: Use drm_mode_get_hv_timing() to populate plane
clip rectangle
  drm/rockchip: Use drm_mode_get_hv_timing() to populate plane clip
rectangle
  drm/tegra/dc: Use drm_mode_get_hv_timing() to populate plane clip
rectangle
  drm/vmwgfx: Use drm_mode_get_hv_timing() to populate plane clip
rectangle
  drm/zte: Use drm_mode_get_hv_timing() to populate plane clip rectangle
  drm: Don't pass clip to drm_atomic_helper_check_plane_state()

 drivers/gpu/drm/arm/hdlcd_crtc.c|  6 +-
 drivers/gpu/drm/arm/malidp_planes.c |  5 +
 drivers/gpu/drm/armada/armada_overlay.c |  2 +-
 drivers/gpu/drm/drm_atomic_helper.c | 12 +++-
 drivers/gpu/drm/drm_plane_helper.c  | 11 +++
 drivers/gpu/drm/drm_simple_kms_helper.c |  5 -
 drivers/gpu/drm/i915/intel_atomic_plane.c   |  8 
 drivers/gpu/drm/i915/intel_display.c| 12 +++-
 drivers/gpu/drm/i915/intel_drv.h|  1 -
 drivers/gpu/drm/i915/intel_sprite.c |  8 ++--
 drivers/gpu/drm/imx/ipuv3-plane.c   |  7 +--
 drivers/gpu/drm/mediatek/mtk_drm_plane.c|  6 +-
 drivers/gpu/drm/meson/meson_plane.c |  6 +-
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c   | 14 ++
 drivers/gpu/drm/nouveau/nv50_display.c  |  8 
 drivers/gpu/drm/rockchip/rockchip_drm_vop.c |  8 +---
 drivers/gpu/drm/tegra/dc.c  |  8 +---
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c |  8 +---
 drivers/gpu/drm/zte/zx_plane.c  | 15 +--
 include/drm/drm_atomic_helper.h |  1 -
 include/drm/drm_plane_helper.h  |  1 -
 21 files changed, 35 insertions(+), 117 deletions(-)

-- 
2.13.6

___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [PATCH 10/30] drm/nouveau: deprecate pci_get_bus_and_slot()

2017-11-30 Thread Sinan Kaya
pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as
where a PCI device is present. This restricts the device drivers to be
reused for other domain numbers.

Use pci_get_domain_bus_and_slot() with a domain number of 0 where we can't
extract the domain number. Other places, use the actual domain number from
the device.

Signed-off-by: Sinan Kaya 
---
 drivers/gpu/drm/nouveau/dispnv04/arb.c   | 3 ++-
 drivers/gpu/drm/nouveau/dispnv04/hw.c| 6 --
 drivers/gpu/drm/nouveau/nouveau_drm.c| 3 ++-
 drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv1a.c | 2 +-
 4 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv04/arb.c 
b/drivers/gpu/drm/nouveau/dispnv04/arb.c
index 90075b6..729d7d0 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/arb.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/arb.c
@@ -214,7 +214,8 @@ struct nv_sim_state {
(dev->pdev->device & 0x) == 0x01f0 /*CHIPSET_NFORCE2*/) {
uint32_t type;
 
-   pci_read_config_dword(pci_get_bus_and_slot(0, 1), 0x7c, &type);
+   pci_read_config_dword(pci_get_domain_bus_and_slot(0, 0, 1),
+ 0x7c, &type);
 
sim_data.memory_type = (type >> 12) & 1;
sim_data.memory_width = 64;
diff --git a/drivers/gpu/drm/nouveau/dispnv04/hw.c 
b/drivers/gpu/drm/nouveau/dispnv04/hw.c
index b985990..4b35093 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/hw.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/hw.c
@@ -221,7 +221,8 @@
(dev->pdev->device & 0x0ff0) == CHIPSET_NFORCE) {
uint32_t mpllP;
 
-   pci_read_config_dword(pci_get_bus_and_slot(0, 3), 0x6c, &mpllP);
+   pci_read_config_dword(pci_get_domain_bus_and_slot(0, 0, 3),
+ 0x6c, &mpllP);
mpllP = (mpllP >> 8) & 0xf;
if (!mpllP)
mpllP = 4;
@@ -232,7 +233,8 @@
(dev->pdev->device & 0xff0) == CHIPSET_NFORCE2) {
uint32_t clock;
 
-   pci_read_config_dword(pci_get_bus_and_slot(0, 5), 0x4c, &clock);
+   pci_read_config_dword(pci_get_domain_bus_and_slot(0, 0, 5),
+ 0x4c, &clock);
return clock / 1000;
}
 
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c 
b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 595630d..0b6c639 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -406,7 +406,8 @@ static int nouveau_drm_probe(struct pci_dev *pdev,
}
 
/* subfunction one is a hdmi audio device? */
-   drm->hdmi_device = pci_get_bus_and_slot((unsigned int)pdev->bus->number,
+   drm->hdmi_device = pci_get_domain_bus_and_slot(pci_domain_nr(pdev->bus),
+   (unsigned int)pdev->bus->number,

PCI_DEVFN(PCI_SLOT(pdev->devfn), 1));
 
if (!drm->hdmi_device) {
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv1a.c 
b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv1a.c
index 3c6a871..3d2a203 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv1a.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv1a.c
@@ -29,7 +29,7 @@
struct pci_dev *bridge;
u32 mem, mib;
 
-   bridge = pci_get_bus_and_slot(0, PCI_DEVFN(0, 1));
+   bridge = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(0, 1));
if (!bridge) {
nvkm_error(&fb->subdev, "no bridge device\n");
return -ENODEV;
-- 
1.9.1

___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] [PATCH 00/15] drm: More plane clipping polish

2017-11-30 Thread Thierry Reding
On Thu, Nov 23, 2017 at 09:04:47PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä 
> 
> This series first unifies all users of drm_atomic_helper_check_plane_state()
> to populate the clip rectangle with drm_mode_get_hv_timing(), and once
> everything is unified the clip rectangle handling is sucked into
> drm_atomic_helper_check_plane_state() away from driver code.
> 
> Entire series available here:
> git://github.com/vsyrjala/linux.git atomic_plane_helper_clip
> 
> Cc: Archit Taneja 
> Cc: Ben Skeggs 
> Cc: Brian Starkey 
> Cc: CK Hu 
> Cc: Daniel Vetter 
> Cc: freedr...@lists.freedesktop.org
> Cc: Laurent Pinchart 
> Cc: linux-amlo...@lists.infradead.org
> Cc: linux-arm-...@vger.kernel.org
> Cc: linux-te...@vger.kernel.org
> Cc: Liviu Dudau 
> Cc: Mali DP Maintainers 
> Cc: Mark Yao 
> Cc: Neil Armstrong 
> Cc: Noralf Trønnes 
> Cc: nouveau@lists.freedesktop.org
> Cc: Philipp Zabel 
> Cc: Rob Clark 
> Cc: Shawn Guo 
> Cc: Sinclair Yeh 
> Cc: Thierry Reding 
> Cc: Thomas Hellstrom 
> Cc: VMware Graphics 
> 
> Ville Syrjälä (15):
>   drm/i915: Reject odd pipe source width with double wide/dual link
>   drm/i915: Use drm_mode_get_hv_timing() to populate plane clip
> rectangle
>   drm/arm/hdlcd: Use drm_mode_get_hv_timing() to populate plane clip
> rectangle
>   drm/arm/mali-dp: Use drm_mode_get_hv_timing() to populate plane clip
> rectangle
>   drm/simple_kms_helper: Use drm_mode_get_hv_timing() to populate plane
> clip rectangle
>   drm/imx: Use drm_mode_get_hv_timing() to populate plane clip rectangle
>   drm/mediatek: Use drm_mode_get_hv_timing() to populate plane clip
> rectangle
>   drm/meson: Use drm_mode_get_hv_timing() to populate plane clip
> rectangle
>   drm/msm/mdp5: Use drm_mode_get_hv_timing() to populate plane clip
> rectangle
>   drm/nouveau/kms/nv50: Use drm_mode_get_hv_timing() to populate plane
> clip rectangle
>   drm/rockchip: Use drm_mode_get_hv_timing() to populate plane clip
> rectangle
>   drm/tegra/dc: Use drm_mode_get_hv_timing() to populate plane clip
> rectangle
>   drm/vmwgfx: Use drm_mode_get_hv_timing() to populate plane clip
> rectangle
>   drm/zte: Use drm_mode_get_hv_timing() to populate plane clip rectangle
>   drm: Don't pass clip to drm_atomic_helper_check_plane_state()
> 
>  drivers/gpu/drm/arm/hdlcd_crtc.c|  6 +-
>  drivers/gpu/drm/arm/malidp_planes.c |  5 +
>  drivers/gpu/drm/armada/armada_overlay.c |  2 +-
>  drivers/gpu/drm/drm_atomic_helper.c | 12 +++-
>  drivers/gpu/drm/drm_plane_helper.c  | 11 +++
>  drivers/gpu/drm/drm_simple_kms_helper.c |  5 -
>  drivers/gpu/drm/i915/intel_atomic_plane.c   |  8 
>  drivers/gpu/drm/i915/intel_display.c| 12 +++-
>  drivers/gpu/drm/i915/intel_drv.h|  1 -
>  drivers/gpu/drm/i915/intel_sprite.c |  8 ++--
>  drivers/gpu/drm/imx/ipuv3-plane.c   |  7 +--
>  drivers/gpu/drm/mediatek/mtk_drm_plane.c|  6 +-
>  drivers/gpu/drm/meson/meson_plane.c |  6 +-
>  drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c   | 14 ++
>  drivers/gpu/drm/nouveau/nv50_display.c  |  8 
>  drivers/gpu/drm/rockchip/rockchip_drm_vop.c |  8 +---
>  drivers/gpu/drm/tegra/dc.c  |  8 +---
>  drivers/gpu/drm/vmwgfx/vmwgfx_kms.c |  8 +---
>  drivers/gpu/drm/zte/zx_plane.c  | 15 +--
>  include/drm/drm_atomic_helper.h |  1 -
>  include/drm/drm_plane_helper.h  |  1 -
>  21 files changed, 35 insertions(+), 117 deletions(-)

The series:

Reviewed-by: Thierry Reding 


signature.asc
Description: PGP signature
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [PATCH V3 10/29] drm/nouveau: deprecate pci_get_bus_and_slot()

2017-11-30 Thread Sinan Kaya
pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as
where a PCI device is present. This restricts the device drivers to be
reused for other domain numbers.

Getting ready to remove pci_get_bus_and_slot() function in favor of
pci_get_domain_bus_and_slot().

Replace pci_get_bus_and_slot() with pci_get_domain_bus_and_slot()
and extract the domain number from
1. struct pci_dev
2. struct pci_dev through drm_device->pdev
3. struct pci_dev through fb->subdev->drm_device->pdev

Signed-off-by: Sinan Kaya 
---
 drivers/gpu/drm/nouveau/dispnv04/arb.c   |  4 +++-
 drivers/gpu/drm/nouveau/dispnv04/hw.c| 10 +++---
 drivers/gpu/drm/nouveau/nouveau_drm.c|  3 ++-
 drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv1a.c | 10 +-
 4 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv04/arb.c 
b/drivers/gpu/drm/nouveau/dispnv04/arb.c
index 90075b6..c79160c 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/arb.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/arb.c
@@ -213,8 +213,10 @@ struct nv_sim_state {
if ((dev->pdev->device & 0x) == 0x01a0 /*CHIPSET_NFORCE*/ ||
(dev->pdev->device & 0x) == 0x01f0 /*CHIPSET_NFORCE2*/) {
uint32_t type;
+   int domain = pci_domain_nr(dev->pdev->bus);
 
-   pci_read_config_dword(pci_get_bus_and_slot(0, 1), 0x7c, &type);
+   pci_read_config_dword(pci_get_domain_bus_and_slot(domain, 0, 1),
+ 0x7c, &type);
 
sim_data.memory_type = (type >> 12) & 1;
sim_data.memory_width = 64;
diff --git a/drivers/gpu/drm/nouveau/dispnv04/hw.c 
b/drivers/gpu/drm/nouveau/dispnv04/hw.c
index b985990..0c9bdf0 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/hw.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/hw.c
@@ -216,12 +216,15 @@
 {
struct nvkm_pll_vals pllvals;
int ret;
+   int domain;
+
+   domain = pci_domain_nr(dev->pdev->bus);
 
if (plltype == PLL_MEMORY &&
(dev->pdev->device & 0x0ff0) == CHIPSET_NFORCE) {
uint32_t mpllP;
-
-   pci_read_config_dword(pci_get_bus_and_slot(0, 3), 0x6c, &mpllP);
+   pci_read_config_dword(pci_get_domain_bus_and_slot(domain, 0, 3),
+ 0x6c, &mpllP);
mpllP = (mpllP >> 8) & 0xf;
if (!mpllP)
mpllP = 4;
@@ -232,7 +235,8 @@
(dev->pdev->device & 0xff0) == CHIPSET_NFORCE2) {
uint32_t clock;
 
-   pci_read_config_dword(pci_get_bus_and_slot(0, 5), 0x4c, &clock);
+   pci_read_config_dword(pci_get_domain_bus_and_slot(domain, 0, 5),
+ 0x4c, &clock);
return clock / 1000;
}
 
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c 
b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 595630d..0b6c639 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -406,7 +406,8 @@ static int nouveau_drm_probe(struct pci_dev *pdev,
}
 
/* subfunction one is a hdmi audio device? */
-   drm->hdmi_device = pci_get_bus_and_slot((unsigned int)pdev->bus->number,
+   drm->hdmi_device = pci_get_domain_bus_and_slot(pci_domain_nr(pdev->bus),
+   (unsigned int)pdev->bus->number,

PCI_DEVFN(PCI_SLOT(pdev->devfn), 1));
 
if (!drm->hdmi_device) {
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv1a.c 
b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv1a.c
index 3c6a871..8849b71 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv1a.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv1a.c
@@ -28,8 +28,16 @@
 {
struct pci_dev *bridge;
u32 mem, mib;
+   int domain = 0;
+   struct pci_dev *pdev = NULL;
 
-   bridge = pci_get_bus_and_slot(0, PCI_DEVFN(0, 1));
+   if (dev_is_pci(fb->subdev.device->dev))
+   pdev = to_pci_dev(fb->subdev.device->dev);
+
+   if (pdev)
+   domain = pci_domain_nr(pdev->bus);
+
+   bridge = pci_get_domain_bus_and_slot(domain, 0, PCI_DEVFN(0, 1));
if (!bridge) {
nvkm_error(&fb->subdev, "no bridge device\n");
return -ENODEV;
-- 
1.9.1

___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] GP10B regression

2017-11-30 Thread Anthony Eden
Tried the given patch on top of next-20171121. HDMI monitor is
connected, but I don't see any output. Here's a portion of my Xorg.log
(I installed xf86-video-nouveau-git):

[  1046.301] (II) NOUVEAU driver Date:   Tue Jun 13 09:23:42 2017 -0400
[  1046.301] (II) NOUVEAU driver for NVIDIA chipset families :
[  1046.302] (--) NOUVEAU(0): Chipset: "NVIDIA NV13B"
[  1046.302] (II) NOUVEAU(0): Creating default Display subsection in
Screen section
[  1046.302] (==) NOUVEAU(0): Depth 16, (--) framebuffer bpp 16
[  1046.302] (==) NOUVEAU(0): RGB weight 565
[  1046.302] (==) NOUVEAU(0): Default visual is TrueColor
[  1046.302] (==) NOUVEAU(0): Using HW cursor
[  1046.302] (==) NOUVEAU(0): Allowed maximum DRI level 2.
[  1046.302] (==) NOUVEAU(0): GLX sync to VBlank enabled.
[  1046.302] (==) NOUVEAU(0): Page flipping enabled
[  1046.302] (==) NOUVEAU(0): Swap limit set to 1 [Max allowed 2]
[  1046.302] (==) NOUVEAU(0): Page flipping synced to vblank by kernel.
[  1046.302] (WW) NOUVEAU(0): No outputs definitely connected, trying again...
[  1046.302] (WW) NOUVEAU(0): Unable to find connected outputs -
setting 1024x768 initial framebuffer
[  1046.302] (==) NOUVEAU(0): Using gamma correction (1.0, 1.0, 1.0)
[  1046.302] (--) NOUVEAU(0): Virtual size is 1024x768 (pitch 0)
[  1046.302] (**) NOUVEAU(0):  Mode "1024x768": 63.5 MHz (scaled from
0.0 MHz), 47.8 kHz, 59.9 Hz
[  1046.302] (II) NOUVEAU(0): Modeline "1024x768"x59.9   63.50  1024
1072 1176 1328  768 771 775 798 -hsync +vsync (47.8 kHz)
[  1046.302] (==) NOUVEAU(0): DPI set to (96, 96)
[  1046.506] (EE) NOUVEAU(0): Failed to allocate scratch buffer: -22
[  1046.506] (EE) NOUVEAU(0): Error initialising acceleration.
Falling back to NoAccel
[  1046.506] (**) NOUVEAU(0): [COPY] acceleration disabled
[  1046.708] (EE) NOUVEAU(0): Error allocating scanout buffer: 0

/etc/X11/xorg.conf.d/22-modules.conf contains:

Section "Module"
Load "exa"
Load "wfb"
Load "shadowfb"
Load "shadow"
Load "fb"
EndSection

/etc/X11/xorg.conf.d/99-nouveau.conf contains:

Section "Device"
Identifier "Nvidia card"
Driver "nouveau"
EndSection

full dmesg & xorg log are attached.

Thanks,
-Anthony

On Tue, Nov 21, 2017 at 1:07 PM, Mikko Perttunen  wrote:
> Thanks to Thierry for finding this - applying
>
> index e14643615698..00eeaaffeae5 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
> @@ -2369,7 +2369,7 @@ nv13b_chipset = {
> .imem = gk20a_instmem_new,
> .ltc = gp100_ltc_new,
> .mc = gp10b_mc_new,
> -   .mmu = gf100_mmu_new,
> +   .mmu = gp10b_mmu_new,
> .secboot = gp10b_secboot_new,
> .pmu = gm20b_pmu_new,
> .timer = gk20a_timer_new,
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp10b.c
> b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp10b.c
> index 3dcc6bddb32f..470a4fadc165 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp10b.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp10b.c
> @@ -33,7 +33,7 @@ gp10b_vmm = {
> { 38, &gp100_vmm_desc_16[3], NVKM_VMM_PAGE_Sxxx },
> { 29, &gp100_vmm_desc_16[2], NVKM_VMM_PAGE_Sxxx },
> { 21, &gp100_vmm_desc_16[1], NVKM_VMM_PAGE_SxHC },
> -   { 16, &gp100_vmm_desc_16[0], NVKM_VMM_PAGE_SxHC },
> +/* { 16, &gp100_vmm_desc_16[0], NVKM_VMM_PAGE_SxHC },*/
> { 12, &gp100_vmm_desc_12[0], NVKM_VMM_PAGE_SxHx },
> {}
> }
>
> on top of next-20171121 works at least for a simple test.
>
> Mikko
>
> On 11/11/2017 03:02 PM, Mikko Perttunen wrote:
>>
>> Bisection status report:
>>
>> The latest commit I have gotten to work is
>>
>> 10842ba074e9 drm/nouveau: remove unused nouveau_fence_work()
>>
>> i.e. the first bad commit is
>>
>> d7722134b825 drm/nouveau: switch over to new memory and vmm interfaces
>>
>> Even with the first one some patches/hacks are needed:
>>
>> - in mmu/gp10b.c, in the constructor we need to select the GM200 path -
>> the GP100 path seems to not to work
>>
>> - as mentioned in the first mail, we need to set .mmu = gp10b_mmu_new,
>>
>> - and in nouveau_mem_memory_target we need to return NVKM_MEM_TARGET_NCOH
>> instead of NVKM_MEM_TARGET_HOST.
>>
>> Cheers,
>> Mikko
>>
>> On 11/10/2017 11:27 PM, Mikko Perttunen wrote:
>>>
>>> Hello everyone,
>>>
>>> it seems that GP10B support has regressed recently. With linux-next, I
>>> need to modify device/base.c to set
>>>
>>>  .mmu = gp10b_mmu_new
>>>
>>> for GP10B (makes sense - I guess this was left as gf100_mmu_new as a
>>> typo) to probe. After that, running a trivial testcase (running a NOP method
>>> in 3D class) fails with
>>>
>>> [  110.084649] nouveau 1700.gpu: fifo: read fault at 011000
>>> engine 06 [HOST0] client 06 [GPC0/L1_2] reas|
>>> on 02 [PTE] on channel 1 [00f206a000 nouveau_noop_te[2413]]
>>> |
>>> [  110.101423] nouveau 1700.gpu: fifo: channel 1: killed
>>> |
>

[Nouveau] [PATCH V2 10/29] drm/nouveau: deprecate pci_get_bus_and_slot()

2017-11-30 Thread Sinan Kaya
pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as
where a PCI device is present. This restricts the device drivers to be
reused for other domain numbers.

Getting ready to remove pci_get_bus_and_slot() function in favor of
pci_get_domain_bus_and_slot().

Replace pci_get_bus_and_slot() with pci_get_domain_bus_and_slot()
and extract the domain number from
1. struct pci_dev
2. struct pci_dev through drm_device->pdev
3. struct pci_dev through fb->subdev->drm_device->pdev

Signed-off-by: Sinan Kaya 
---
 drivers/gpu/drm/nouveau/dispnv04/arb.c   |  4 +++-
 drivers/gpu/drm/nouveau/dispnv04/hw.c| 10 +++---
 drivers/gpu/drm/nouveau/nouveau_drm.c|  3 ++-
 drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv1a.c | 10 +-
 4 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv04/arb.c 
b/drivers/gpu/drm/nouveau/dispnv04/arb.c
index 90075b6..e7455f7 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/arb.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/arb.c
@@ -213,8 +213,10 @@ struct nv_sim_state {
if ((dev->pdev->device & 0x) == 0x01a0 /*CHIPSET_NFORCE*/ ||
(dev->pdev->device & 0x) == 0x01f0 /*CHIPSET_NFORCE2*/) {
uint32_t type;
+   u32 domain = pci_domain_nr(dev->pdev->bus);
 
-   pci_read_config_dword(pci_get_bus_and_slot(0, 1), 0x7c, &type);
+   pci_read_config_dword(pci_get_domain_bus_and_slot(domain, 0, 1),
+ 0x7c, &type);
 
sim_data.memory_type = (type >> 12) & 1;
sim_data.memory_width = 64;
diff --git a/drivers/gpu/drm/nouveau/dispnv04/hw.c 
b/drivers/gpu/drm/nouveau/dispnv04/hw.c
index b985990..8806b1b 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/hw.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/hw.c
@@ -216,12 +216,15 @@
 {
struct nvkm_pll_vals pllvals;
int ret;
+   u32 domain;
+
+   domain = pci_domain_nr(dev->pdev->bus);
 
if (plltype == PLL_MEMORY &&
(dev->pdev->device & 0x0ff0) == CHIPSET_NFORCE) {
uint32_t mpllP;
-
-   pci_read_config_dword(pci_get_bus_and_slot(0, 3), 0x6c, &mpllP);
+   pci_read_config_dword(pci_get_domain_bus_and_slot(domain, 0, 3),
+ 0x6c, &mpllP);
mpllP = (mpllP >> 8) & 0xf;
if (!mpllP)
mpllP = 4;
@@ -232,7 +235,8 @@
(dev->pdev->device & 0xff0) == CHIPSET_NFORCE2) {
uint32_t clock;
 
-   pci_read_config_dword(pci_get_bus_and_slot(0, 5), 0x4c, &clock);
+   pci_read_config_dword(pci_get_domain_bus_and_slot(domain, 0, 5),
+ 0x4c, &clock);
return clock / 1000;
}
 
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c 
b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 595630d..0b6c639 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -406,7 +406,8 @@ static int nouveau_drm_probe(struct pci_dev *pdev,
}
 
/* subfunction one is a hdmi audio device? */
-   drm->hdmi_device = pci_get_bus_and_slot((unsigned int)pdev->bus->number,
+   drm->hdmi_device = pci_get_domain_bus_and_slot(pci_domain_nr(pdev->bus),
+   (unsigned int)pdev->bus->number,

PCI_DEVFN(PCI_SLOT(pdev->devfn), 1));
 
if (!drm->hdmi_device) {
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv1a.c 
b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv1a.c
index 3c6a871..273a632 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv1a.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv1a.c
@@ -28,8 +28,16 @@
 {
struct pci_dev *bridge;
u32 mem, mib;
+   u32 domain = 0;
+   struct pci_dev *pdev = NULL;
 
-   bridge = pci_get_bus_and_slot(0, PCI_DEVFN(0, 1));
+   if (dev_is_pci(fb->subdev.device->dev))
+   pdev = to_pci_dev(fb->subdev.device->dev);
+
+   if (pdev)
+   domain = pci_domain_nr(pdev->bus);
+
+   bridge = pci_get_domain_bus_and_slot(domain, 0, PCI_DEVFN(0, 1));
if (!bridge) {
nvkm_error(&fb->subdev, "no bridge device\n");
return -ENODEV;
-- 
1.9.1

___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 100567] Nouveau system freeze fifo: SCHED_ERROR 0a [CTXSW_TIMEOUT]

2017-11-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=100567

--- Comment #11 from 988a...@mail.ru ---
Same problem on Linux Neon 4.10.0-40-generic
xserver-xorg-video-nouveau-hwe-16.04 - 1:1.0.14-0ubuntu1~16.04.1

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [PATCH] drm/nouveau/mmu: fix odd_ptr_err.cocci warnings

2017-11-30 Thread Christoph Böhmwalder
The kbuild test bot complained about a new coccinelle warning nearby,
which sparked a discussion about the assignment to 'memory' inside of
the conditional expression.  See Link below for the original post.

Fix the assignment to silence the coccinelle warning and also make the
code look a little nicer.

Link: https://lists.freedesktop.org/archives/nouveau/2017-November/029242.html
Signed-off-by: Christoph Böhmwalder 
---
 drm/nouveau/nvkm/subdev/mmu/uvmm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drm/nouveau/nvkm/subdev/mmu/uvmm.c 
b/drm/nouveau/nvkm/subdev/mmu/uvmm.c
index fa81d0c1..37b201b9 100644
--- a/drm/nouveau/nvkm/subdev/mmu/uvmm.c
+++ b/drm/nouveau/nvkm/subdev/mmu/uvmm.c
@@ -106,7 +106,8 @@ nvkm_uvmm_mthd_map(struct nvkm_uvmm *uvmm, void *argv, u32 
argc)
} else
return ret;
 
-   if (IS_ERR((memory = nvkm_umem_search(client, handle {
+   memory = nvkm_umem_search(client, handle);
+   if (IS_ERR(memory)) {
VMM_DEBUG(vmm, "memory %016llx %ld\n", handle, PTR_ERR(memory));
return PTR_ERR(memory);
}
-- 
2.13.6

___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] State of Video Decoding for Maxwell cards

2017-11-30 Thread Christoph Böhmwalder
On Thu, Nov 30, 2017 at 01:35:58PM +0100, Karol Herbst wrote:
> Well, you are most likely using the CPU for decoding here. Currently
> nobody is working on that, because this is quite a big and challenging
> project. We have an open project idea regarding this for EVoC and GSoC
> though:
> "Maxwell Accelerated Video Decoding" https://www.x.org/wiki/SummerOfCodeIdeas/

Thanks for the reply! I guess I'll just monitor the mailing list for
movement on that front then.

--
Regards,
Christoph
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] State of Video Decoding for Maxwell cards

2017-11-30 Thread Karol Herbst
Well, you are most likely using the CPU for decoding here. Currently
nobody is working on that, because this is quite a big and challenging
project. We have an open project idea regarding this for EVoC and GSoC
though:
"Maxwell Accelerated Video Decoding" https://www.x.org/wiki/SummerOfCodeIdeas/

On Thu, Nov 30, 2017 at 1:18 PM, Christoph Böhmwalder
 wrote:
> Hi Everyone,
>
> I have a Maxwell Card (GTX 970/NV 110) and would very much like to use
> nouveau to drive it.  The problem is that the performance -- especially
> when decoding high-resolution video -- seems to be relatively poor
> compared to the proprietary Nvidia driver.  I'm interested in Kernel
> Development and pretty much the only thing keeping me from tracking the
> upstream kernel (and using my distros relatively old 4.13.15 kernel
> instead) is the inability to play e.g. 4K YouTube videos using nouveau.
>
> Now I know that the Feature Matrix [1] specifies Video Decoding
> Acceleration for NV110+ cards as "TODO" (and all other 2D features as
> "WIP"), but it also says that the matrix is updated rarely and might
> thus be out of date.
>
> This is why I wanted to inquire here whether or not any active
> development is actually being done on this (quickly skimming the commit
> logs seems to indicate otherwise).  I'd just like to know whether or not
> it's even worth it for me to track the latest Git version of the kernel in
> order to watch out for performance improvements.
>
> Thanks for reading, I'm looking forward to your replies.
>
> [1] https://nouveau.freedesktop.org/wiki/FeatureMatrix/
>
> --
> Regards,
> Christoph
> ___
> Nouveau mailing list
> Nouveau@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] State of Video Decoding for Maxwell cards

2017-11-30 Thread Christoph Böhmwalder
Hi Everyone,

I have a Maxwell Card (GTX 970/NV 110) and would very much like to use
nouveau to drive it.  The problem is that the performance -- especially
when decoding high-resolution video -- seems to be relatively poor
compared to the proprietary Nvidia driver.  I'm interested in Kernel
Development and pretty much the only thing keeping me from tracking the
upstream kernel (and using my distros relatively old 4.13.15 kernel
instead) is the inability to play e.g. 4K YouTube videos using nouveau.

Now I know that the Feature Matrix [1] specifies Video Decoding
Acceleration for NV110+ cards as "TODO" (and all other 2D features as
"WIP"), but it also says that the matrix is updated rarely and might
thus be out of date.

This is why I wanted to inquire here whether or not any active
development is actually being done on this (quickly skimming the commit
logs seems to indicate otherwise).  I'd just like to know whether or not
it's even worth it for me to track the latest Git version of the kernel in
order to watch out for performance improvements.

Thanks for reading, I'm looking forward to your replies.

[1] https://nouveau.freedesktop.org/wiki/FeatureMatrix/

--
Regards,
Christoph
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau