From 8991de68b132ae56e309a1bbc6f21de15e83ceb1 Mon Sep 17 00:00:00 2001 From: Florian Tobias Schandinat Date: Sat, 17 Apr 2010 19:44:57 +0000 Subject: [PATCH] --- yaml --- r: 193575 b: refs/heads/master c: 2b78a963c800252a0016785813cc5140c006145c h: refs/heads/master i: 193573: 727f3adea0c7fe54acfd97f9d5b841fea35cc64e 193571: 82c93482751d740f4a1b6c09b88721537eec1af0 193567: 845ee188d3632fb5ce69649f0e35cf3d753a6020 v: v3 --- [refs] | 2 +- trunk/drivers/video/Kconfig | 14 ++++++++++++++ trunk/drivers/video/via/viafbdev.c | 8 ++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 9e9ded119166..bb6d7160d61a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2fed547c0298e1465d62b34a75a7b76353fee7d3 +refs/heads/master: 2b78a963c800252a0016785813cc5140c006145c diff --git a/trunk/drivers/video/Kconfig b/trunk/drivers/video/Kconfig index 22c1662de964..fd55c279915c 100644 --- a/trunk/drivers/video/Kconfig +++ b/trunk/drivers/video/Kconfig @@ -1522,6 +1522,20 @@ config FB_VIA To compile this driver as a module, choose M here: the module will be called viafb. +if FB_VIA + +config FB_VIA_DIRECT_PROCFS + bool "direct hardware access via procfs (DEPRECATED)(DANGEROUS)" + depends on FB_VIA + default n + help + Allow direct hardware access to some output registers via procfs. + This is dangerous but may provide the only chance to get the + correct output device configuration. + Its use is strongly discouraged. + +endif + config FB_NEOMAGIC tristate "NeoMagic display support" depends on FB && PCI diff --git a/trunk/drivers/video/via/viafbdev.c b/trunk/drivers/video/via/viafbdev.c index 51e9106138ce..3d033186a822 100644 --- a/trunk/drivers/video/via/viafbdev.c +++ b/trunk/drivers/video/via/viafbdev.c @@ -1326,6 +1326,8 @@ static void parse_dvi_port(void) output_interface); } +#ifdef CONFIG_FB_VIA_DIRECT_PROCFS + /* * The proc filesystem read/write function, a simple proc implement to * 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) remove_proc_entry("viafb", NULL); } +#endif /* CONFIG_FB_VIA_DIRECT_PROCFS */ + static int parse_mode(const char *str, u32 *xres, u32 *yres) { char *ptr; @@ -1943,7 +1947,9 @@ int __devinit via_fb_pci_probe(struct viafb_dev *vdev) viafbinfo->node, viafbinfo->fix.id, default_var.xres, default_var.yres, default_var.bits_per_pixel); +#ifdef CONFIG_FB_VIA_DIRECT_PROCFS viafb_init_proc(&viaparinfo->shared->proc_entry); +#endif viafb_init_dac(IGA2); return 0; @@ -1970,7 +1976,9 @@ void __devexit via_fb_pci_remove(struct pci_dev *pdev) unregister_framebuffer(viafbinfo); if (viafb_dual_fb) unregister_framebuffer(viafbinfo1); +#ifdef CONFIG_FB_VIA_DIRECT_PROCFS viafb_remove_proc(viaparinfo->shared->proc_entry); +#endif framebuffer_release(viafbinfo); if (viafb_dual_fb) framebuffer_release(viafbinfo1);