diff options
Diffstat (limited to 'drivers/video/riva/riva_hw.c')
-rw-r--r-- | drivers/video/riva/riva_hw.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/video/riva/riva_hw.c b/drivers/video/riva/riva_hw.c index b6f8690b96c9..e0b8c521cc9c 100644 --- a/drivers/video/riva/riva_hw.c +++ b/drivers/video/riva/riva_hw.c | |||
@@ -1227,7 +1227,7 @@ static int CalcVClock | |||
1227 | * Calculate extended mode parameters (SVGA) and save in a | 1227 | * Calculate extended mode parameters (SVGA) and save in a |
1228 | * mode state structure. | 1228 | * mode state structure. |
1229 | */ | 1229 | */ |
1230 | static void CalcStateExt | 1230 | int CalcStateExt |
1231 | ( | 1231 | ( |
1232 | RIVA_HW_INST *chip, | 1232 | RIVA_HW_INST *chip, |
1233 | RIVA_HW_STATE *state, | 1233 | RIVA_HW_STATE *state, |
@@ -1249,7 +1249,8 @@ static void CalcStateExt | |||
1249 | * Extended RIVA registers. | 1249 | * Extended RIVA registers. |
1250 | */ | 1250 | */ |
1251 | pixelDepth = (bpp + 1)/8; | 1251 | pixelDepth = (bpp + 1)/8; |
1252 | CalcVClock(dotClock, &VClk, &m, &n, &p, chip); | 1252 | if (!CalcVClock(dotClock, &VClk, &m, &n, &p, chip)) |
1253 | return -EINVAL; | ||
1253 | 1254 | ||
1254 | switch (chip->Architecture) | 1255 | switch (chip->Architecture) |
1255 | { | 1256 | { |
@@ -1327,6 +1328,8 @@ static void CalcStateExt | |||
1327 | state->pitch1 = | 1328 | state->pitch1 = |
1328 | state->pitch2 = | 1329 | state->pitch2 = |
1329 | state->pitch3 = pixelDepth * width; | 1330 | state->pitch3 = pixelDepth * width; |
1331 | |||
1332 | return 0; | ||
1330 | } | 1333 | } |
1331 | /* | 1334 | /* |
1332 | * Load fixed function state and pre-calculated/stored state. | 1335 | * Load fixed function state and pre-calculated/stored state. |
@@ -2026,7 +2029,6 @@ static void nv3GetConfig | |||
2026 | */ | 2029 | */ |
2027 | chip->Busy = nv3Busy; | 2030 | chip->Busy = nv3Busy; |
2028 | chip->ShowHideCursor = ShowHideCursor; | 2031 | chip->ShowHideCursor = ShowHideCursor; |
2029 | chip->CalcStateExt = CalcStateExt; | ||
2030 | chip->LoadStateExt = LoadStateExt; | 2032 | chip->LoadStateExt = LoadStateExt; |
2031 | chip->UnloadStateExt = UnloadStateExt; | 2033 | chip->UnloadStateExt = UnloadStateExt; |
2032 | chip->SetStartAddress = SetStartAddress3; | 2034 | chip->SetStartAddress = SetStartAddress3; |
@@ -2084,7 +2086,6 @@ static void nv4GetConfig | |||
2084 | */ | 2086 | */ |
2085 | chip->Busy = nv4Busy; | 2087 | chip->Busy = nv4Busy; |
2086 | chip->ShowHideCursor = ShowHideCursor; | 2088 | chip->ShowHideCursor = ShowHideCursor; |
2087 | chip->CalcStateExt = CalcStateExt; | ||
2088 | chip->LoadStateExt = LoadStateExt; | 2089 | chip->LoadStateExt = LoadStateExt; |
2089 | chip->UnloadStateExt = UnloadStateExt; | 2090 | chip->UnloadStateExt = UnloadStateExt; |
2090 | chip->SetStartAddress = SetStartAddress; | 2091 | chip->SetStartAddress = SetStartAddress; |
@@ -2186,7 +2187,6 @@ static void nv10GetConfig | |||
2186 | */ | 2187 | */ |
2187 | chip->Busy = nv10Busy; | 2188 | chip->Busy = nv10Busy; |
2188 | chip->ShowHideCursor = ShowHideCursor; | 2189 | chip->ShowHideCursor = ShowHideCursor; |
2189 | chip->CalcStateExt = CalcStateExt; | ||
2190 | chip->LoadStateExt = LoadStateExt; | 2190 | chip->LoadStateExt = LoadStateExt; |
2191 | chip->UnloadStateExt = UnloadStateExt; | 2191 | chip->UnloadStateExt = UnloadStateExt; |
2192 | chip->SetStartAddress = SetStartAddress; | 2192 | chip->SetStartAddress = SetStartAddress; |