Skip to content

Commit

Permalink
mb/system76: Set PrimaryDisplay to hybrid graphics
Browse files Browse the repository at this point in the history
Use the FSP option for (muxless) hybrid graphics. Internally it ends up
setting PrimaryDisplay to iGFX, but does some extra configuration for
the dGPU.

Only galp5 is left as setting PrimaryDisplay to iGFX as the dGPU was
optional for the model and I don't know what effect it would have to set
it to hybrid for those.

Change-Id: I24c5bc154df127fc5c16a388fc7ae4316167ba70
Signed-off-by: Tim Crawford <tcrawford@system76.com>
  • Loading branch information
crawfxrd committed Sep 17, 2024
1 parent 7c024f8 commit 1a994cf
Show file tree
Hide file tree
Showing 15 changed files with 29 additions and 28 deletions.
4 changes: 2 additions & 2 deletions src/mainboard/system76/addw1/romstage.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ void mainboard_memory_init_params(FSPM_UPD *memupd)
// Enable dGPU power
nvidia_set_power(&config);

// Set primary display to internal graphics
memupd->FspmConfig.PrimaryDisplay = 0;
// Set primary display to hybrid graphics
memupd->FspmConfig.PrimaryDisplay = 4;

cannonlake_memcfg_init(&memupd->FspmConfig, &memcfg);
}
4 changes: 2 additions & 2 deletions src/mainboard/system76/adl/variants/gaze17-3050/romstage.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
// Enable dGPU power
nvidia_set_power(&config);

// Set primary display to internal graphics
mupd->FspmConfig.PrimaryDisplay = 0;
// Set primary display to hybrid graphics
mupd->FspmConfig.PrimaryDisplay = 4;

mupd->FspmConfig.DmiMaxLinkSpeed = 4;
mupd->FspmConfig.GpioOverride = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/mainboard/system76/adl/variants/gaze17-3060-b/romstage.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
// Enable dGPU power
nvidia_set_power(&config);

// Set primary display to internal graphics
mupd->FspmConfig.PrimaryDisplay = 0;
// Set primary display to hybrid graphics
mupd->FspmConfig.PrimaryDisplay = 4;

mupd->FspmConfig.DmiMaxLinkSpeed = 4;
mupd->FspmConfig.GpioOverride = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/mainboard/system76/adl/variants/oryp10/romstage.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
// Enable dGPU power
nvidia_set_power(&config);

// Set primary display to internal graphics
mupd->FspmConfig.PrimaryDisplay = 0;
// Set primary display to hybrid graphics
mupd->FspmConfig.PrimaryDisplay = 4;

mupd->FspmConfig.DmiMaxLinkSpeed = 4;
mupd->FspmConfig.GpioOverride = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/mainboard/system76/adl/variants/oryp9/romstage.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
// Enable dGPU power
nvidia_set_power(&config);

// Set primary display to internal graphics
mupd->FspmConfig.PrimaryDisplay = 0;
// Set primary display to hybrid graphics
mupd->FspmConfig.PrimaryDisplay = 4;

mupd->FspmConfig.DmiMaxLinkSpeed = 4;
mupd->FspmConfig.GpioOverride = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/mainboard/system76/gaze15/romstage.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ void mainboard_memory_init_params(FSPM_UPD *memupd)
// Enable dGPU power
nvidia_set_power(&config);

// Set primary display to internal graphics
memupd->FspmConfig.PrimaryDisplay = 0;
// Set primary display to hybrid graphics
memupd->FspmConfig.PrimaryDisplay = 4;

cannonlake_memcfg_init(&memupd->FspmConfig, &memcfg);
}
4 changes: 2 additions & 2 deletions src/mainboard/system76/oryp5/romstage.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ void mainboard_memory_init_params(FSPM_UPD *memupd)
// Enable dGPU power
nvidia_set_power(&config);

// Set primary display to internal graphics
memupd->FspmConfig.PrimaryDisplay = 0;
// Set primary display to hybrid graphics
memupd->FspmConfig.PrimaryDisplay = 4;

// Allow memory speeds higher than 2666 MT/s
memupd->FspmConfig.SaOcSupport = 1;
Expand Down
4 changes: 2 additions & 2 deletions src/mainboard/system76/oryp6/romstage.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ void mainboard_memory_init_params(FSPM_UPD *memupd)
// Enable dGPU power
nvidia_set_power(&config);

// Set primary display to internal graphics
memupd->FspmConfig.PrimaryDisplay = 0;
// Set primary display to hybrid graphics
memupd->FspmConfig.PrimaryDisplay = 4;

variant_configure_fspm(memupd);

Expand Down
4 changes: 2 additions & 2 deletions src/mainboard/system76/rpl/variants/addw3/romstage.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
// Enable dGPU power
nvidia_set_power(&config);

// Set primary display to internal graphics
mupd->FspmConfig.PrimaryDisplay = 0;
// Set primary display to hybrid graphics
mupd->FspmConfig.PrimaryDisplay = 4;

mupd->FspmConfig.DmiMaxLinkSpeed = 4;
mupd->FspmConfig.GpioOverride = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/mainboard/system76/rpl/variants/bonw15/romstage.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
// Enable dGPU power
nvidia_set_power(&config);

// Set primary display to internal graphics
mupd->FspmConfig.PrimaryDisplay = 0;
// Set primary display to hybrid graphics
mupd->FspmConfig.PrimaryDisplay = 4;

mupd->FspmConfig.DmiMaxLinkSpeed = 4;
mupd->FspmConfig.GpioOverride = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/mainboard/system76/rpl/variants/gaze18/romstage.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
// Enable dGPU power
nvidia_set_power(&config);

// Set primary display to internal graphics
mupd->FspmConfig.PrimaryDisplay = 0;
// Set primary display to hybrid graphics
mupd->FspmConfig.PrimaryDisplay = 4;

mupd->FspmConfig.DmiMaxLinkSpeed = 4;
mupd->FspmConfig.GpioOverride = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/mainboard/system76/rpl/variants/oryp11/romstage.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
// Enable dGPU power
nvidia_set_power(&config);

// Set primary display to internal graphics
mupd->FspmConfig.PrimaryDisplay = 0;
// Set primary display to hybrid graphics
mupd->FspmConfig.PrimaryDisplay = 4;

mupd->FspmConfig.DmiMaxLinkSpeed = 4;
mupd->FspmConfig.GpioOverride = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/mainboard/system76/rpl/variants/serw13/romstage.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
// Enable dGPU power
nvidia_set_power(&config);

// Set primary display to internal graphics
mupd->FspmConfig.PrimaryDisplay = 0;
// Set primary display to hybrid graphics
mupd->FspmConfig.PrimaryDisplay = 4;

mupd->FspmConfig.DmiMaxLinkSpeed = 4;
mupd->FspmConfig.GpioOverride = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/mainboard/system76/tgl-h/romstage.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
// Enable dGPU power
nvidia_set_power(&config);

// Set primary display to internal graphics
mupd->FspmConfig.PrimaryDisplay = 0;
// Set primary display to hybrid graphics
mupd->FspmConfig.PrimaryDisplay = 4;

variant_memory_init_params(mupd);

Expand Down
1 change: 1 addition & 0 deletions src/mainboard/system76/tgl-u/variants/galp5/romstage.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
nvidia_set_power(&config);

// Set primary display to internal graphics
// NOTE: Use iGFX as some units don't have a dGPU for hybrid graphics
mupd->FspmConfig.PrimaryDisplay = 0;

memcfg_init(mupd, &board_cfg, &spd_info, half_populated);
Expand Down

0 comments on commit 1a994cf

Please sign in to comment.