diff options
| -rw-r--r-- | drivers/video/Kconfig | 14 | ||||
| -rw-r--r-- | drivers/video/via/viafbdev.c | 8 |
2 files changed, 22 insertions, 0 deletions
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 22c1662de964..fd55c279915c 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig | |||
| @@ -1522,6 +1522,20 @@ config FB_VIA | |||
| 1522 | To compile this driver as a module, choose M here: the | 1522 | To compile this driver as a module, choose M here: the |
| 1523 | module will be called viafb. | 1523 | module will be called viafb. |
| 1524 | 1524 | ||
| 1525 | if FB_VIA | ||
| 1526 | |||
| 1527 | config FB_VIA_DIRECT_PROCFS | ||
| 1528 | bool "direct hardware access via procfs (DEPRECATED)(DANGEROUS)" | ||
| 1529 | depends on FB_VIA | ||
| 1530 | default n | ||
| 1531 | help | ||
| 1532 | Allow direct hardware access to some output registers via procfs. | ||
| 1533 | This is dangerous but may provide the only chance to get the | ||
| 1534 | correct output device configuration. | ||
| 1535 | Its use is strongly discouraged. | ||
| 1536 | |||
| 1537 | endif | ||
| 1538 | |||
| 1525 | config FB_NEOMAGIC | 1539 | config FB_NEOMAGIC |
| 1526 | tristate "NeoMagic display support" | 1540 | tristate "NeoMagic display support" |
| 1527 | depends on FB && PCI | 1541 | depends on FB && PCI |
diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c index 51e9106138ce..3d033186a822 100644 --- a/drivers/video/via/viafbdev.c +++ b/drivers/video/via/viafbdev.c | |||
| @@ -1326,6 +1326,8 @@ static void parse_dvi_port(void) | |||
| 1326 | output_interface); | 1326 | output_interface); |
| 1327 | } | 1327 | } |
| 1328 | 1328 | ||
| 1329 | #ifdef CONFIG_FB_VIA_DIRECT_PROCFS | ||
| 1330 | |||
| 1329 | /* | 1331 | /* |
| 1330 | * The proc filesystem read/write function, a simple proc implement to | 1332 | * The proc filesystem read/write function, a simple proc implement to |
| 1331 | * get/set the value of DPA DVP0, DVP0DataDriving, DVP0ClockDriving, DVP1, | 1333 | * get/set the value of DPA DVP0, DVP0DataDriving, DVP0ClockDriving, DVP1, |
| @@ -1715,6 +1717,8 @@ static void viafb_remove_proc(struct proc_dir_entry *viafb_entry) | |||
| 1715 | remove_proc_entry("viafb", NULL); | 1717 | remove_proc_entry("viafb", NULL); |
| 1716 | } | 1718 | } |
| 1717 | 1719 | ||
| 1720 | #endif /* CONFIG_FB_VIA_DIRECT_PROCFS */ | ||
| 1721 | |||
| 1718 | static int parse_mode(const char *str, u32 *xres, u32 *yres) | 1722 | static int parse_mode(const char *str, u32 *xres, u32 *yres) |
| 1719 | { | 1723 | { |
| 1720 | char *ptr; | 1724 | char *ptr; |
| @@ -1943,7 +1947,9 @@ int __devinit via_fb_pci_probe(struct viafb_dev *vdev) | |||
| 1943 | viafbinfo->node, viafbinfo->fix.id, default_var.xres, | 1947 | viafbinfo->node, viafbinfo->fix.id, default_var.xres, |
| 1944 | default_var.yres, default_var.bits_per_pixel); | 1948 | default_var.yres, default_var.bits_per_pixel); |
| 1945 | 1949 | ||
| 1950 | #ifdef CONFIG_FB_VIA_DIRECT_PROCFS | ||
| 1946 | viafb_init_proc(&viaparinfo->shared->proc_entry); | 1951 | viafb_init_proc(&viaparinfo->shared->proc_entry); |
| 1952 | #endif | ||
| 1947 | viafb_init_dac(IGA2); | 1953 | viafb_init_dac(IGA2); |
| 1948 | return 0; | 1954 | return 0; |
| 1949 | 1955 | ||
| @@ -1970,7 +1976,9 @@ void __devexit via_fb_pci_remove(struct pci_dev *pdev) | |||
| 1970 | unregister_framebuffer(viafbinfo); | 1976 | unregister_framebuffer(viafbinfo); |
| 1971 | if (viafb_dual_fb) | 1977 | if (viafb_dual_fb) |
| 1972 | unregister_framebuffer(viafbinfo1); | 1978 | unregister_framebuffer(viafbinfo1); |
| 1979 | #ifdef CONFIG_FB_VIA_DIRECT_PROCFS | ||
| 1973 | viafb_remove_proc(viaparinfo->shared->proc_entry); | 1980 | viafb_remove_proc(viaparinfo->shared->proc_entry); |
| 1981 | #endif | ||
| 1974 | framebuffer_release(viafbinfo); | 1982 | framebuffer_release(viafbinfo); |
| 1975 | if (viafb_dual_fb) | 1983 | if (viafb_dual_fb) |
| 1976 | framebuffer_release(viafbinfo1); | 1984 | framebuffer_release(viafbinfo1); |
