diff options
author | Jean Delvare <khali@linux-fr.org> | 2009-09-22 19:47:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 10:39:57 -0400 |
commit | a690606d1f54845b018d033ac32e91df25cb2680 (patch) | |
tree | 062674451f9333e8673d43eabca88e8c2e2c3393 /drivers/video | |
parent | ee5a27497957e55a520788f88536401e7b12bf41 (diff) |
matroxfb: get rid of CONFIG_FB_MATROX_32MB
CONFIG_FB_MATROX_32MB is always enabled, so there is no point in having
ifdefs all around. And it is bad practice to use CONFIG_* as a name for
something which is not a Kconfig option.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Petr Vandrovec <vandrove@vc.cvut.cz>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/matrox/matroxfb_DAC1064.c | 2 | ||||
-rw-r--r-- | drivers/video/matrox/matroxfb_base.c | 12 | ||||
-rw-r--r-- | drivers/video/matrox/matroxfb_base.h | 5 |
3 files changed, 0 insertions, 19 deletions
diff --git a/drivers/video/matrox/matroxfb_DAC1064.c b/drivers/video/matrox/matroxfb_DAC1064.c index 88466a04bab2..f9fa0fd00292 100644 --- a/drivers/video/matrox/matroxfb_DAC1064.c +++ b/drivers/video/matrox/matroxfb_DAC1064.c | |||
@@ -1080,10 +1080,8 @@ static void MGAG100_restore(struct matrox_fb_info *minfo) | |||
1080 | 1080 | ||
1081 | DAC1064_restore_1(minfo); | 1081 | DAC1064_restore_1(minfo); |
1082 | matroxfb_vgaHWrestore(minfo); | 1082 | matroxfb_vgaHWrestore(minfo); |
1083 | #ifdef CONFIG_FB_MATROX_32MB | ||
1084 | if (minfo->devflags.support32MB) | 1083 | if (minfo->devflags.support32MB) |
1085 | mga_setr(M_EXTVGA_INDEX, 8, hw->CRTCEXT[8]); | 1084 | mga_setr(M_EXTVGA_INDEX, 8, hw->CRTCEXT[8]); |
1086 | #endif | ||
1087 | minfo->crtc1.panpos = -1; | 1085 | minfo->crtc1.panpos = -1; |
1088 | for (i = 0; i < 6; i++) | 1086 | for (i = 0; i < 6; i++) |
1089 | mga_setr(M_EXTVGA_INDEX, i, hw->CRTCEXT[i]); | 1087 | mga_setr(M_EXTVGA_INDEX, i, hw->CRTCEXT[i]); |
diff --git a/drivers/video/matrox/matroxfb_base.c b/drivers/video/matrox/matroxfb_base.c index c6b122cfb300..7064fb4427b6 100644 --- a/drivers/video/matrox/matroxfb_base.c +++ b/drivers/video/matrox/matroxfb_base.c | |||
@@ -310,9 +310,7 @@ static void matrox_pan_var(struct matrox_fb_info *minfo, | |||
310 | { | 310 | { |
311 | unsigned int pos; | 311 | unsigned int pos; |
312 | unsigned short p0, p1, p2; | 312 | unsigned short p0, p1, p2; |
313 | #ifdef CONFIG_FB_MATROX_32MB | ||
314 | unsigned int p3; | 313 | unsigned int p3; |
315 | #endif | ||
316 | int vbl; | 314 | int vbl; |
317 | unsigned long flags; | 315 | unsigned long flags; |
318 | 316 | ||
@@ -330,9 +328,7 @@ static void matrox_pan_var(struct matrox_fb_info *minfo, | |||
330 | p0 = minfo->hw.CRTC[0x0D] = pos & 0xFF; | 328 | p0 = minfo->hw.CRTC[0x0D] = pos & 0xFF; |
331 | p1 = minfo->hw.CRTC[0x0C] = (pos & 0xFF00) >> 8; | 329 | p1 = minfo->hw.CRTC[0x0C] = (pos & 0xFF00) >> 8; |
332 | p2 = minfo->hw.CRTCEXT[0] = (minfo->hw.CRTCEXT[0] & 0xB0) | ((pos >> 16) & 0x0F) | ((pos >> 14) & 0x40); | 330 | p2 = minfo->hw.CRTCEXT[0] = (minfo->hw.CRTCEXT[0] & 0xB0) | ((pos >> 16) & 0x0F) | ((pos >> 14) & 0x40); |
333 | #ifdef CONFIG_FB_MATROX_32MB | ||
334 | p3 = minfo->hw.CRTCEXT[8] = pos >> 21; | 331 | p3 = minfo->hw.CRTCEXT[8] = pos >> 21; |
335 | #endif | ||
336 | 332 | ||
337 | /* FB_ACTIVATE_VBL and we can acquire interrupts? Honor FB_ACTIVATE_VBL then... */ | 333 | /* FB_ACTIVATE_VBL and we can acquire interrupts? Honor FB_ACTIVATE_VBL then... */ |
338 | vbl = (var->activate & FB_ACTIVATE_VBL) && (matroxfb_enable_irq(minfo, 0) == 0); | 334 | vbl = (var->activate & FB_ACTIVATE_VBL) && (matroxfb_enable_irq(minfo, 0) == 0); |
@@ -342,10 +338,8 @@ static void matrox_pan_var(struct matrox_fb_info *minfo, | |||
342 | matroxfb_DAC_lock_irqsave(flags); | 338 | matroxfb_DAC_lock_irqsave(flags); |
343 | mga_setr(M_CRTC_INDEX, 0x0D, p0); | 339 | mga_setr(M_CRTC_INDEX, 0x0D, p0); |
344 | mga_setr(M_CRTC_INDEX, 0x0C, p1); | 340 | mga_setr(M_CRTC_INDEX, 0x0C, p1); |
345 | #ifdef CONFIG_FB_MATROX_32MB | ||
346 | if (minfo->devflags.support32MB) | 341 | if (minfo->devflags.support32MB) |
347 | mga_setr(M_EXTVGA_INDEX, 0x08, p3); | 342 | mga_setr(M_EXTVGA_INDEX, 0x08, p3); |
348 | #endif | ||
349 | if (vbl) { | 343 | if (vbl) { |
350 | minfo->crtc1.panpos = p2; | 344 | minfo->crtc1.panpos = p2; |
351 | } else { | 345 | } else { |
@@ -1360,13 +1354,9 @@ static struct video_board vbMystique = {0x0800000, 0x0800000, FB_ACCEL_MATROX_M | |||
1360 | #ifdef CONFIG_FB_MATROX_G | 1354 | #ifdef CONFIG_FB_MATROX_G |
1361 | static struct video_board vbG100 = {0x0800000, 0x0800000, FB_ACCEL_MATROX_MGAG100, &matrox_G100}; | 1355 | static struct video_board vbG100 = {0x0800000, 0x0800000, FB_ACCEL_MATROX_MGAG100, &matrox_G100}; |
1362 | static struct video_board vbG200 = {0x1000000, 0x1000000, FB_ACCEL_MATROX_MGAG200, &matrox_G100}; | 1356 | static struct video_board vbG200 = {0x1000000, 0x1000000, FB_ACCEL_MATROX_MGAG200, &matrox_G100}; |
1363 | #ifdef CONFIG_FB_MATROX_32MB | ||
1364 | /* from doc it looks like that accelerator can draw only to low 16MB :-( Direct accesses & displaying are OK for | 1357 | /* from doc it looks like that accelerator can draw only to low 16MB :-( Direct accesses & displaying are OK for |
1365 | whole 32MB */ | 1358 | whole 32MB */ |
1366 | static struct video_board vbG400 = {0x2000000, 0x1000000, FB_ACCEL_MATROX_MGAG400, &matrox_G100}; | 1359 | static struct video_board vbG400 = {0x2000000, 0x1000000, FB_ACCEL_MATROX_MGAG400, &matrox_G100}; |
1367 | #else | ||
1368 | static struct video_board vbG400 = {0x2000000, 0x1000000, FB_ACCEL_MATROX_MGAG400, &matrox_G100}; | ||
1369 | #endif | ||
1370 | #endif | 1360 | #endif |
1371 | 1361 | ||
1372 | #define DEVF_VIDEO64BIT 0x0001 | 1362 | #define DEVF_VIDEO64BIT 0x0001 |
@@ -1646,9 +1636,7 @@ static int initMatrox2(struct matrox_fb_info *minfo, struct board *b) | |||
1646 | minfo->devflags.textmode = 1; | 1636 | minfo->devflags.textmode = 1; |
1647 | minfo->devflags.text_type_aux = FB_AUX_TEXT_MGA_STEP8; | 1637 | minfo->devflags.text_type_aux = FB_AUX_TEXT_MGA_STEP8; |
1648 | } | 1638 | } |
1649 | #ifdef CONFIG_FB_MATROX_32MB | ||
1650 | minfo->devflags.support32MB = (b->flags & DEVF_SUPPORT32MB) != 0; | 1639 | minfo->devflags.support32MB = (b->flags & DEVF_SUPPORT32MB) != 0; |
1651 | #endif | ||
1652 | minfo->devflags.precise_width = !(b->flags & DEVF_ANY_VXRES); | 1640 | minfo->devflags.precise_width = !(b->flags & DEVF_ANY_VXRES); |
1653 | minfo->devflags.crtc2 = (b->flags & DEVF_CRTC2) != 0; | 1641 | minfo->devflags.crtc2 = (b->flags & DEVF_CRTC2) != 0; |
1654 | minfo->devflags.maven_capable = (b->flags & DEVF_MAVEN_CAPABLE) != 0; | 1642 | minfo->devflags.maven_capable = (b->flags & DEVF_MAVEN_CAPABLE) != 0; |
diff --git a/drivers/video/matrox/matroxfb_base.h b/drivers/video/matrox/matroxfb_base.h index 06158ab68cc4..f3a4e15672d9 100644 --- a/drivers/video/matrox/matroxfb_base.h +++ b/drivers/video/matrox/matroxfb_base.h | |||
@@ -54,9 +54,6 @@ | |||
54 | #include "../macmodes.h" | 54 | #include "../macmodes.h" |
55 | #endif | 55 | #endif |
56 | 56 | ||
57 | /* always compile support for 32MB... It cost almost nothing */ | ||
58 | #define CONFIG_FB_MATROX_32MB | ||
59 | |||
60 | #ifdef MATROXFB_DEBUG | 57 | #ifdef MATROXFB_DEBUG |
61 | 58 | ||
62 | #define DEBUG | 59 | #define DEBUG |
@@ -464,9 +461,7 @@ struct matrox_fb_info { | |||
464 | int nopciretry; | 461 | int nopciretry; |
465 | int noinit; | 462 | int noinit; |
466 | int sgram; | 463 | int sgram; |
467 | #ifdef CONFIG_FB_MATROX_32MB | ||
468 | int support32MB; | 464 | int support32MB; |
469 | #endif | ||
470 | 465 | ||
471 | int accelerator; | 466 | int accelerator; |
472 | int text_type_aux; | 467 | int text_type_aux; |