diff mbox series

[v2,2/2] powerpc/configs: replace deprecated riva/nvidia with nouveau

Message ID 20200517220524.4036334-2-emil.l.velikov@gmail.com (mailing list archive)
State New, archived
Headers show
Series [v2,1/2] fbdev: annotate rivafb/nvidiafb as obsolete | expand

Commit Message

Emil Velikov May 17, 2020, 10:05 p.m. UTC
As mentioned in earlier commit, the riva and nvidia fbdev drivers have
seen no love over the years, are short on features and overall below par

Users are encouraged to switch to the nouveau drm driver instead.

v2: Split configs to separate patch, enable nouveau (Bartlomiej)

Cc: Antonino Daplas <adaplas@gmail.com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> (v1)
---
Hi all unless, there are objections I would prefer to merge this via
the drm tree.

Thanks
Emil
---
 arch/powerpc/configs/g5_defconfig     | 10 ++++++++--
 arch/powerpc/configs/pasemi_defconfig |  9 +++++++--
 arch/powerpc/configs/pmac32_defconfig |  9 +++++++--
 arch/powerpc/configs/ppc6xx_defconfig | 10 +++++++---
 4 files changed, 29 insertions(+), 9 deletions(-)

Comments

Benjamin Herrenschmidt May 18, 2020, 12:44 a.m. UTC | #1
On Sun, 2020-05-17 at 23:05 +0100, Emil Velikov wrote:
> As mentioned in earlier commit, the riva and nvidia fbdev drivers
> have
> seen no love over the years, are short on features and overall below
> par
> 
> Users are encouraged to switch to the nouveau drm driver instead.
> 
> v2: Split configs to separate patch, enable nouveau (Bartlomiej)

Back when I still had these things to play with (years ago) nouveau
didn't work properly on these ancient machines.

Cheers,
Ben.

