Board:lenovo/Nvidia Optimus: Difference between revisions

From coreboot
Jump to navigation Jump to search
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
=== Nvidia Optimus ===
== Nvidia Optimus ==


[https://de.wikipedia.org/wiki/Nvidia_Optimus Nvidia Optimus] is mainly an ACPI feature to control power of the dGPU.
[https://de.wikipedia.org/wiki/Nvidia_Optimus Nvidia Optimus] is mainly an ACPI feature to control power of the dGPU.
Line 5: Line 5:
Coreboot 4.6 doesn't support Nvidia Optimus.
Coreboot 4.6 doesn't support Nvidia Optimus.


=== Hybrid Graphics / Switchable Graphics ===
== Hybrid Graphics / Switchable Graphics ==


[https://en.wikipedia.org/wiki/AMD_Hybrid_Graphics Hybrid graphics] is a feature used by a notebook that has two GPUs and a MUX to switch the notebook's panel to one of the GPUs.
[https://en.wikipedia.org/wiki/AMD_Hybrid_Graphics Hybrid graphics] is a feature used by a notebook that has two GPUs and a MUX to switch the notebook's panel to one of the GPUs.
Line 16: Line 16:
* Lenovo T430/T530
* Lenovo T430/T530


=== PowerXpress (Mobile) ===
== PowerXpress (Mobile) ==


PowerXpress automatically switches the graphics depending on AC/battery state and user preference.
PowerXpress automatically switches the graphics depending on AC/battery state and user preference.
Coreboot 4.6 doesn't support PowerXpress.
Coreboot 4.6 doesn't support PowerXpress.


=== Dual graphics ===
== Dual graphics ==


Dual graphics is a feature used by a notebook that has two GPUs and where the iGPU is connected to the panel and where the dGPU used to offload rendering to.
Dual graphics is a feature used by a notebook that has two GPUs and where the iGPU is connected to the panel and where the dGPU used to offload rendering to.
It can be used on MUXed devices and MUXless devices.
It can be used on MUXed devices and MUXless devices.


Warning: Enabling two GPUs draws significantly more power ! You need Nvidia Optimus to disable the dGPU's power when not in use! Nvidia Optimus hasn't been implemented as of writing this (2018).
Requirements:
Requirements:
* Active both GPUs at boot
* Active both GPUs at boot
* Include the VGA Option ROM for the dGPU
* Include the VGA Option ROM for the dGPU (important, as the VGA Option ROM contains configuration data)
* Include the VGA Option ROM for the iGPU or use Native Graphics Init
* Include the VGA Option ROM for the iGPU or use Native Graphics Init
* On Linux you can use DRI_PRIME=1 to offload 3D rendering to another GPU.
* On Linux you can use DRI_PRIME=1 to offload 3D rendering to another GPU.
Line 36: Line 38:
* Lenovo T420/T520/T420s (depends on: https://review.coreboot.org/#/q/project:coreboot+branch:master+topic:_ROM, https://review.coreboot.org/#/c/coreboot/+/22337/)
* Lenovo T420/T520/T420s (depends on: https://review.coreboot.org/#/q/project:coreboot+branch:master+topic:_ROM, https://review.coreboot.org/#/c/coreboot/+/22337/)
* Lenovo T430/T530/T430s (depends on: https://review.coreboot.org/#/q/project:coreboot+branch:master+topic:_ROM, https://review.coreboot.org/#/c/coreboot/+/22337/)
* Lenovo T430/T530/T430s (depends on: https://review.coreboot.org/#/q/project:coreboot+branch:master+topic:_ROM, https://review.coreboot.org/#/c/coreboot/+/22337/)
=== For users ===
* Enable CMOS layout in Kconfig
* Change CMOS setting "hybrid_graphics_mode" during runtime using nvramcui or nvramtool:
** 0    Integrated Only (default)
** 1    Discrete Only
** 2    Dual graphics (only T500 as of writing)
If the device doesn't have two GPUs the CMOS option does have no effect.
=== For developers ===
* Select Kconfig DRIVERS_LENOVO_HYBRID_GRAPHICS=y
* Add to board's devicetree.cb :
** Example configuration:
chip drivers/lenovo/hybrid_graphics
  device pnp ff.f on end # dummy
  register "detect_gpio" = "21"
  register "has_panel_hybrid_gpio" = "1"
  register "panel_hybrid_gpio" = "52"
  register "panel_integrated_lvl" = "1"
  register "has_backlight_gpio" = "0"
  register "has_dgpu_power_gpio" = "0"
  register "has_thinker1" = "1"
end
* Devicetree settings:
** For detailed information, please check out the driver at ''src/drivers/lenovo/hybrid_graphics''
** ''detect_gpio'' is input GPIO on southbridge to advertise support for hybrid graphics.
** ''has_panel_hybrid_gpio'' is true if an GPIO on southbridge exists that is connected to a MUX.
** ''panel_hybrid_gpio'' sets the GPIO on southbridge that is connected to a LVDS MUX.
** ''has_backlight_gpio'' is true if an GPIO on southbridge exists that is connected to a backlight PWM MUX.
** ''backlight_gpio'' sets the GPIO on southbridge that is connected to a backlight PWM MUX.
** ''has_dgpu_power_gpio'' is true if an GPIO on southbridge exists that enabled dGPU power.
** ''dgpu_power_gpio'' sets the GPIO on southbridge that is connected to dGPU power switch.
** ''has_thinker1'' is true if the EC is compatible to "Thinker1" register set to enable dGPU power.
* Add CMOS setting "hybrid_graphics_mode":
** 0    Integrated Only
** 1    Discrete Only
** 2    Dual graphics (only T500 as of writing)


== Proprietary Option Rom usage ==
== Proprietary Option Rom usage ==
Please note that you have to use the Nvidia/AMD Option Rom to drive the second GPU.
Please note that you have to use the Nvidia/AMD Option Rom to drive the second GPU.
For the Intel GPU you are free to use the Option Rom or use Native graphics Init.
For the Intel GPU you are free to use the Option Rom or use Native graphics Init.

Latest revision as of 14:14, 25 March 2018

Nvidia Optimus

Nvidia Optimus is mainly an ACPI feature to control power of the dGPU.

Coreboot 4.6 doesn't support Nvidia Optimus.

Hybrid Graphics / Switchable Graphics

Hybrid graphics is a feature used by a notebook that has two GPUs and a MUX to switch the notebook's panel to one of the GPUs. Only one GPU is active at time, allowing to save power and making display handling on software side easy.

Coreboot does support hybrid graphics and you can select the GPU to use at boot (using a CMOS setting, through nvramtool or nvramcui). Supported Notebooks:

  • Lenovo T400/T500
  • Lenovo T420/T520
  • Lenovo T430/T530

PowerXpress (Mobile)

PowerXpress automatically switches the graphics depending on AC/battery state and user preference. Coreboot 4.6 doesn't support PowerXpress.

Dual graphics

Dual graphics is a feature used by a notebook that has two GPUs and where the iGPU is connected to the panel and where the dGPU used to offload rendering to. It can be used on MUXed devices and MUXless devices.

Warning: Enabling two GPUs draws significantly more power ! You need Nvidia Optimus to disable the dGPU's power when not in use! Nvidia Optimus hasn't been implemented as of writing this (2018).

Requirements:

  • Active both GPUs at boot
  • Include the VGA Option ROM for the dGPU (important, as the VGA Option ROM contains configuration data)
  • Include the VGA Option ROM for the iGPU or use Native Graphics Init
  • On Linux you can use DRI_PRIME=1 to offload 3D rendering to another GPU.

Supported Notebooks:

For users

  • Enable CMOS layout in Kconfig
  • Change CMOS setting "hybrid_graphics_mode" during runtime using nvramcui or nvramtool:
    • 0 Integrated Only (default)
    • 1 Discrete Only
    • 2 Dual graphics (only T500 as of writing)

If the device doesn't have two GPUs the CMOS option does have no effect.

For developers

  • Select Kconfig DRIVERS_LENOVO_HYBRID_GRAPHICS=y
  • Add to board's devicetree.cb :
    • Example configuration:
chip drivers/lenovo/hybrid_graphics
  device pnp ff.f on end # dummy
  register "detect_gpio" = "21"
  register "has_panel_hybrid_gpio" = "1"
  register "panel_hybrid_gpio" = "52"
  register "panel_integrated_lvl" = "1"
  register "has_backlight_gpio" = "0"
  register "has_dgpu_power_gpio" = "0"
  register "has_thinker1" = "1"
end
  • Devicetree settings:
    • For detailed information, please check out the driver at src/drivers/lenovo/hybrid_graphics
    • detect_gpio is input GPIO on southbridge to advertise support for hybrid graphics.
    • has_panel_hybrid_gpio is true if an GPIO on southbridge exists that is connected to a MUX.
    • panel_hybrid_gpio sets the GPIO on southbridge that is connected to a LVDS MUX.
    • has_backlight_gpio is true if an GPIO on southbridge exists that is connected to a backlight PWM MUX.
    • backlight_gpio sets the GPIO on southbridge that is connected to a backlight PWM MUX.
    • has_dgpu_power_gpio is true if an GPIO on southbridge exists that enabled dGPU power.
    • dgpu_power_gpio sets the GPIO on southbridge that is connected to dGPU power switch.
    • has_thinker1 is true if the EC is compatible to "Thinker1" register set to enable dGPU power.


  • Add CMOS setting "hybrid_graphics_mode":
    • 0 Integrated Only
    • 1 Discrete Only
    • 2 Dual graphics (only T500 as of writing)

Proprietary Option Rom usage

Please note that you have to use the Nvidia/AMD Option Rom to drive the second GPU. For the Intel GPU you are free to use the Option Rom or use Native graphics Init.