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.

Change-Id: I24c5bc154df127fc5c16a388fc7ae4316167ba70
Signed-off-by: Tim Crawford <[email protected]>
  • Loading branch information
crawfxrd committed Jun 19, 2023
1 parent 04e48d4 commit 37e6e64
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;

// Disable higher memory speeds
memupd->FspmConfig.SaOcSupport = 0;
Expand Down
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.PchHdaAudioLinkHdaEnable = 1;
mupd->FspmConfig.DmiMaxLinkSpeed = 4;
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.PchHdaAudioLinkHdaEnable = 1;
mupd->FspmConfig.DmiMaxLinkSpeed = 4;
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.PchHdaAudioLinkHdaEnable = 1;
mupd->FspmConfig.DmiMaxLinkSpeed = 4;
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.PchHdaAudioLinkHdaEnable = 1;
mupd->FspmConfig.DmiMaxLinkSpeed = 4;
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 @@ -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.PchHdaAudioLinkHdaEnable = 1;
mupd->FspmConfig.DmiMaxLinkSpeed = 4;
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 @@ -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.PchHdaAudioLinkHdaEnable = 1;
mupd->FspmConfig.DmiMaxLinkSpeed = 4;
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.PchHdaAudioLinkHdaEnable = 1;
mupd->FspmConfig.DmiMaxLinkSpeed = 4;
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.PchHdaAudioLinkHdaEnable = 1;
mupd->FspmConfig.DmiMaxLinkSpeed = 4;
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.PchHdaAudioLinkHdaEnable = 1;
mupd->FspmConfig.DmiMaxLinkSpeed = 4;
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 @@ -38,8 +38,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;

memcfg_init(mupd, &board_cfg, &spd_info, half_populated);
}
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 @@ -30,6 +30,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;

// Allow memory clocks higher than 2933 MHz
Expand Down

0 comments on commit 37e6e64

Please sign in to comment.