diff options
author | Jean Delvare <khali@linux-fr.org> | 2009-09-22 19:47:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 10:39:56 -0400 |
commit | 0728bacbba3b0267fa8ca8be69aa43d81b57ab51 (patch) | |
tree | a0dd85cb348ad481e92a0d4f45eefdc88fac6e3d /drivers/video/matrox/matroxfb_base.h | |
parent | 0fcf6ada2b8eb42d132c0846384f1299889609e3 (diff) |
matroxfb: make CONFIG_FB_MATROX_MULTIHEAD=y mandatory
I would like to get rid of option CONFIG_FB_MATROX_MULTIHEAD and just
always enable it. There are many reasons for doing this:
* CONFIG_FB_MATROX_MULTIHEAD=y is what all x86 distributions do, so it
definitely works or we would know by now.
* Building the matroxfb driver with CONFIG_FB_MATROX_MULTIHEAD not set
results in the following build warning:
drivers/video/matrox/matroxfb_crtc2.c: In function 'matroxfb_dh_open':
drivers/video/matrox/matroxfb_crtc2.c:265: warning: the address of 'matroxfb_global_mxinfo' will always evaluate as 'true'
drivers/video/matrox/matroxfb_crtc2.c: In function 'matroxfb_dh_release':
drivers/video/matrox/matroxfb_crtc2.c:285: warning: the address of 'matroxfb_global_mxinfo' will always evaluate as 'true'
This is nothing to be worried about, the driver will work fine, but build
warnings are still annoying.
* The trick to get multihead support without CONFIG_FB_MATROX_MULTIHEAD,
which is described in the config help text, no longer works: you can't
load the same kernel module more than once.
* I fail to see how CONFIG_FB_MATROX_MULTIHEAD=y would make the code
significantly slower, contrary to what the help text says. A few extra
parameters on the stack here and there can't really slow things down in
comaprison to the rest of the code, and register access.
* The driver built without CONFIG_FB_MATROX_MULTIHEAD is larger than the
driver build with CONFIG_FB_MATROX_MULTIHEAD=y by 8%.
* One less configuration option makes things simpler. We add options
all the time, being able to remove one for once is nice. It improves
testing coverage. And I don't think the Matrox adapters are still
popular enough to warrant overdetailed configuration settings.
* We should be able to unobfuscate the driver code quite a bit after
this change (patches follow.)
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/matrox/matroxfb_base.h')
-rw-r--r-- | drivers/video/matrox/matroxfb_base.h | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/drivers/video/matrox/matroxfb_base.h b/drivers/video/matrox/matroxfb_base.h index 95883236c0cd..ba64f5e33467 100644 --- a/drivers/video/matrox/matroxfb_base.h +++ b/drivers/video/matrox/matroxfb_base.h | |||
@@ -524,7 +524,6 @@ struct matrox_fb_info { | |||
524 | 524 | ||
525 | #define info2minfo(info) container_of(info, struct matrox_fb_info, fbcon) | 525 | #define info2minfo(info) container_of(info, struct matrox_fb_info, fbcon) |
526 | 526 | ||
527 | #ifdef CONFIG_FB_MATROX_MULTIHEAD | ||
528 | #define ACCESS_FBINFO2(info, x) (info->x) | 527 | #define ACCESS_FBINFO2(info, x) (info->x) |
529 | #define ACCESS_FBINFO(x) ACCESS_FBINFO2(minfo,x) | 528 | #define ACCESS_FBINFO(x) ACCESS_FBINFO2(minfo,x) |
530 | 529 | ||
@@ -538,25 +537,6 @@ struct matrox_fb_info { | |||
538 | #define PMINFO PMINFO2 , | 537 | #define PMINFO PMINFO2 , |
539 | 538 | ||
540 | #define MINFO_FROM(x) struct matrox_fb_info* minfo = x | 539 | #define MINFO_FROM(x) struct matrox_fb_info* minfo = x |
541 | #else | ||
542 | |||
543 | extern struct matrox_fb_info matroxfb_global_mxinfo; | ||
544 | |||
545 | #define ACCESS_FBINFO(x) (matroxfb_global_mxinfo.x) | ||
546 | #define ACCESS_FBINFO2(info, x) (matroxfb_global_mxinfo.x) | ||
547 | |||
548 | #define MINFO (&matroxfb_global_mxinfo) | ||
549 | |||
550 | #define WPMINFO2 void | ||
551 | #define WPMINFO | ||
552 | #define CPMINFO2 void | ||
553 | #define CPMINFO | ||
554 | #define PMINFO2 | ||
555 | #define PMINFO | ||
556 | |||
557 | #define MINFO_FROM(x) | ||
558 | |||
559 | #endif | ||
560 | 540 | ||
561 | #define MINFO_FROM_INFO(x) MINFO_FROM(info2minfo(x)) | 541 | #define MINFO_FROM_INFO(x) MINFO_FROM(info2minfo(x)) |
562 | 542 | ||