> Cc: Antonino Daplas <adaplas@gmail.com>
> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> Cc: linux-fbdev@vger.kernel.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> (v1)
> ---
> Hi all unless, there are objections I would prefer to merge this via
> the drm tree.
> 
> Thanks
> Emil
> ---
>  arch/powerpc/configs/g5_defconfig     | 10 ++++++++--
>  arch/powerpc/configs/pasemi_defconfig |  9 +++++++--
>  arch/powerpc/configs/pmac32_defconfig |  9 +++++++--
>  arch/powerpc/configs/ppc6xx_defconfig | 10 +++++++---
>  4 files changed, 29 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/powerpc/configs/g5_defconfig
> b/arch/powerpc/configs/g5_defconfig
> index a68c7f3af10e..213472f373b3 100644
> --- a/arch/powerpc/configs/g5_defconfig
> +++ b/arch/powerpc/configs/g5_defconfig
> @@ -124,12 +124,18 @@ CONFIG_RAW_DRIVER=y
>  CONFIG_I2C_CHARDEV=y
>  CONFIG_AGP=m
>  CONFIG_AGP_UNINORTH=m
> +CONFIG_DRM=y
> +CONFIG_DRM_NOUVEAU=m
> +# CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT is not set
> +CONFIG_NOUVEAU_DEBUG=5
> +CONFIG_NOUVEAU_DEBUG_DEFAULT=3
> +# CONFIG_NOUVEAU_DEBUG_MMU is not set
> +CONFIG_DRM_NOUVEAU_BACKLIGHT=y
> +# CONFIG_DRM_NOUVEAU_SVM is not set
>  CONFIG_FB=y
>  CONFIG_FIRMWARE_EDID=y
>  CONFIG_FB_TILEBLITTING=y
>  CONFIG_FB_OF=y
> -CONFIG_FB_NVIDIA=y
> -CONFIG_FB_NVIDIA_I2C=y
>  CONFIG_FB_RADEON=y
>  # CONFIG_VGA_CONSOLE is not set
>  CONFIG_FRAMEBUFFER_CONSOLE=y
> diff --git a/arch/powerpc/configs/pasemi_defconfig
> b/arch/powerpc/configs/pasemi_defconfig
> index 08b7f4cef243..ccb3ab5e01da 100644
> --- a/arch/powerpc/configs/pasemi_defconfig
> +++ b/arch/powerpc/configs/pasemi_defconfig
> @@ -102,11 +102,16 @@ CONFIG_SENSORS_LM85=y
>  CONFIG_SENSORS_LM90=y
>  CONFIG_DRM=y
>  CONFIG_DRM_RADEON=y
> +CONFIG_DRM_NOUVEAU=m
> +# CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT is not set
> +CONFIG_NOUVEAU_DEBUG=5
> +CONFIG_NOUVEAU_DEBUG_DEFAULT=3
> +# CONFIG_NOUVEAU_DEBUG_MMU is not set
> +CONFIG_DRM_NOUVEAU_BACKLIGHT=y
> +# CONFIG_DRM_NOUVEAU_SVM is not set
>  CONFIG_FIRMWARE_EDID=y
>  CONFIG_FB_TILEBLITTING=y
>  CONFIG_FB_VGA16=y
> -CONFIG_FB_NVIDIA=y
> -CONFIG_FB_NVIDIA_I2C=y
>  CONFIG_FB_RADEON=y
>  # CONFIG_LCD_CLASS_DEVICE is not set
>  CONFIG_VGACON_SOFT_SCROLLBACK=y
> diff --git a/arch/powerpc/configs/pmac32_defconfig
> b/arch/powerpc/configs/pmac32_defconfig
> index 05e325ca3fbd..f858627385c8 100644
> --- a/arch/powerpc/configs/pmac32_defconfig
> +++ b/arch/powerpc/configs/pmac32_defconfig
> @@ -199,6 +199,13 @@ CONFIG_DRM=m
>  CONFIG_DRM_RADEON=m
>  CONFIG_DRM_LEGACY=y
>  CONFIG_DRM_R128=m
> +CONFIG_DRM_NOUVEAU=m
> +# CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT is not set
> +CONFIG_NOUVEAU_DEBUG=5
> +CONFIG_NOUVEAU_DEBUG_DEFAULT=3
> +# CONFIG_NOUVEAU_DEBUG_MMU is not set
> +CONFIG_DRM_NOUVEAU_BACKLIGHT=y
> +# CONFIG_DRM_NOUVEAU_SVM is not set
>  CONFIG_FB=y
>  CONFIG_FB_OF=y
>  CONFIG_FB_CONTROL=y
> @@ -206,8 +213,6 @@ CONFIG_FB_PLATINUM=y
>  CONFIG_FB_VALKYRIE=y
>  CONFIG_FB_CT65550=y
>  CONFIG_FB_IMSTT=y
> -CONFIG_FB_NVIDIA=y
> -CONFIG_FB_NVIDIA_I2C=y
>  CONFIG_FB_MATROX=y
>  CONFIG_FB_MATROX_MILLENIUM=y
>  CONFIG_FB_MATROX_MYSTIQUE=y
> diff --git a/arch/powerpc/configs/ppc6xx_defconfig
> b/arch/powerpc/configs/ppc6xx_defconfig
> index feb5d47d8d1e..48421f5007ed 100644
> --- a/arch/powerpc/configs/ppc6xx_defconfig
> +++ b/arch/powerpc/configs/ppc6xx_defconfig
> @@ -738,15 +738,19 @@ CONFIG_DRM_MGA=m
>  CONFIG_DRM_SIS=m
>  CONFIG_DRM_VIA=m
>  CONFIG_DRM_SAVAGE=m
> +CONFIG_DRM_NOUVEAU=m
> +# CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT is not set
> +CONFIG_NOUVEAU_DEBUG=5
> +CONFIG_NOUVEAU_DEBUG_DEFAULT=3
> +# CONFIG_NOUVEAU_DEBUG_MMU is not set
> +CONFIG_DRM_NOUVEAU_BACKLIGHT=y
> +# CONFIG_DRM_NOUVEAU_SVM is not set
>  CONFIG_FB=y
>  CONFIG_FB_CIRRUS=m
>  CONFIG_FB_OF=y
>  CONFIG_FB_PLATINUM=y
>  CONFIG_FB_VALKYRIE=y
>  CONFIG_FB_CT65550=y
> -CONFIG_FB_NVIDIA=y
> -CONFIG_FB_NVIDIA_I2C=y
> -CONFIG_FB_RIVA=m
>  CONFIG_FB_MATROX=y
>  CONFIG_FB_MATROX_MILLENIUM=y
>  CONFIG_FB_MATROX_MYSTIQUE=y
Michael Ellerman May 18, 2020, 7:30 a.m. UTC | #2
Emil Velikov <emil.l.velikov@gmail.com> writes:
> As mentioned in earlier commit, the riva and nvidia fbdev drivers have
> seen no love over the years, are short on features and overall below par
>
> Users are encouraged to switch to the nouveau drm driver instead.
>
> v2: Split configs to separate patch, enable nouveau (Bartlomiej)
>
> Cc: Antonino Daplas <adaplas@gmail.com>
> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> Cc: linux-fbdev@vger.kernel.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> (v1)
> ---
> Hi all unless, there are objections I would prefer to merge this via
> the drm tree.

Have you tested that the resulting kernels work on the relevant
hardware?

The old drivers may be crufty but they presumably have been tested by
people and at least somewhat work.

So I'd be inclined to leave the defconfigs alone until someone can test
that the new driver works at all.

I gave it a quick spin on a G5 I have access to and dmesg has a bunch of
errors in it (see below). I can't actually tell if the display is
working because the machine is remote, and I can't go and check it at
the moment because the office is closed.

cheers


