Skip to content

Commit

Permalink
simplify diff
Browse files Browse the repository at this point in the history
  • Loading branch information
curiousercreative committed Jan 19, 2021
1 parent 1c42c2e commit 00081ca
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
11 changes: 4 additions & 7 deletions src/board/system76/common/dgpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,10 @@ void dgpu_event(void) {
#endif
}

// NOTE: don't write fan speed here if we're syncing fans, let PECI do it and sync with CPU fan
#if !defined(SYNC_FANS) || !SYNC_FANS
if (duty != DCR4) {
DCR4 = duty;
DEBUG("DGPU temp=%d = %d\n", dgpu_temp, duty);
}
#endif
if (duty != DCR4) {
DCR4 = duty;
DEBUG("DGPU temp=%d = %d\n", dgpu_temp, duty);
}
}

#else
Expand Down
17 changes: 9 additions & 8 deletions src/board/system76/galp5/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,20 @@ CFLAGS+=\
-DPOWER_LIMIT_AC=65 \
-DPOWER_LIMIT_DC=28

# sync GPU fan speed to CPU fan speed
# sync GPU fan speed to CPU fan speed (great for galp5 w/o dGPU)
CFLAGS+=-DSYNC_FANS=1
# smooth the fan speed updates such that 0 to full speed happens over this period (divide by 4 for seconds)
CFLAGS+=-DFAN_SMOOTHING=40
CFLAGS+=-DFAN_SMOOTHING=50

# Custom fan curve
CFLAGS+=-DBOARD_HEATUP=5 # with fan smoothing, divide this by 4 for seconds
CFLAGS+=-DBOARD_COOLDOWN=20 # with fan smoothing, divide this by 4 for seconds
CFLAGS+=-DBOARD_HEATUP=5
CFLAGS+=-DBOARD_COOLDOWN=20
CFLAGS+=-DBOARD_FAN_POINTS="\
FAN_POINT(65, 25), \
FAN_POINT(70, 50), \
FAN_POINT(75, 75), \
FAN_POINT(80, 100), \
FAN_POINT(70, 40), \
FAN_POINT(75, 60), \
FAN_POINT(80, 75), \
FAN_POINT(85, 90), \
FAN_POINT(90, 100) \
"

# DGPU support
Expand Down

0 comments on commit 00081ca

Please sign in to comment.