[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 06/11] FSF: hardware: graphics-card: Nvidia: Warn about no
From: |
Denis 'GNUtoo' Carikli |
Subject: |
Re: [PATCH v1 06/11] FSF: hardware: graphics-card: Nvidia: Warn about nonfree software. |
Date: |
Thu, 7 Nov 2024 23:23:57 +0100 |
Hi,
On Tue, 5 Nov 2024 15:14:28 +0100
Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> wrote:
> -<https://nouveau.freedesktop.org/CodeNames.html>
> +Nvidia graphics card or chip require nonfree software to work:
> +
> + * If the display works during the boot (in GRUB for instance) it
> + means that the boot software (the BIOS/UEFI, etc) ran the nonfree
> + video BIOS that is stored on a memory chip inside the graphic
> card. +
> + * The nvidia driver need to load and run some bytecode that is also
> + stored somewhere in the memory chip of the graphic card.
> +
> +Beside the video BIOS issue, another question is if these cards works
> +in free distros.
After some discussion on the topic with neox, the second bullet point
may not be true 100% of the time: we didn't verify yet that the driver
code that loads and run this nonfree code runs in all the cases (it
might only run on laptops for instance).
So I propose the following instead:
> -<https://nouveau.freedesktop.org/CodeNames.html>
> +Nvidia graphics card often uses nonfree software to work: If the
> +display works during the boot (in GRUB for instance) it means that
> the +boot software (the BIOS/UEFI, etc) ran the nonfree video BIOS
> that is +stored on a memory chip inside the graphic card.
> +
> +The nouveau driver also has code that loads and run some nonfree code
> +that is stored inside the same memory chip inside the graphic card.
> We +don't know yet the precise conditions in which this code is run
> +(someone would need to do very simple modifications to the driver to
> +find out and review a bit the driver code) so we don't know yet if
> +it's possible to use these GPU with 100% free software or not
> +(assuming the boot software is configured not to run the nonfree
> video +BIOS).
> +
> +Beside these two issues, another question is if these cards works in
> +free distros.
> +
> +See <https://nouveau.freedesktop.org/CodeNames.html> for how to
> +identify the family of an Nvidia card.
For the people interested I've added more details on the second issue
below.
More details on the issue (optional):
-------------------------------------
In the nouveau driver we have this code in
drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c :
> int
> nvbios_exec(struct nvbios_init *init)
> {
> struct nvkm_bios *bios = init->subdev->device->bios;
>
> init->nested++;
> while (init->offset) {
> u8 opcode = nvbios_rd08(bios, init->offset);
> if (opcode >= ARRAY_SIZE(init_opcode) ||
> !init_opcode[opcode].exec) {
> error("unknown opcode 0x%02x\n", opcode);
> return -EINVAL;
> }
>
> init_opcode[opcode].exec(init);
> }
> init->nested--;
> return 0;
> }
The nonfree instructions (opcodes) come from a zone inside the video
BIOS.
Inside nouveau we have the following function
calls: run_digital_op_script -> nouveau_bios_run_init_table ->
nvbios_init (drivers/gpu/drm/nouveau/dispnv04/disp.h) -> nvbios_exec
(nvkm/subdev/bios/init.c)
The run_digital_op_script is however called in 3 functions:
call_lvds_manufacturer_script, run_lvds_table and run_tmds_table.
LVDS is a display connector like HDMI or VGA that is found in laptops
(it's for the internal screen). TMDS seems somewhat similar to LVDS but
I never heard of it before so I've no idea if it's used in laptops or
not or if it's a synonym to HDMI or DVI in this context.
So the nonfree code most probably run on laptops but we have no
idea if it also runs with a KGPE-D16 and a GPU card. Someone needs to
replace the nvbios_exec function with prints and see if it works fine,
or if the function is called.
If these card can work without nonfree software, it would remove a huge
limitation of 100% free software as we would be able to build desktop
computers that run 100% free software and that are not limited to
server use cases or limited desktop usage (no multi-display).
Though without a free replacement for the video BIOS this would still be
extremely inconvenient to use on mainboards that don't already have
builtin display controller like the KGPE-D16.
In the case of the KGPE-D16 both the builtin display controller and
the nouveau GPU card can be wired to a display with multiple inputs
(like VGA and HDMI) for a very convenient that allows to see why the
computer isn't booting.
Denis.
pgp8tOa7t2k8r.pgp
Description: OpenPGP digital signature
- [PATCH v1 00/11] FSF sysadmin wiki patches for GPUs, Denis 'GNUtoo' Carikli, 2024/11/07
- [PATCH v1 06/11] FSF: hardware: graphics-card: Nvidia: Warn about nonfree software., Denis 'GNUtoo' Carikli, 2024/11/07
- Re: [PATCH v1 06/11] FSF: hardware: graphics-card: Nvidia: Warn about nonfree software.,
Denis 'GNUtoo' Carikli <=
- [PATCH v1 08/11] FSF: hardware: graphics-card: Add section about other card vendors., Denis 'GNUtoo' Carikli, 2024/11/07
- [PATCH v1 10/11] FSF: hardware: disable option roms: improve flashrom commands., Denis 'GNUtoo' Carikli, 2024/11/07
- [PATCH v1 02/11] FSF: explain how to test contributions., Denis 'GNUtoo' Carikli, 2024/11/07
- [PATCH v1 01/11] FSF: clarify how to contribute., Denis 'GNUtoo' Carikli, 2024/11/07
- [PATCH v1 04/11] FSF: hardware: graphics-card: Intel: Update and clarify., Denis 'GNUtoo' Carikli, 2024/11/07
- [PATCH v1 03/11] FSF: hardware: graphics-card: Intel: fix typo., Denis 'GNUtoo' Carikli, 2024/11/07
- [PATCH v1 05/11] FSF: hardware: graphics-card: Update AMD status., Denis 'GNUtoo' Carikli, 2024/11/07
- [PATCH v1 07/11] FSF: hardware: graphics-card: Add possible lead with nouveau instabilities., Denis 'GNUtoo' Carikli, 2024/11/07
- [PATCH v1 11/11] FSF: hardware: disable option roms: clarify shutdown / cold boot., Denis 'GNUtoo' Carikli, 2024/11/07
- [PATCH v1 09/11] FSF: hardware: disable option roms: update and point hardware/graphics-card to it., Denis 'GNUtoo' Carikli, 2024/11/07