[  128.563251] nouveau 0000:f0:10.0: NVIDIA NV34 (034900b1)
[  128.565720] nouveau 0000:f0:10.0: bios: version 04.34.20.18.00
[  128.570994] nouveau 0000:f0:10.0: bios: OOB 1 00000cdd 00000cdd
[  128.571702] nouveau 0000:f0:10.0: bios: OOB 1 00000ce1 00000ce1
[  128.571723] nouveau 0000:f0:10.0: bios: OOB 1 00000cde 00000cde
[  128.571731] nouveau 0000:f0:10.0: bios: OOB 1 00000cdf 00000cdf
[  128.572438] nouveau 0000:f0:10.0: bios: OOB 1 00000ce5 00000ce5
[  128.572459] nouveau 0000:f0:10.0: bios: OOB 1 00000ce2 00000ce2
[  128.572468] nouveau 0000:f0:10.0: bios: OOB 1 00000ce3 00000ce3
[  128.579187] nouveau 0000:f0:10.0: bios: OOB 1 00000ce9 00000ce9
[  128.579210] nouveau 0000:f0:10.0: bios: OOB 1 00000ce6 00000ce6
[  128.579219] nouveau 0000:f0:10.0: bios: OOB 1 00000ce7 00000ce7
[  128.580230] nouveau 0000:f0:10.0: bios: OOB 1 00000ced 00000ced
[  128.580252] nouveau 0000:f0:10.0: bios: OOB 1 00000cea 00000cea
[  128.580261] nouveau 0000:f0:10.0: bios: OOB 1 00000ceb 00000ceb
[  128.581543] nouveau 0000:f0:10.0: bios: OOB 1 00000cf1 00000cf1
[  128.581567] nouveau 0000:f0:10.0: bios: OOB 1 00000cee 00000cee
[  128.581576] nouveau 0000:f0:10.0: bios: OOB 1 00000cef 00000cef
[  128.582456] nouveau 0000:f0:10.0: bios: OOB 1 00000cf5 00000cf5
[  128.582479] nouveau 0000:f0:10.0: bios: OOB 1 00000cf2 00000cf2
[  128.582487] nouveau 0000:f0:10.0: bios: OOB 1 00000cf3 00000cf3
[  128.583314] nouveau 0000:f0:10.0: bios: OOB 1 00000cf9 00000cf9
[  128.583336] nouveau 0000:f0:10.0: bios: OOB 1 00000cf6 00000cf6
[  128.583344] nouveau 0000:f0:10.0: bios: OOB 1 00000cf7 00000cf7
[  128.584186] nouveau 0000:f0:10.0: bios: OOB 1 00000cfd 00000cfd
[  128.584208] nouveau 0000:f0:10.0: bios: OOB 1 00000cfa 00000cfa
[  128.584217] nouveau 0000:f0:10.0: bios: OOB 1 00000cfb 00000cfb
[  128.585635] nouveau 0000:f0:10.0: bios: OOB 1 00000d01 00000d01
[  128.585658] nouveau 0000:f0:10.0: bios: OOB 1 00000cfe 00000cfe
[  128.585666] nouveau 0000:f0:10.0: bios: OOB 1 00000cff 00000cff
[  128.589405] nouveau 0000:f0:10.0: bios: OOB 1 00000d05 00000d05
[  128.589428] nouveau 0000:f0:10.0: bios: OOB 1 00000d02 00000d02
[  128.589436] nouveau 0000:f0:10.0: bios: OOB 1 00000d03 00000d03
[  128.590316] nouveau 0000:f0:10.0: bios: OOB 1 00000d09 00000d09
[  128.590338] nouveau 0000:f0:10.0: bios: OOB 1 00000d06 00000d06
[  128.590346] nouveau 0000:f0:10.0: bios: OOB 1 00000d07 00000d07
[  128.591173] nouveau 0000:f0:10.0: bios: OOB 1 00000d0d 00000d0d
[  128.591196] nouveau 0000:f0:10.0: bios: OOB 1 00000d0a 00000d0a
[  128.591205] nouveau 0000:f0:10.0: bios: OOB 1 00000d0b 00000d0b
[  128.593513] nouveau 0000:f0:10.0: tmr: unknown input clock freq
[  128.595886] nouveau 0000:f0:10.0: fb: 64 MiB DDR1
[  128.609034] [TTM] Zone  kernel: Available graphics memory: 500010 KiB
[  128.609058] [TTM] Initializing pool allocator
[  128.609106] nouveau 0000:f0:10.0: DRM: VRAM: 63 MiB
[  128.609115] nouveau 0000:f0:10.0: DRM: GART: 128 MiB
[  128.609134] nouveau 0000:f0:10.0: DRM: BMP version 5.38
[  128.609144] nouveau 0000:f0:10.0: DRM: DCB version 2.2
[  128.609155] nouveau 0000:f0:10.0: DRM: DCB outp 00: 01000122 00000004
[  128.609168] nouveau 0000:f0:10.0: DRM: DCB outp 01: 02010200 11b088b8
[  128.609177] nouveau 0000:f0:10.0: DRM: DCB outp 02: 02010201 11b00703
[  128.609222] nouveau 0000:f0:10.0: DRM: Loading NV17 power sequencing microcode
[  128.610947] nouveau 0000:f0:10.0: DRM: MM: using M2MF for buffer copies
[  128.613371] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[  128.615065] nouveau 0000:f0:10.0: DRM: Setting dpms mode 3 on TV encoder (output 2)
[  128.707050] nouveau 0000:f0:10.0: TV-1: EDID is invalid:
[  128.707075]  [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[  128.707083]  [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[  128.707091]  [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[  128.707099]  [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[  128.707106]  [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[  128.707114]  [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[  128.707121]  [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[  128.707129]  [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[  128.707144] nouveau 0000:f0:10.0: DRM: DDC responded, but no EDID for TV-1
[  128.750558] nouveau 0000:f0:10.0: DRM: allocated 1440x900 fb: 0x9000, bo 000000002677d038
[  128.825341] nouveau 0000:f0:10.0: DRM: DDC responded, but no EDID for TV-1
[  128.885351] nouveau 0000:f0:10.0: DRM: Pixel clock comparison table not found
[  128.905884] Console: switching to colour frame buffer device 180x56
[  128.907251] nouveau 0000:f0:10.0: fb0: nouveaudrmfb frame buffer device
[  128.911832] [drm] Initialized nouveau 1.3.1 20120801 for 0000:f0:10.0 on minor 0
[  129.168778] nouveau 0000:f0:10.0: DRM: DDC responded, but no EDID for TV-1
[  131.014692] Adding 2947556k swap on /dev/sda4.  Priority:-2 extents:1 across:2947556k 
[  133.501059] sungem_phy: PHY ID: 4061e4, addr: 0
[  133.502214] gem 0001:03:0f.0 eth0: Found BCM5221 PHY
[  135.940863] gem 0001:03:0f.0 eth0: Link is up at 100 Mbps, full-duplex
[  135.941181] gem 0001:03:0f.0 eth0: Pause is disabled
[  136.224079] nouveau 0000:f0:10.0: DRM: DDC responded, but no EDID for TV-1
[  136.297015] nouveau 0000:f0:10.0: DRM: DDC responded, but no EDID for TV-1
[  139.465278] nouveau 0000:f0:10.0: DRM: Pixel clock comparison table not found
Emil Velikov May 18, 2020, 11 a.m. UTC | #3
Hi Benjamin,

On Mon, 18 May 2020 at 01:45, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
>
> On Sun, 2020-05-17 at 23:05 +0100, Emil Velikov wrote:
> > As mentioned in earlier commit, the riva and nvidia fbdev drivers
> > have
> > seen no love over the years, are short on features and overall below
> > par
> >
> > Users are encouraged to switch to the nouveau drm driver instead.
> >
> > v2: Split configs to separate patch, enable nouveau (Bartlomiej)
>
> Back when I still had these things to play with (years ago) nouveau
> didn't work properly on these ancient machines.
>
I believe you reported issues due to different page size for the CPU/GPU.
Have you tried nouveau recently, there has been a handful of patches
on the topic since your report.

Alternatively, it would make sense you rebase, cleanup and merge your patch.

-Emil
Emil Velikov May 18, 2020, 11:19 a.m. UTC | #4
Hi Michael,

On Mon, 18 May 2020 at 08:30, Michael Ellerman <mpe@ellerman.id.au> wrote:
>
> Emil Velikov <emil.l.velikov@gmail.com> writes:
> > As mentioned in earlier commit, the riva and nvidia fbdev drivers have
> > seen no love over the years, are short on features and overall below par
> >
> > Users are encouraged to switch to the nouveau drm driver instead.
> >
> > v2: Split configs to separate patch, enable nouveau (Bartlomiej)
> >
> > Cc: Antonino Daplas <adaplas@gmail.com>
> > Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> > Cc: linux-fbdev@vger.kernel.org
> > Cc: dri-devel@lists.freedesktop.org
> > Cc: Michael Ellerman <mpe@ellerman.id.au>
> > Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > Cc: Paul Mackerras <paulus@samba.org>
> > Cc: linuxppc-dev@lists.ozlabs.org
> > Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
> > Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> (v1)
> > ---
> > Hi all unless, there are objections I would prefer to merge this via
> > the drm tree.
>
> Have you tested that the resulting kernels work on the relevant
> hardware?
>
Sadly, no I haven't. I'm updating the defconfigs as requested by the
fbdev maintainer.

> The old drivers may be crufty but they presumably have been tested by
> people and at least somewhat work.
>
> So I'd be inclined to leave the defconfigs alone until someone can test
> that the new driver works at all.
>
Works for me.

> I gave it a quick spin on a G5 I have access to and dmesg has a bunch of
> errors in it (see below). I can't actually tell if the display is
> working because the machine is remote, and I can't go and check it at
> the moment because the office is closed.
>

From what I can see, there seems to be three bits:
 - attempted out-of-bound attempts to read the vbios
Genuine concern or noise? Likely using the bios from open firmware,
check any of the other options - see NvBios in [1]
 - cannot figure out the timer input frequency
No idea
 - the TV1 EDID is empty
Is there an actual TV connected to the device, check with another cable

Regardless of the patches, reporting [2] the above would be a nice move.

Thanks
Emil
[1] https://nouveau.freedesktop.org/wiki/KernelModuleParameters/
[2] https://gitlab.freedesktop.org/xorg/driver/xf86-video-nouveau/-/issues
Benjamin Herrenschmidt May 18, 2020, 12:39 p.m. UTC | #5
On Mon, 2020-05-18 at 12:00 +0100, Emil Velikov wrote:
> I believe you reported issues due to different page size for the CPU/GPU.
> Have you tried nouveau recently, there has been a handful of patches
> on the topic since your report.
> 
> Alternatively, it would make sense you rebase, cleanup and merge your patch.

That was a problem for the G5s. There were other issues for more
ancient machines with older nVidia GPUs. Additionally a lot of those
Apple machines don't have a BIOS ROM to get the various tables from.

At this stage unfortunately I don't have access to most of that HW to
test with anymore. I do have one G5 I might be able to dig out of my
basement this week to try out.

In any case, digging out that patch should be useful as powerpc64 is
still 64k pages :)

Cheers,
Ben.
Benjamin Herrenschmidt May 18, 2020, 12:46 p.m. UTC | #6
On Mon, 2020-05-18 at 12:19 +0100, Emil Velikov wrote:
> 
>  - attempted out-of-bound attempts to read the vbios

So on these things, the actual ROM doesn't contain what you want, but
the device-tree has a property "NVDA,BMP" that contains some kind of
mini-BIOS (around 2.4KB) which should contain the necessary tables the
driver is looking for.

I think nouveau has code to find these in nvkm/subdev/bios/shadowof.c,
so at least that should have been working, but maybe some
debugging/instrumentation would be useful there.

> Genuine concern or noise? Likely using the bios from open firmware,
> check any of the other options - see NvBios in [1]
>  - cannot figure out the timer input frequency
> No idea
>  - the TV1 EDID is empty
> Is there an actual TV connected to the device, check with another cable

Probaby not.

> Regardless of the patches, reporting [2] the above would be a nice move.
> 
> Thanks
> Emil
> [1] https://nouveau.freedesktop.org/wiki/KernelModuleParameters/
> [2] https://gitlab.freedesktop.org/xorg/driver/xf86-video-nouveau/-/issues
Bartlomiej Zolnierkiewicz May 18, 2020, 12:48 p.m. UTC | #7
On 5/18/20 1:19 PM, Emil Velikov wrote:
> Hi Michael,
> 
> On Mon, 18 May 2020 at 08:30, Michael Ellerman <mpe@ellerman.id.au> wrote:
>>
>> Emil Velikov <emil.l.velikov@gmail.com> writes:
>>> As mentioned in earlier commit, the riva and nvidia fbdev drivers have
>>> seen no love over the years, are short on features and overall below par
>>>
>>> Users are encouraged to switch to the nouveau drm driver instead.
>>>
>>> v2: Split configs to separate patch, enable nouveau (Bartlomiej)
>>>
>>> Cc: Antonino Daplas <adaplas@gmail.com>
>>> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
>>> Cc: linux-fbdev@vger.kernel.org
>>> Cc: dri-devel@lists.freedesktop.org
>>> Cc: Michael Ellerman <mpe@ellerman.id.au>
>>> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>>> Cc: Paul Mackerras <paulus@samba.org>
>>> Cc: linuxppc-dev@lists.ozlabs.org
>>> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
>>> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> (v1)
>>> ---
>>> Hi all unless, there are objections I would prefer to merge this via
>>> the drm tree.
>>
>> Have you tested that the resulting kernels work on the relevant
>> hardware?
>>
> Sadly, no I haven't. I'm updating the defconfigs as requested by the
> fbdev maintainer.

I've just noticed that v1 (patch #1/1) & v2 (patch #1/2) lack
Cc: to powerpc Maintainers so they cannot see the context of
changes in this patch.

Also you've proposed v1 yourself and it has already contained
modifications to defconfigs (removal of setting the config
options for the old drivers) in addition to marking the old
drivers as BROKEN.

It now turns out that v1 has also never been tested. :(

Please don't submit untested patches without marking them
as such.

>> The old drivers may be crufty but they presumably have been tested by
>> people and at least somewhat work.
>>
>> So I'd be inclined to leave the defconfigs alone until someone can test
>> that the new driver works at all.

@Michael:

Fully agreed. I would also like you to review/ack patch #1/2:

https://lore.kernel.org/dri-devel/20200517220524.4036334-1-emil.l.velikov@gmail.com/

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

> Works for me.
> 
>> I gave it a quick spin on a G5 I have access to and dmesg has a bunch of
>> errors in it (see below). I can't actually tell if the display is
>> working because the machine is remote, and I can't go and check it at
>> the moment because the office is closed.
>>
> 
>>From what I can see, there seems to be three bits:
>  - attempted out-of-bound attempts to read the vbios
> Genuine concern or noise? Likely using the bios from open firmware,
> check any of the other options - see NvBios in [1]
>  - cannot figure out the timer input frequency
> No idea
>  - the TV1 EDID is empty
> Is there an actual TV connected to the device, check with another cable
> 
> Regardless of the patches, reporting [2] the above would be a nice move.
> 
> Thanks
> Emil
> [1] https://protect2.fireeye.com/url?k=d6cf7004-8b548c67-d6cefb4b-0cc47a31cdbc-7c3b251c170ed483&q=1&u=https%3A%2F%2Fnouveau.freedesktop.org%2Fwiki%2FKernelModuleParameters%2F
> [2] https://gitlab.freedesktop.org/xorg/driver/xf86-video-nouveau/-/issues
Emil Velikov May 18, 2020, 1:19 p.m. UTC | #8
On Mon, 18 May 2020 at 13:48, Bartlomiej Zolnierkiewicz
<b.zolnierkie@samsung.com> wrote:
>
>
> On 5/18/20 1:19 PM, Emil Velikov wrote:
> > Hi Michael,
> >
> > On Mon, 18 May 2020 at 08:30, Michael Ellerman <mpe@ellerman.id.au> wrote:
> >>
> >> Emil Velikov <emil.l.velikov@gmail.com> writes:
> >>> As mentioned in earlier commit, the riva and nvidia fbdev drivers have
> >>> seen no love over the years, are short on features and overall below par
> >>>
> >>> Users are encouraged to switch to the nouveau drm driver instead.
> >>>
> >>> v2: Split configs to separate patch, enable nouveau (Bartlomiej)
> >>>
> >>> Cc: Antonino Daplas <adaplas@gmail.com>
> >>> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> >>> Cc: linux-fbdev@vger.kernel.org
> >>> Cc: dri-devel@lists.freedesktop.org
> >>> Cc: Michael Ellerman <mpe@ellerman.id.au>
> >>> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> >>> Cc: Paul Mackerras <paulus@samba.org>
> >>> Cc: linuxppc-dev@lists.ozlabs.org
> >>> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
> >>> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> (v1)
> >>> ---
> >>> Hi all unless, there are objections I would prefer to merge this via
> >>> the drm tree.
> >>
> >> Have you tested that the resulting kernels work on the relevant
> >> hardware?
> >>
> > Sadly, no I haven't. I'm updating the defconfigs as requested by the
> > fbdev maintainer.
>
> I've just noticed that v1 (patch #1/1) & v2 (patch #1/2) lack
> Cc: to powerpc Maintainers so they cannot see the context of
> changes in this patch.
>
Haven't see any instances of fbdev/drm patches being Cc to arch/ developers.
As such I made sure the commit message illustrates 1/2 as clearly as possible.

> Also you've proposed v1 yourself and it has already contained
> modifications to defconfigs (removal of setting the config
> options for the old drivers) in addition to marking the old
> drivers as BROKEN.
>
> It now turns out that v1 has also never been tested. :(
>
> Please don't submit untested patches without marking them
> as such.
>
Does x86 box with nv34 GPU count as testing? I suspect not :-(
It was been using nouveau ever since I bought it 15+ years ago.

Will be more careful in the future.

-Emil
Andreas Schwab May 18, 2020, 1:48 p.m. UTC | #9
On Mai 18 2020, Michael Ellerman wrote:

> The old drivers may be crufty but they presumably have been tested by
> people and at least somewhat work.

I can confirm that the nvidia fbdev driver is working perfectly fine.

> I gave it a quick spin on a G5 I have access to and dmesg has a bunch of
> errors in it (see below). I can't actually tell if the display is
> working because the machine is remote, and I can't go and check it at
> the moment because the office is closed.

The nouveau driver is completely borked.

[    2.299204] nouveau 0000:f0:10.0: NVIDIA NV34 (034100a2)
[    2.363100] nouveau 0000:f0:10.0: bios: version 04.34.20.19.00
[    2.363273] nouveau 0000:f0:10.0: bios: OOB 1 00000962 00000962
[    2.363323] nouveau 0000:f0:10.0: bios: OOB 1 00000966 00000966
[    2.363332] nouveau 0000:f0:10.0: bios: OOB 1 00000963 00000963
[    2.363341] nouveau 0000:f0:10.0: bios: OOB 1 00000964 00000964
[    2.363387] nouveau 0000:f0:10.0: bios: OOB 1 0000096a 0000096a
[    2.363396] nouveau 0000:f0:10.0: bios: OOB 1 00000967 00000967
[    2.363405] nouveau 0000:f0:10.0: bios: OOB 1 00000968 00000968
[    2.363453] nouveau 0000:f0:10.0: bios: OOB 1 0000096e 0000096e
[    2.363462] nouveau 0000:f0:10.0: bios: OOB 1 0000096b 0000096b
[    2.363471] nouveau 0000:f0:10.0: bios: OOB 1 0000096c 0000096c
[    2.363516] nouveau 0000:f0:10.0: bios: OOB 1 00000972 00000972
[    2.363526] nouveau 0000:f0:10.0: bios: OOB 1 0000096f 0000096f
[    2.363534] nouveau 0000:f0:10.0: bios: OOB 1 00000970 00000970
[    2.363580] nouveau 0000:f0:10.0: bios: OOB 1 00000976 00000976
[    2.363589] nouveau 0000:f0:10.0: bios: OOB 1 00000973 00000973
[    2.363597] nouveau 0000:f0:10.0: bios: OOB 1 00000974 00000974
[    2.363643] nouveau 0000:f0:10.0: bios: OOB 1 0000097a 0000097a
[    2.363652] nouveau 0000:f0:10.0: bios: OOB 1 00000977 00000977
[    2.363661] nouveau 0000:f0:10.0: bios: OOB 1 00000978 00000978
[    2.363709] nouveau 0000:f0:10.0: bios: OOB 1 0000097e 0000097e
[    2.363718] nouveau 0000:f0:10.0: bios: OOB 1 0000097b 0000097b
[    2.363727] nouveau 0000:f0:10.0: bios: OOB 1 0000097c 0000097c
[    2.363772] nouveau 0000:f0:10.0: bios: OOB 1 00000982 00000982
[    2.363781] nouveau 0000:f0:10.0: bios: OOB 1 0000097f 0000097f
[    2.363790] nouveau 0000:f0:10.0: bios: OOB 1 00000980 00000980
[    2.363836] nouveau 0000:f0:10.0: bios: OOB 1 00000986 00000986
[    2.363845] nouveau 0000:f0:10.0: bios: OOB 1 00000983 00000983
[    2.363854] nouveau 0000:f0:10.0: bios: OOB 1 00000984 00000984
[    2.363900] nouveau 0000:f0:10.0: bios: OOB 1 0000098a 0000098a
[    2.363909] nouveau 0000:f0:10.0: bios: OOB 1 00000987 00000987
[    2.363918] nouveau 0000:f0:10.0: bios: OOB 1 00000988 00000988
[    2.363965] nouveau 0000:f0:10.0: bios: OOB 1 0000098e 0000098e
[    2.363974] nouveau 0000:f0:10.0: bios: OOB 1 0000098b 0000098b
[    2.363983] nouveau 0000:f0:10.0: bios: OOB 1 0000098c 0000098c
[    2.364029] nouveau 0000:f0:10.0: bios: OOB 1 00000992 00000992
[    2.364038] nouveau 0000:f0:10.0: bios: OOB 1 0000098f 0000098f
[    2.364047] nouveau 0000:f0:10.0: bios: OOB 1 00000990 00000990
[    2.364383] nouveau 0000:f0:10.0: gpio: GPU is missing power, check its power cables.  Boot with nouveau.config=NvPowerChecks=0 to disable.
[    2.364402] nouveau 0000:f0:10.0: gpio: init failed, -22
[    2.364431] nouveau 0000:f0:10.0: init failed with -22
[    2.364438] nouveau: DRM-master:00000000:00000080: init failed with -22
[    2.364450] nouveau 0000:f0:10.0: DRM-master: Device allocation failed: -22
[    2.365268] nouveau: probe of 0000:f0:10.0 failed with error -22

Andreas.
diff mbox series

Patch

diff --git a/arch/powerpc/configs/g5_defconfig b/arch/powerpc/configs/g5_defconfig
index a68c7f3af10e..213472f373b3 100644
--- a/arch/powerpc/configs/g5_defconfig
+++ b/arch/powerpc/configs/g5_defconfig
@@ -124,12 +124,18 @@  CONFIG_RAW_DRIVER=y
 CONFIG_I2C_CHARDEV=y
 CONFIG_AGP=m
 CONFIG_AGP_UNINORTH=m
+CONFIG_DRM=y
+CONFIG_DRM_NOUVEAU=m
+# CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT is not set
+CONFIG_NOUVEAU_DEBUG=5
+CONFIG_NOUVEAU_DEBUG_DEFAULT=3
+# CONFIG_NOUVEAU_DEBUG_MMU is not set
+CONFIG_DRM_NOUVEAU_BACKLIGHT=y
+# CONFIG_DRM_NOUVEAU_SVM is not set
 CONFIG_FB=y
 CONFIG_FIRMWARE_EDID=y
 CONFIG_FB_TILEBLITTING=y
 CONFIG_FB_OF=y
-CONFIG_FB_NVIDIA=y
-CONFIG_FB_NVIDIA_I2C=y
 CONFIG_FB_RADEON=y
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_FRAMEBUFFER_CONSOLE=y
diff --git a/arch/powerpc/configs/pasemi_defconfig b/arch/powerpc/configs/pasemi_defconfig
index 08b7f4cef243..ccb3ab5e01da 100644
--- a/arch/powerpc/configs/pasemi_defconfig
+++ b/arch/powerpc/configs/pasemi_defconfig
@@ -102,11 +102,16 @@  CONFIG_SENSORS_LM85=y
 CONFIG_SENSORS_LM90=y
 CONFIG_DRM=y
 CONFIG_DRM_RADEON=y
+CONFIG_DRM_NOUVEAU=m
+# CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT is not set
+CONFIG_NOUVEAU_DEBUG=5
+CONFIG_NOUVEAU_DEBUG_DEFAULT=3
+# CONFIG_NOUVEAU_DEBUG_MMU is not set
+CONFIG_DRM_NOUVEAU_BACKLIGHT=y
+# CONFIG_DRM_NOUVEAU_SVM is not set
 CONFIG_FIRMWARE_EDID=y
 CONFIG_FB_TILEBLITTING=y
 CONFIG_FB_VGA16=y
-CONFIG_FB_NVIDIA=y
-CONFIG_FB_NVIDIA_I2C=y
 CONFIG_FB_RADEON=y
 # CONFIG_LCD_CLASS_DEVICE is not set
 CONFIG_VGACON_SOFT_SCROLLBACK=y
diff --git a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/pmac32_defconfig
index 05e325ca3fbd..f858627385c8 100644
--- a/arch/powerpc/configs/pmac32_defconfig
+++ b/arch/powerpc/configs/pmac32_defconfig
@@ -199,6 +199,13 @@  CONFIG_DRM=m
 CONFIG_DRM_RADEON=m
 CONFIG_DRM_LEGACY=y
 CONFIG_DRM_R128=m
+CONFIG_DRM_NOUVEAU=m
+# CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT is not set
+CONFIG_NOUVEAU_DEBUG=5
+CONFIG_NOUVEAU_DEBUG_DEFAULT=3
+# CONFIG_NOUVEAU_DEBUG_MMU is not set
+CONFIG_DRM_NOUVEAU_BACKLIGHT=y
+# CONFIG_DRM_NOUVEAU_SVM is not set
 CONFIG_FB=y
 CONFIG_FB_OF=y
 CONFIG_FB_CONTROL=y
@@ -206,8 +213,6 @@  CONFIG_FB_PLATINUM=y
 CONFIG_FB_VALKYRIE=y
 CONFIG_FB_CT65550=y
 CONFIG_FB_IMSTT=y
-CONFIG_FB_NVIDIA=y
-CONFIG_FB_NVIDIA_I2C=y
 CONFIG_FB_MATROX=y
 CONFIG_FB_MATROX_MILLENIUM=y
 CONFIG_FB_MATROX_MYSTIQUE=y
diff --git a/arch/powerpc/configs/ppc6xx_defconfig b/arch/powerpc/configs/ppc6xx_defconfig
index feb5d47d8d1e..48421f5007ed 100644
--- a/arch/powerpc/configs/ppc6xx_defconfig
+++ b/arch/powerpc/configs/ppc6xx_defconfig
@@ -738,15 +738,19 @@  CONFIG_DRM_MGA=m
 CONFIG_DRM_SIS=m
 CONFIG_DRM_VIA=m
 CONFIG_DRM_SAVAGE=m
+CONFIG_DRM_NOUVEAU=m
+# CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT is not set
+CONFIG_NOUVEAU_DEBUG=5
+CONFIG_NOUVEAU_DEBUG_DEFAULT=3
+# CONFIG_NOUVEAU_DEBUG_MMU is not set
+CONFIG_DRM_NOUVEAU_BACKLIGHT=y
+# CONFIG_DRM_NOUVEAU_SVM is not set
 CONFIG_FB=y
 CONFIG_FB_CIRRUS=m
 CONFIG_FB_OF=y
 CONFIG_FB_PLATINUM=y
 CONFIG_FB_VALKYRIE=y
 CONFIG_FB_CT65550=y
-CONFIG_FB_NVIDIA=y
-CONFIG_FB_NVIDIA_I2C=y
-CONFIG_FB_RIVA=m
 CONFIG_FB_MATROX=y
 CONFIG_FB_MATROX_MILLENIUM=y
 CONFIG_FB_MATROX_MYSTIQUE=y