vendorcode/amd/agesa: Logic typo in GfxPowerPlayLocateTdp

The function GfxPowerPlayLocateTdp() sets MinDeltaSclk to a maximum
sentinel value and checks DeltaSclk in a loop to minimize MinDeltaSclk.
However, MinDeltaSclk incorrectly self-assigns.

Change-Id: Id01c792057681516bba411adec268769a3549aa8
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-on: http://review.coreboot.org/5752
Tested-by: build bot (Jenkins)
Reviewed-by: Dave Frodin <dave.frodin@se-eng.com>
This commit is contained in:
Edward O'Callaghan 2014-05-15 19:37:24 +10:00 committed by Marc Jones
parent b2d68976c8
commit 8dd407a878
3 changed files with 8 additions and 8 deletions

View File

@ -211,7 +211,7 @@ GfxPowerPlayLocateTdp (
DpmSclk = GfxFmCalculateClock (PpFuses->SclkDpmDid[Index], StdHeader);
DeltaSclk = (DpmSclk > Sclk) ? (DpmSclk - Sclk) : (Sclk - DpmSclk);
if (DeltaSclk < MinDeltaSclk) {
MinDeltaSclk = MinDeltaSclk;
MinDeltaSclk = DeltaSclk;
DpmIndex = Index;
}
}

View File

@ -204,7 +204,7 @@ GfxPowerPlayLocateTdp (
DpmSclk = GfxFmCalculateClock (PpFuses->SclkDpmDid[Index], StdHeader);
DeltaSclk = (DpmSclk > Sclk) ? (DpmSclk - Sclk) : (Sclk - DpmSclk);
if (DeltaSclk < MinDeltaSclk) {
MinDeltaSclk = MinDeltaSclk;
MinDeltaSclk = DeltaSclk;
DpmIndex = Index;
}
}

View File

@ -147,7 +147,7 @@ GfxPowerPlayLocateTdp (
DpmSclk = GfxFmCalculateClock (PpFuses->SclkDpmDid[Index], StdHeader);
DeltaSclk = (DpmSclk > Sclk) ? (DpmSclk - Sclk) : (Sclk - DpmSclk);
if (DeltaSclk < MinDeltaSclk) {
MinDeltaSclk = MinDeltaSclk;
MinDeltaSclk = DeltaSclk;
DpmIndex = Index;
}
}