Skip to content

Commit

Permalink
Set memory clock based on memdiff if present from with engine changes…
Browse files Browse the repository at this point in the history
…, allowing it to parallel manual changes from the menu as well.
  • Loading branch information
ckolivas authored and luke-jr committed Aug 18, 2012
1 parent 8fc2983 commit 50bdf85
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions adl.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,7 @@ static void get_enginerange(int gpu, int *imin, int *imax)
int set_engineclock(int gpu, int iEngineClock)
{
ADLODPerformanceLevels *lpOdPerformanceLevels;
struct cgpu_info *cgpu;
int i, lev, ret = 1;
struct gpu_adl *ga;

Expand Down Expand Up @@ -833,6 +834,11 @@ int set_engineclock(int gpu, int iEngineClock)
ga->managed = true;
out:
unlock_adl();

cgpu = &gpus[gpu];
if (cgpu->gpu_memdiff)
set_memoryclock(gpu, iEngineClock / 100 + cgpu->gpu_memdiff);

return ret;
}

Expand Down Expand Up @@ -1198,8 +1204,6 @@ void gpu_autotune(int gpu, enum dev_enable *denable)
newengine /= 100;
applog(LOG_INFO, "Setting GPU %d engine clock to %d", gpu, newengine);
set_engineclock(gpu, newengine);
if (cgpu->gpu_memdiff)
set_memoryclock(gpu, newengine + cgpu->gpu_memdiff);
}
}
ga->lasttemp = temp;
Expand Down

0 comments on commit 50bdf85

Please sign in to comment.